收件二维码及取件码,以及待收货时取消退款操作 ,以及对接调货等界面部分接口

This commit is contained in:
jia 2023-08-10 14:21:34 +08:00
parent 018dc3e3f8
commit 9b9911660e
14 changed files with 1517 additions and 203 deletions

View File

@ -230,4 +230,12 @@ export function orderCancellation(merId, id) {
*/
export function purchaseOrder(where, merId) {
return request.get(`admin/${merId}/purchaseOrder`, where, { login: true });
}
/**
* 商家物流取件二维码
* @param object data
*/
export function logisticsCode(id) {
return request.get(`order/logistics_code/${id}`);
}

65
api/trading-floor.js Normal file
View File

@ -0,0 +1,65 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 调货列表
*
*/
export function getCommunityList(data) {
return request.get('community/lst', data, {
noAuth: true
});
}
/**
* 商品详情
*
*/
export function getCommunityshow(data) {
console.log(data)
return request.get('community/show/'+data,{}, {
noAuth: true
});
}
/**
* 可转售的订单列表
*
*/
export function getCommunitygetOrderList(data) {
return request.get('community/getOrderList', data, {
noAuth: true
});
}
/**
* 发起转售
*
*/
export function getCommunitycreate( data) {
return request.post(`community/create`, data, { login: true });
}
/**
* 修改转售
*
*/
export function getCommunityUpdate( data) {
return request.post(`community/update`, data, { login: true });
}
/**
* 加入购物车
*
*/
export function getCommunityaddCart(data) {
return request.get('community/addCart', data, {
noAuth: true
});
}

View File

@ -25,7 +25,7 @@
<text v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
</view>
<view class="right-btn-box event_box" >
<view class="btn-item" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate<2 &&evaluate>=0" @click.stop="refund(item)">申请退款</view>
<view class="btn-item" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate<2&&evaluate>=0 && evaluate != 1" @click.stop="refund(item)">申请退款</view>
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
@ -73,7 +73,7 @@
<view class="right-btn-box" >
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view>
<view class="btn-item" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate<2 &&evaluate>=0" @click.stop="refund(item)">申请退款</view>
<view class="btn-item" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate<2&&evaluate>=0&& evaluate != 1" @click.stop="refund(item)">申请退款</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.refund_num > 0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view>

View File

@ -68,7 +68,9 @@
url: '/pages/trading_hall/adddiscounts/index'
})
} else {
uni.navigateTo({
url: '/pages/trading_hall/transfer_goods/index'
})
}
},
close() {

View File

@ -712,12 +712,19 @@
"root": "pages/trading_hall",
"name": "trading_hall",
"pages": [{
"path": "adddiscounts/index",
"path": "transfer_goods/index",
"style": {
"navigationBarTitleText": "新增调货",
"enablePullDownRefresh": false
}
},{
"path": "adddiscounts/index",
"style": {
"navigationBarTitleText": "新增打折",
"enablePullDownRefresh": false
}
},{
"path": "product_details/index",
"style": {

View File

@ -201,6 +201,18 @@
</view>
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
</view>
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<zbCode v-if="payCodeUrl" ref="qrcode" :cid="cid" :val="payCodeUrl" :size="size" :unit="unit"
:background="background" :foreground="foreground" :pdground="pdground" :lv="lv" :onval="onval"
:loadMake="loadMake" :usingComponents="true" />
</view>
</u-popup>
</view>
</template>
@ -223,8 +235,10 @@
setOrderRefund,
refundOrderReceive,
setRefundMark,
postconfirm
postconfirm,
logisticsCode
} from "@/api/admin";
import zbCode from '@/components/zb-code/zb-code.vue'
import Loading from '@/components/Loading/index'
import PriceChange from '@/components/PriceChange/index'
import {
@ -233,6 +247,7 @@
export default {
name: "AdminOrderList",
components: {
zbCode, //
Loading,
PriceChange
},
@ -255,7 +270,20 @@
refundInfo: {},
orderInfo: {},
status: "",
merId: ''
merId: '',
popUpShow: false,
payCodeUrl: '',
cid: '1',
ifShow: true,
size: 200, //
unit: 'px', //
background: '#FFF', //
foreground: '#000', //
pdground: '#32dbc6', //
lv: 3, //
onval: true, // val
loadMake: true, //
src: '', // base64
};
},
watch: {
@ -278,6 +306,11 @@
this.getIndex();
},
methods: {
//
popUpClose() {
this.popUpShow = false
},
//
tongyi(id, number) {
let data = {
@ -433,22 +466,38 @@
},
toPostage(item) {
let that = this;
console.log(item)
if (item.refunding != 0) {
uni.showModal({
title: '标题',
content: '该订单有售后申请,请确认已处理!',
success: function(res) {
if (res.confirm) {
uni.navigateTo({
url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}`
// uni.navigateTo({
// url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}`
// })
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
})
}
}
})
} else {
uni.navigateTo({
url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}`
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
})
// uni.navigateTo({
// url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}`
// })
}
},
async savePrice(opt) {

View File

@ -132,8 +132,10 @@
<text class="iconfont icon-xiangyou"></text>
</view>
<block v-if="cartInfo.length>0">
<orderGoods :orderData='orderInfo' :evaluate='orderInfo.status'
:activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true">
</orderGoods>
<block
v-if="orderInfo.order_type == 1 && orderInfo.takeOrderList && orderInfo.takeOrderList.length > 0"
@ -187,7 +189,7 @@
<view class="conter remark">{{ orderInfo.remark }}</view>
</view>
</view>
<view class='wrapper'>
<view class='item acea-row row-between'>
<view>订单编号</view>
@ -222,8 +224,7 @@
<view class='conter' v-if="orderInfo.pay_type==4 || orderInfo.pay_type==5">支付宝支付</view>
<view class='conter'
v-if="orderInfo.pay_type==1 || orderInfo.pay_type==2 || orderInfo.pay_type==3">微信支付</view>
<view class='conter'
v-if="orderInfo.pay_type==8 ">先货后款</view>
<view class='conter' v-if="orderInfo.pay_type==8 ">先货后款</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.mark">
<view>买家留言</view>
@ -280,7 +281,8 @@
<view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)"
class=" acea-row row-right row-middle">
<view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>
{{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款</view>
{{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款
</view>
<view v-if="orderInfo.presellOrder.activeStatus == 1" class='bnt b-color' @tap='pay_open'>立即付款
</view>
<view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单
@ -301,7 +303,7 @@
<navigator v-if="orderInfo.delivery_type == 1 || orderInfo.delivery_type == 4" class='bnt cancel'
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流
</navigator>
<view class='bnt b-color' @tap='confirmOrder'>确认收货</view>
<view class='bnt b-color' @tap='confirmOrder(orderInfo)'>确认收货</view>
</block>
<block v-if="orderInfo.status == 2">
<view class="bnt cancel" @click="allRefund"
@ -315,7 +317,8 @@
</block>
<block v-if="orderInfo.status == 3">
<view class='bnt cancel' @click="delOrder">删除订单</view>
<view class="bnt cancel" @click="allRefund" v-if="orderInfo.orderProduct[0].is_refund != 0">批量退款</view>
<view class="bnt cancel" @click="allRefund" v-if="orderInfo.orderProduct[0].is_refund != 0">批量退款
</view>
<view class='bnt b-color' @click="goOrderConfirm"
v-if="orderInfo.activity_type!=1 && orderInfo.activity_type!=2 && orderInfo.activity_type!=3 && orderInfo.activity_type!=4 && orderInfo.activity_type!=10">
再次购买</view>
@ -342,7 +345,7 @@
<view class="num">{{orderInfo.verify_code}}</view>
</view>
</uni-popup>
<u-popup :show="show" bgColor='transparent' mode='center'>
<u-popup :show="show" bgColor='transparent' mode='center'>
<view class="warp">
<image @click="close" class="guanbi" src="@/static/images/guanbi.png"></image>
<image src="@/static/images/yuqi.png" mode="widthFix"></image>
@ -352,18 +355,21 @@
<button class="shouhuobtn" @click="close">知道了</button>
</view>
</u-popup>
<u-popup :show="receivingshow" bgColor='transparent' mode='center'>
<view class="warp">
<image @click="close" class="guanbi" src="@/static/images/guanbi.png"></image>
<image src="@/static/images/shouhuo.png" mode="widthFix"></image>
</view>
<view class="textp">
<h3>确认收到货了吗?</h3>
<span>此订单为先货后款订单确认收货后将开始计算结算周期为保障售后权益请检查后再确认收货</span>
<button class="shouhuobtn" @click="queding()">确认收货</button>
<view class="cle" @click="close">取消</view>
</view>
</u-popup>
<u-popup :show="receivingshow" bgColor='transparent' mode='center'>
<view class="warp">
<image @click="close" class="guanbi" src="@/static/images/guanbi.png"></image>
<image src="@/static/images/shouhuo.png" mode="widthFix"></image>
</view>
<view class="textp">
<h3>确认收到货了吗?</h3>
<span>此订单为先货后款订单确认收货后将开始计算结算周期为保障售后权益请检查后再确认收货</span>
<button class="shouhuobtn" @click="queding()">
</button>
<view class="cle" @click="close">取消</view>
</view>
</u-popup>
</view>
</template>
<script>
@ -487,7 +493,7 @@
add: false,
},
show: false,
receivingshow:false
receivingshow: false
};
},
computed: {
@ -901,28 +907,42 @@
});
});
},
//
confirmOrder: function() {
this.receivingshow=true
//
confirmOrder: function(item) {
console.log(item)
uni.showModal({
title: '取件码',
content: '5555555',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
})
return
this.receivingshow = true
},
queding() {
let that = this;
orderTake(that.order_id).then(res => {
this.receivingshow = false
return that.$util.Tips({
title: '成功收货',
icon: 'success'
}, function() {
that.getOrderInfo();
});
}).catch(err => {
this.receivingshow = false
return that.$util.Tips({
title: err
});
})
},
queding(){
let that = this;
orderTake(that.order_id).then(res => {
this.receivingshow=false
return that.$util.Tips({
title: '成功收货',
icon: 'success'
}, function() {
that.getOrderInfo();
});
}).catch(err => {
this.receivingshow=false
return that.$util.Tips({
title: err
});
})
},
/**
*
* 删除订单
@ -995,12 +1015,12 @@
});
})
},
close(){
this.show=false
this.receivingshow=false
close() {
this.show = false
this.receivingshow = false
},
open(){
this.show=true
open() {
this.show = true
}
}
}
@ -1579,40 +1599,44 @@
margin-left: 5px;
}
}
.settel-f{
.settel-f {
display: flex;
justify-content: flex-end;
}
}
.warp {
margin: auto;
.guanbi {
position: absolute;
right: 0px;
top:120rpx;
top: 120rpx;
z-index: 1;
width: 30px;
height: 30px;
}
}
.textp {
width: 320px;
padding-bottom: 20px;
position: absolute;
top: 110px;
border-radius: 10px;
span {
display: block;
width: 280px;
padding-top: 20px;
margin: auto;
}
h3 {
text-align: center;
}
h3 {
text-align: center;
}
.shouhuobtn {
margin: auto;
line-height: 54px;
@ -1623,7 +1647,7 @@
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
border-radius: 27px 27px 27px 27px;
}
.cle {
margin: auto;
text-align: center;

View File

@ -75,7 +75,7 @@
</view>
</view>
<view class="textarea">
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment"
<textarea placeholder='请输入商品描述' name="comment"
placeholder-class='placeholder' v-model="formData.content"
maxlength="600"></textarea>
</view>
@ -151,6 +151,10 @@
import {
mapGetters
} from "vuex";
import {
getCommunitygetOrderList
} from '@/api/trading-floor.js'
import authorize from '@/components/Authorize';
import avatar from "@/components/yq-avatar/yq-avatar.vue";
import associated from '@/components/shoppinglist/shoppinglist.vue';
@ -250,6 +254,7 @@
// #endif
},
onLoad(options) {
this.list()
// uni.hideTabBar()
this.id = options.id;
this.order_id = options.order_id;
@ -287,6 +292,11 @@
},
methods: {
list(){
getCommunitygetOrderList().then(res=>{
console.log(res)
})
},
onLoadFun() {
this.isShowAuth = false;
},

View File

@ -7,7 +7,7 @@
</view>
<view class="content_title">
<view class="title_one">
张三生产资料供销
{{listobj.author.nickname}}
</view>
<view class="title_two">
100+人关注 100+销量
@ -19,22 +19,23 @@
</view>
<view view class="content_top-two">
<view class="price">
100
{{listobj.total_price}}
</view>
<view class="top-two_content">
新鲜上架新鲜摘下美味到你口我们为您带来最新鲜的蔬菜从田地到餐桌健康从这里开始快来选择你的绿色盛宴吧"
{{listobj.content}}
</view>
<view class="top-two_img">
<view class="top-two_img" v-for="(item,index) in listobj.image">
<view class="">
<image :src="item" mode=""></image>
</view>
<!-- <view class="">
<image src="../../annex/static/vipBg.png" mode=""></image>
</view>
<view class="">
<image src="../../annex/static/vipBg.png" mode=""></image>
</view>
<view class="">
<image src="../../annex/static/vipBg.png" mode=""></image>
</view>
</view> -->
</view>
@ -44,52 +45,31 @@
</view>
<view class="content_middle">
<view class="middle-one">
<view class="middle-one" v-for="(item,b) in listobj.resale" :key='b'>
<view class="midding-img">
<image src="@/static/images/bg2.png" mode=""></image>
<image :src="item.spu.image" mode=""></image>
</view>
<view class="middle-one_text">
<view class="one_text_a">
良品铺子肉松饼1000g/ 面包糕...
{{item.spu.store_name}}
</view>
<view class="one_text_b">
100
{{item.price}}
</view>
<view class="one_text_c">
<view class="">
采购价:¥34.90
采购价:{{item.spu.price}}
</view>
<view class="">
数量:100
</view>
</view>
</view>
</view>
<view class="middle-one">
<view class="midding-img">
<image src="@/static/images/bg2.png" mode=""></image>
</view>
<view class="middle-one_text">
<view class="one_text_a">
良品铺子肉松饼1000g/ 面包糕...
</view>
<view class="one_text_b">
100
</view>
<view class="one_text_c">
<view class="">
采购价:¥34.90
</view>
<view class="">
数量:100
数量: {{item.number}}
</view>
</view>
</view>
</view>
</view>
<view class="content_bootm">
@ -97,7 +77,7 @@
查看TA提到的宝贝(2)
</view>
<view class="content_bootm_one">
<view class="content_bootm_one" v-for="(item,i) in listobj.resale" :key='i'>
<view class="bootm_oneimg">
<image src="@/static/images/bg2.png" mode=""></image>
</view>
@ -105,36 +85,68 @@
良品铺子肉松饼1000g/ 面包糕...
</view>
</view>
<view class="content_bootm_one">
<!-- <view class="content_bootm_one">
<view class="bootm_oneimg">
<image src="@/static/images/bg2.png" mode=""></image>
</view>
<view class="">
良品铺子肉松饼1000g/ 面包糕...
</view>
</view>
</view> -->
</view>
<view class="pay">
<view class="pay" v-if="this.detail.type==1">
<view class="pay_tilte-a">
合计: <span>200.00</span>
合计: <span>{{listobj.total_price}}</span>
</view>
<view class="pay_tilte-b">提交订单</view>
</view>
<view class="domain" v-else>
<view class="domain_tilte-a">
合计: <span>200.00</span>
</view>
<view class="domain_tilte-b">
删除
</view>
<view class="domain_tilte-c">编辑</view>
</view>
</view>
</template>
<script>
import {
getCommunityshow
} from '@/api/trading-floor.js'
export default {
data() {
return {
detail: {},
listobj: {}
}
},
onLoad(e) {
if (e) {
this.detail = JSON.parse(decodeURIComponent(e.key));
this.shopdetil(this.detail.id)
}
},
methods: {
shopdetil(id) {
getCommunityshow(id).then(res => {
if (res.data.status = 200) {
console.log(res.data)
this.listobj = res.data
}
})
}
},
onLoad() {},
methods: {},
}
</script>
@ -145,9 +157,11 @@
.content_top {
padding: 21rpx 28rpx;
background: #FFFFFF;
.content_top-one {
display: flex;
border-bottom: 1rpx solid #CCCCCC;
.content_symbol {
width: 81rpx;
height: 81rpx;
@ -313,7 +327,7 @@
.pay {
width: 100%;
height: 121rpx;
line-height:121rpx;
line-height: 121rpx;
background: #FFFFFF;
position: absolute;
bottom: 0;
@ -321,28 +335,81 @@
display: flex;
justify-content: space-between;
padding: 0 28rpx;
.pay_tilte-a{
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
span{
.pay_tilte-a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
span {
font-size: 42rpx;
font-family: PingFang SC;
font-weight: 500;
color: #F84221;
}
}
.pay_tilte-b{
.pay_tilte-b {
width: 238rpx;
height: 74rpx;
line-height:74rpx;
line-height: 74rpx;
text-align: center;
background: linear-gradient(90deg, #F98649 0%, #F34E45 100%);
border-radius: 37rpx 37rpx 37rpx 37rpx;
opacity: 1;
font-size: 32rpx;
font-family: PingFang SC;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin: auto 0;
}
}
.domain {
width: 100%;
height: 121rpx;
line-height: 121rpx;
background: #FFFFFF;
position: absolute;
bottom: 0;
position: fixed;
display: flex;
justify-content: space-between;
padding: 0 28rpx;
.domain_tilte-a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
span {
font-size: 42rpx;
font-family: PingFang SC;
font-weight: 500;
color: #F84221;
}
}
.domain_tilte-b {
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.domain_tilte-c {
width: 238rpx;
height: 74rpx;
line-height: 74rpx;
text-align: center;
background: linear-gradient(90deg, #F98649 0%, #F34E45 100%);
border-radius: 37rpx 37rpx 37rpx 37rpx;
opacity: 1;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin: auto 0;

View File

@ -0,0 +1,979 @@
<template>
<!-- #ifdef MP -->
<view :style="viewColor">
<!-- #endif -->
<!-- #ifdef APP || H5 -->
<view :style="viewColor">
<!-- #endif -->
<form @submit="formSubmit" report-submit='true'>
<view class="release_content">
<view class="release_tab acea-row">
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value"
:class="{on:tabActive == item.value}" @click="changeTab(item)">
<text class="iconfont" :class="item.icon"></text>{{item.name}}
</view>
</view>
<view>
<view class="release_item">
<view class="photo_count">
<view class="input_photo acea-row row-middle">
<block v-if="tabActive == 2">
<view class="pictrue" v-if="formData.video_link">
<view v-if="videoplay">
<video controls id="myvideo" :src="video_link"
@fullscreenchange="screenChange"></video>
</view>
<!--#ifndef APP-PLUS-->
<video class="pictrue" :src="formData.video_link"></video>
<!--#endif-->
<image class="video-bg" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png">
</image>
<view class="videoHover" @click="videoshow">
<view>
<text class="iconfont icon-24gf-play"></text>
</view>
</view>
<text class="video-text">点击可预览视频</text>
<view class="close_btn" @click="delVideo"><text
class="iconfont icon-guanbi4"></text></view>
</view>
<view v-else class="pictrue acea-row row-center-wrapper row-column add"
@click="uploadVideo">
<view><text class='iconfont icon-tianjiashipin'></text></view>
<view class="text">添加视频</view>
</view>
<view v-if="formData.image.length < 1"
class="pictrue acea-row row-center-wrapper row-column add"
@click.stop="clk">
<view><text class='iconfont icon-fengmian'></text></view>
<view class="text">添加封面</view>
</view>
</block>
<view class="pictrue" v-for="(item, index) in formData.image" :key="index">
<easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage>
<text class="cover_text" v-if="tabActive == 2">封面</text>
<view class="close_btn" @click="DelPic(index)"><text
class="iconfont icon-guanbi4"></text></view>
</view>
<block v-if="tabActive == 1">
<view v-if="formData.image.length < 6"
class="pictrue acea-row row-center-wrapper row-column add"
@click.stop="clk">
<view><text class='iconfont icon-icon25201'></text></view>
<view class="text">添加图片</view>
</view>
</block>
<view v-if="showCd" :ratio="16/9" class="container">
<bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage"
:dWidth="800" :compress="true">
<!-- 你想插入的内容 -->
<button class="crop_btn" @click="crop">裁切</button>
</bt-cropper>
</view>
</view>
</view>
<view class="textarea">
<textarea placeholder='请输入商品描述' name="comment"
placeholder-class='placeholder' v-model="formData.content"
maxlength="600"></textarea>
</view>
</view>
<view class="release_item">
<view class='item acea-row row-between-wrapper'>
<view class='name'><text
class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view>
<view class="select">
<view class="select_count" @click.stop="addProduct">
<text v-if="productList.length == 0" class="text">选择产品</text>
<view v-else class="text">
<image class="image" v-for="(item,index) in productList" :key="index"
:src="item.image || (item.spu && item.spu.image)"></image>
</view>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name' style="font-size: 28rpx;rfont-family: PingFang SC;font-weight: 400;color: #F84221;">价格{{price}}</view>
<view class="select">
<view class="select_count" @click="addprice">
<text v-if="!isshow" class="text1">点击输入价格</text>
<view v-else @click.stop="deleteTopic">
<input type="number" value="" v-model="price" placeholder="请输入价格"
style="text-align: right;font-size: 28rpx;" />
</view>
</view>
</view>
</view>
</view>
</view>
<button class="release_btn button" form-type="submit">发布</button>
</view>
</form>
<!--视频预览弹窗-->
<view v-if="showVideo" class="video-count">
<!--#ifndef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop muted :src="formData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop
:src='formData.video_link && (formData.video_link.substring(0,4) == "http" || formData.video_link.substring(0,5) == "https") ? formData.video_link : "http:" + formData.video_link'></video>
<!--#endif-->
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx"
selHeight="250upx">
</avatar>
<!-- 提到的宝贝弹窗 -->
<uni-popup ref="associated" type="bottom">
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
</uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
</view>
</template>
</m-tabbar> -->
</view>
</template>
<script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import avatar from "@/components/yq-avatar/yq-avatar.vue";
import associated from '@/components/shoppinglist/shoppinglist.vue';
import participateTopic from '@/components/participateTopic.vue';
import {
TOKENNAME,
HTTP_REQUEST_URL
} from '@/config/app.js';
import {
createPlantApi,
updatePlantApi,
plantDetailApi,
orderAssociatePlantApi
} from "@/api/community";
import {
setStorage,
getStorage
} from '@/libs/uniApi.js';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import {
configMap
} from '@/utils';
import store from '@/store';
export default {
components: {
avatar,
associated,
participateTopic,
authorize,
easyLoadimage,
mTabbar
},
data() {
return {
formData: {
image: [],
content: "",
topic_id: "",
spu_id: [],
video_link: ''
},
price:0,
imageSrc: '',
productList: [],
topicName: {},
isUpload: true,
isAuto: false, //
isShowAuth: false, //
showCd: false,
isshow: false,
id: "",
order_id: "",
imgName: "",
upload_max: 50,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
tabList: [{
name: '图文',
value: 1,
icon: 'icon-tuwen'
},
{
name: '视频',
value: 2,
icon: 'icon-shipin'
},
],
tabActive: 1,
isPlay: false,
videoContext: "",
video_link: "",
showVideo: false,
videoplay: false,
videoContext: ''
};
},
computed: {
...mapGetters(['isLogin', 'viewColor', 'uid']),
...configMap({
community_app_switch: []
})
},
watch: {
// formData:{
// handler(n){
// if(!this.id){
// setTimeout(()=>{
// setStorage('addPlant', n);
// });
// }
// },
// deep: true
// }
},
mounted() {
// #ifndef APP-PLUS
this.videoContext = uni.createVideoContext('myVideo', this);
// #endif
},
onLoad(options) {
// uni.hideTabBar()
this.id = options.id;
this.order_id = options.order_id;
// console.log("options.order_id", options.order_id)
this.tabActive = options.type || 1;
if (this.community_app_switch.length == 1) {
this.tabActive = this.community_app_switch[0]
}
if (!this.isLogin) {
this.isAuto = true;
this.isShowAuth = true
} else {
if (this.id) {
this.getDetail()
} else {
// const data = getStorage('addPlant');
// if(data){
// this.formData.content = data.content || '';
// this.formData.image = data.image || [];
// }
}
if (this.order_id) this.getOrderGoods()
}
this.videoContext = uni.createVideoContext("myvideo", this);
},
onTabItemTap() {
this.$refs.associated.close();
this.formData.content = ''
this.formData.image = []
this.formData.topic_id = ''
this.formData.spu_id = ''
this.formData.video_link = ''
this.productList = []
this.topicName = {}
},
methods: {
onLoadFun() {
this.isShowAuth = false;
},
//
authColse: function(e) {
this.isShowAuth = e;
},
/*获取图文详情*/
getDetail() {
let that = this
plantDetailApi(that.id).then(res => {
that.formData = res.data
that.productList = res.data.relevance || []
that.topicName = res.data.topic || {}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
},
/*获取关联订单商品*/
getOrderGoods() {
let that = this
orderAssociatePlantApi(that.order_id).then(res => {
that.productList = res.data || []
that.formData.spu_id = res.data.map(val => val.spu_id)
}).catch(err => {
return that.$util.Tips({
title: err
});
})
},
/*点击输入价格*/
addprice() {
this.isshow = !this.isshow
},
/*切换tab*/
changeTab(item) {
if (this.tabActive == item.value) return
this.tabActive = item.value
this.formData.image = []
},
clk() {
let that = this
uni.chooseImage({
count: 1,
sizeType: ['original'],
success: (res) => {
// console.log(res)
let tempFilePaths = res.tempFilePaths[0]
//#ifdef APP-PLUS
if (uni.getSystemInfoSync().platform == 'ios') {
that.doUpload(tempFilePaths)
} else {
let size = res.tempFiles[0].size / 1024
if (size >= 1) {
uni.compressImage({
src: tempFilePaths,
quality: 80, // jpg
success: res => {
that.imageSrc = res.tempFilePath;
that.showCd = true;
},
fail: err => {
// console.log('compressImage', tempFilePaths);
that.imageSrc = tempFilePaths
that.showCd = true
}
})
} else {
that.imageSrc = tempFilePaths
that.showCd = true
}
}
//#endif
//#ifndef APP-PLUS
that.imageSrc = tempFilePaths
that.showCd = true
//#endif
}
})
},
crop() {
uni.showLoading({
title: '',
mask: true
})
// refcropperpromise
this.$refs.cropper.crop().then(([err, res]) => {
if (!err) {
uni.hideLoading()
this.doUpload(res.tempFilePath)
} else {
uni.hideLoading()
// console.log(err)
}
})
},
loadImage() {
this.showCd = false
},
doUpload(rsp) {
let that = this
uni.showLoading({
title: '上传中',
mask: true
})
uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/upload/image/field',
filePath: rsp,
name: 'field',
formData: {
'filename': rsp,
'name': that.imgName
},
header: {
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
[TOKENNAME]: 'Bearer ' + store.state.app.token
},
success: (uploadFileRes) => {
let imgData = JSON.parse(uploadFileRes.data)
if (imgData.data.path) {
that.formData.image.push(imgData.data.path)
uni.hideLoading()
}
},
complete(res) {
let data = JSON.parse(res.data)
// that.$util.Tips({
// title: data.message
// });
}
});
},
//
uploadVideo() {
let that = this
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: res => {
if (Math.ceil(res.size / 1024) < that.upload_max * 1024) {
uni.uploadFile({
url: that.uploadUrl, //
filePath: res.tempFilePath,
name: 'file',
//
formData: {
user: 'test'
},
header: {
// #ifdef MP
'Content-Type': 'multipart/form-data',
// #endif
[TOKENNAME]: 'Bearer ' + store.state.app.token
},
success: uploadFileRes => {
let data = JSON.parse(uploadFileRes.data);
that.formData.video_link = (data.data.src);
},
complete: a => {
}
});
} else {
uni.showModal({
title: '提示',
content: `视频超出限制${that.upload_max}MB,已过滤`
});
}
},
fail: err => {
that.$util.Tips({
title: err
});
}
});
},
getImgName(name) {
this.imgName = name
},
/**删除图片*/
DelPic: function(index) {
let that = this
that.formData.image.splice(index, 1);
},
/*删除视频*/
delVideo() {
this.formData.video_link = '';
},
/*添加宝贝*/
addProduct() {
this.$refs.associated.open();
},
close() {
this.$refs.associated.close();
this.$refs.participateTopic.close();
},
/*查看视频*/
videoshow() {
this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.videoContext.play();
})
// this.video_link = this.formData.video_link;
// this.videoContext.requestFullScreen({ direction: 90 });
// this.videoContext.play(); this.videoplay = true;
},
screenChange(e) {
let fullScreen = e.detail.fullScreen; //truefalse退
// console.log(e, "qweeee========================================");
if (!fullScreen) {
this.videoplay = false
//退 this.videoplay = false; //
}
},
/*获取选中的宝贝*/
getProduct(data) {
this.productList = data;
this.formData.spu_id = data.map(val => val.spu_id)
this.$refs.associated.close();
},
/**
* 提交数据
*/
formSubmit: function(e) {
let that = this,
value = that.formData;
if (value.image.length == 0) return that.$util.Tips({
title: '请添加话题图片'
});
if (!value.content) return that.$util.Tips({
title: '请分享使用心得和体会'
});
if (that.tabActive == 2 && !value.video_link) {
return that.$util.Tips({
title: '请添加话题视频'
});
}
if (!value.category_id || !value.topic_id) {
return that.$util.Tips({
title: '请选择话题'
})
}
if (that.id) {
if (value.relevance.length) {
value.spu_id = value.relevance.map(val => (val.spu && val.spu.spu_id) || val.spu_id)
}
}
value.order_id = that.order_id
value.is_type = that.tabActive
uni.showLoading({
title: '保存中',
mask: true
})
that.id ? updatePlantApi(that.id, value).then(res => {
uni.hideLoading()
that.$util.Tips({
title: res.messge,
icon: 'success'
});
setTimeout(function() {
if (that.tabActive == 2) {
uni.navigateTo({
//#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid
//#endif
//#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid
//#endif
});
} else {
uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + res.data
.community_id + '&type=' + that
.tabActive
})
}
/**
* 将对象所有值为空
* */
/**
* 将对象所有值为空
* */
that.formData = {
image: [],
content: "",
topic_id: "",
spu_id: [],
video_link: "",
}
that.topicName = {}
}, 1000);
}).catch(err => {
return that.$util.Tips({
title: err
});
}) : createPlantApi(value).then(res => {
uni.hideLoading()
that.$util.Tips({
title: res.messge,
icon: 'success'
});
setStorage('addPlant', '');
setTimeout(function() {
if (that.tabActive == 2) {
uni.navigateTo({
//#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid
//#endif
//#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid
//#endif
});
} else {
uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + res.data
.community_id + '&type=' + that
.tabActive
})
}
/**
* 将对象所有值为空
* */
that.formData = {
image: [],
content: "",
topic_id: "",
spu_id: [],
video_link: "",
}
}, 1000);
}).catch(err => {
// console.log('aaa', value)
return that.$util.Tips({
title: err
});
})
}
}
}
</script>
<style lang="scss" scoped>
page {
background: #F5F5F5;
}
.crop_btn {
line-height: 90rpx;
height: 90rpx;
height: calc(90rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
height: calc(200rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
}
.container {
position: fixed;
top: 0;
left: 0;
z-index: 20;
width: 750rpx;
height: 100vh;
}
.release_content {
margin-top: 30rpx;
.release_tab {
border-radius: 16rpx 16rpx 0 0;
border-bottom: 1rpx solid #E4E4E4;
background: #fff;
align-items: center;
justify-content: center;
height: 86rpx;
.tab_item {
margin: 0 40rpx;
font-size: 32rpx;
color: #999;
position: relative;
line-height: 86rpx;
cursor: pointer;
&.on {
color: #E93323;
&::after {
content: "";
display: inline-block;
width: 100%;
height: 3rpx;
background: #E93323;
position: absolute;
bottom: 2rpx;
left: 0;
}
}
.iconfont {
margin-right: 10rpx;
font-size: 32rpx;
}
}
}
padding: 0 20rpx;
.release_item {
background: #ffffff;
padding: 0 30rpx;
border-radius: 10rpx;
}
.photo_count {
padding: 30rpx 0;
}
}
/deep/.input_photo .easy-loadimage,
/deep/.input_photo uni-image,
/deep/.input_photo image {
width: 180rpx;
height: 180rpx;
border-radius: 12rpx !important;
}
.input_photo .pictrue {
width: 180rpx;
height: 180rpx;
border-radius: 12rpx !important;
margin-right: 11rpx;
position: relative;
overflow: hidden;
&:nth-child(3n) {
margin-right: 0;
}
.close_btn {
width: 30rpx;
height: 30rpx;
background: rgba(0, 0, 0, .6);
border-radius: 0 12rpx 0 12rpx;
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
.iconfont {
color: #ffffff;
font-size: 12rpx;
}
}
.cover_text {
display: flex;
width: 58rpx;
height: 29rpx;
background: #E93323;
border-radius: 0px 12rpx 0px 12rpx;
position: absolute;
left: 0;
bottom: 0;
z-index: 10;
align-items: center;
justify-content: center;
font-size: 18rpx;
color: #fff;
}
}
/deep/.loading-img {
width: 180rpx;
height: 180rpx;
border-radius: 12rpx;
}
.input_photo .pictrue {
margin-bottom: 20rpx;
.videoHover {
width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
>view {
width: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
color: #ffffff;
font-size: 21rpx;
}
}
}
.video-text {
display: block;
width: 180rpx;
text-align: center;
color: #ffffff;
font-size: 18rpx;
z-index: 13;
position: absolute;
bottom: 20rpx;
}
video {
width: 180rpx;
height: 180rpx;
border-radius: 12rpx;
}
}
.input_photo .add {
background: #f6f6f6;
color: #666666;
.iconfont {
font-size: 50rpx;
}
.text {
margin-top: 20rpx;
font-size: 27rpx;
}
}
.textarea textarea {
font-size: 28rpx;
padding-bottom: 38rpx;
width: 100%;
box-sizing: border-box;
height: 400rpx;
overflow: hidden;
}
.textarea .placeholder {
color: #BBBBBB;
}
.release_item .item {
height: 106rpx;
border-bottom: 1rpx solid #eee;
position: relative;
font-size: 30rpx;
&:last-child {
border-bottom: none;
}
.name {
color: #333333;
.iconfont {
margin-right: 10rpx;
font-size: 28rpx;
}
}
.select {
color: #bbbbbb;
.select_count {
display: flex;
align-items: center;
}
.text {
margin-right: 15rpx;
display: flex;
align-items: center;
.image,
image,
uni-image {
width: 60rpx;
height: 60rpx;
margin-right: 5rpx;
}
}
.text1 {
width: 308rpx;
height: 70rpx;
line-height: 70rpx;
background: #FFFFFF;
border-radius: 7px 7px 7px 7px;
text-align: center;
opacity: 1;
border: 2rpx solid #999999;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
.iconfont {
font-size: 24rpx;
}
.text_name {
color: var(--view-theme);
padding: 5rpx 12rpx;
background: var(--view-minorColor);
border-radius: 23rpx;
font-size: 24rpx;
margin-right: 10rpx;
.icon {
color: var(--view-theme);
font-weight: bold;
font-size: 24rpx;
}
.title {
margin: 0 10rpx;
}
.iconfont {
font-size: 16rpx;
}
}
}
}
.button {
width: 710rpx;
height: 86rpx;
line-height: 86rpx;
color: #ffffff;
text-align: center;
font-size: 32rpx;
background: var(--view-theme);
border-radius: 43rpx;
}
.release_btn {
margin-top: 100rpx;
}
.video-count {
position: fixed;
width: 600rpx;
height: 500rpx;
top: 50%;
left: 50%;
margin-left: -300rpx;
margin-top: -250rpx;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
.videoLink {
width: 600rpx;
height: 500rpx;
}
}
</style>

View File

@ -295,7 +295,7 @@
.pictrue {
width: 120rpx;
height: 120rpx;
margin-bottom: 20rpx;
image {
width: 100%;
height: 100%;

View File

@ -557,7 +557,9 @@
* 去订单详情
*/
goOrderDetails: function(order_id) {
let self = this
if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情'
});
@ -565,12 +567,19 @@
uni.showLoading({
title: '正在加载',
})
openOrderSubscribe().then(() => {
uni.hideLoading();
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
})
} else if (self.orderStatus == 1) {
uni.navigateTo({
url: `/pages/order_details/stay?order_id=${order_id}&orderStatus=${self.orderStatus}`
})
} else {
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
@ -585,6 +594,13 @@
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
})
} else if (self.orderStatus == 1) {
// uni.navigateTo({
// url: '/pages/order_details/index?order_id=' + order_id
// })
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
})
} else {
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
@ -650,7 +666,7 @@
groupOrderList({
page: that.page,
limit: that.limit,
product_type:0
product_type: 0
}).then(res => {
that.isReady = true;
let list = res.data.list || [];
@ -671,7 +687,7 @@
status: that.orderStatus - 1,
page: that.page,
limit: that.limit,
product_type:0
product_type: 0
}).then(res => {
let list = res.data.list || [];
let loadend = list.length < that.limit;
@ -744,6 +760,7 @@
},
//
confirmOrder: function(item, index) {
let that = this;
uni.showModal({
title: '确认收货',
@ -755,6 +772,17 @@
title: '操作成功',
icon: 'success'
}, function() {
uni.showModal({
title: '取件码',
content: item.logistics_code,
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
})
that.orderList.splice(index, 1);
that.getOrderData();
});

View File

@ -26,7 +26,6 @@
</view>
</view>
</view>
<view class="content-one" v-else>
<view class="content-one-img">
<image src="@/static/images/bg2.png" mode="aspectFit"></image>
@ -45,10 +44,9 @@
</view>
</view>
</view>
<view class="content-two_one" v-if='this.tabTitle=="tabOne"'>
<view class="content-two-edit">
<view class="content-two-edit" @click="soldEdit">
编辑
</view>
@ -63,29 +61,29 @@
-->
</view>
<view class="content-two-three" v-if='this.tabTitle=="tabThree"'>
<view class="content-two-delete">
<view class="content-two-delete" @click="pendingDeletion">
删除
</view>
<view class="content-two-edit">
<view class="content-two-edit" @click="editReviewe">
编辑
</view>
</view>
<view class="content-two-four" v-if='this.tabTitle=="tabFour"'>
<view class="content-two-delete">
<view class="content-two-delete" @click="auditDelete">
删除
</view>
<view class="content-two-edit">
<view class="content-two-edit" @click="auditEdit">
编辑
</view>
</view>
<view class="content-two-five" v-if='this.tabTitle=="tabFive"'>
<view class="content-two-delete">
<view class="content-two-delete" @click="passDlete">
拒绝
</view>
<view class="content-two-agree">
<view class="content-two-agree" @click="passagree">
同意
</view>
</view>
@ -133,16 +131,46 @@
},
methods: {
tabClick(e) { //
console.log('你点击了【' + e.label + '】的选项卡标签', e.name)
this.activeItem = e.name; //class
this.tabTitle = e.name; //
},
//
soldEdit() {
},
//
pendingDeletion() {
},
//
editReviewe() {
},
//
auditDelete() {
},
//
auditEdit() {
},
//
passDelete() {
},
//
passagree() {
}
}
}
</script>
<style lang="scss" scoped>
.content_top {}
.content_top {
background-color: #FFFFFF;
}
.content_top {
@ -152,19 +180,20 @@
.content-content {
margin-top: 21rpx;
background: #FFFFFF;
margin-left: 28rpx;
margin-right: 28rpx;
padding: 28rpx 46rpx;
padding: 0 46rpx;
padding-top: 28rpx;
background: #FFFFFF;
border-radius: 14px 14px 14px 14px;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
position: relative;
.content-onea {
display: flex;
padding-bottom: 23rpx;
@ -173,16 +202,17 @@
height: 148rpx;
margin-right: 28rpx;
border: 1px solid;
image {
width: 148rpx;
height: 148rpx;
width: 100%;
height: 100%;
}
}
.content-one-txt {
margin-bottom: 23rpx;
.txt-b-a {
font-size: 32rpx;
font-family: PingFang SC;
@ -216,25 +246,24 @@
.content-one {
display: flex;
border-bottom: 1px solid #CCCCCC;
padding-bottom: 23rpx;
.content-one-img {
width: 148rpx;
height: 148rpx;
margin-right: 28rpx;
border: 1px solid;
image {
width: 148rpx;
height: 148rpx;
width: 100%;
height: 100%;
}
}
.content-one-txt {
margin-bottom: 23rpx;
.txt-b-a {
font-size: 32rpx;
font-family: PingFang SC;
@ -267,6 +296,8 @@
}
.content-two_one {
height: 110rpx;
position: relative;
.content-two-edit {
width: 168rpx;
@ -281,11 +312,13 @@
border-radius: 32rpx 32rpx 32rpx 32rpx;
position: absolute;
right: 28rpx;
bottom: 23rpx;
bottom: 20rpx;
}
}
.content-two-three {
height: 110rpx;
position: relative;
.content-two-edit {
width: 168rpx;
@ -321,6 +354,8 @@
}
.content-two-four {
height: 110rpx;
position: relative;
.content-two-edit {
width: 168rpx;
@ -357,6 +392,8 @@
.content-two-five {
height: 110rpx;
position: relative;
.content-two-agree {
width: 168rpx;

View File

@ -35,33 +35,44 @@
</view>
</view>
<view class="list">
<view class="item" v-for='(item,index) in datatlist' :key='index' @click="shopping">
<image class="shopimg" :src="item.img" mode="aspectFit"></image>
<view class="item" v-for='(item,index) in datatlist' :key='index' @click="shopping(item.community_id)">
<image class="shopimg" :src="item.image" mode="aspectFit"></image>
<view class="item_text">
<span>{{item.txt}}</span> {{item.name}}
<span v-if='item.is_type==3'>调货</span>
<span v-else>委托销售</span>
{{item.name}}
</view>
<view class="item_prices">
<span></span>{{item.price}}
<span></span>{{item.total_price}}
</view>
<view class="item_name">
<image class="avater" :src="item.img1" mode="aspectFit"></image>
<image class="avater" :src="item.author.avatar" mode="aspectFit"></image>
<view class="item_name_text">
{{item.adess}}
{{item.author.nickname}}
</view>
</view>
</view>
</view>
<view class="tardimg_add" @click="open">
<!-- <img src="@/static/images/trad-add.png" mode="widthFix" alt=""> -->
<image src="@/static/images/trad-add.png" mode="aspectFit"></image>
</view>
<release :isShow='visible' :bottom='true' @close="closeMadle" @cancel="cancel" @confirm="confirm"></release>
<u-loadmore :status="status" />
</view>
</template>
<script>
import {
getCommunityList,
getCommunitygetOrderList
} from '@/api/trading-floor.js'
import {
data,
methods
} from '../../../uni_modules/uview-ui/libs/mixin/mixin'
import release from '@/components/release/release.vue';
@ -71,13 +82,19 @@
},
data() {
return {
status: 'loadmore',
where: {
page: 1,
limit: 10,
status: 20,
product_type: 98,
is_type: 3,
keyword: '',
},
where1: {
page: 1,
limit: 10,
keyword: ''
},
visible: false,
num: 0,
@ -94,50 +111,62 @@
text: '打折专区'
}
],
datatlist: [{
img: require('@/static/images/2-002.png'),
txt: "调货",
name: '焦糖山核桃味瓜子90g',
price: '25.00',
// ../user_grade/images/suozi.png
img1: require('@/static/images/2-002.png'),
adess: '张三生活超市'
}, {
img: require('@/static/images/2-002.png'),
txt: "委托销售",
name: '焦糖山核桃味瓜子90g',
price: '25.00',
// ../user_grade/images/suozi.png
img1: require('@/static/images/2-002.png'),
adess: '张三生活超市'
}, {
img: require('@/static/images/2-002.png'),
txt: "打折专区",
name: '焦糖山核桃味瓜子90g',
price: '25.00',
// ../user_grade/images/suozi.png
img1: require('@/static/images/2-002.png'),
adess: '张三生活超市'
}],
datatlist:[],
recomname: '',
}
},
onLoad() {
this.getlist()
},
methods: {
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.getGoods()
},
btntap(index) {
this.num = index
this.getlist()
},
shopping(){
shopping(pid) {
let data={
type:1,
id:pid
}
console.log(data)
uni.navigateTo({
url:'/pages/trading_hall/product_details/index'
url: '/pages/trading_hall/product_details/index?key=' + encodeURIComponent(JSON.stringify(data))
})
},
open() {
this.visible = true
},
getlist(index) {
console.log(this.num)
if (this.num == 0) {
getCommunitygetOrderList(this.where).then(res => {
if (res.status == 200) {
// this.datatlist = res.data.listcons
console.log(res.data)
}
})
} else if (this.num == 1) {
getCommunityList(this.where).then(res => {
if (res.status == 200) {
this.datatlist = res.data.list
}
})
} else {
}
},
closeMadle() {
this.visible = false
@ -212,8 +241,8 @@
margin-left: 20rpx;
image {
width: 98rpx;
height: 60rpx;
width: 100%;
height: 100%;
}
}
}
@ -242,7 +271,8 @@
width: 28rpx;
height: 28rpx;
margin-left: 0rpx;
image{
image {
width: 28rpx;
height: 28rpx;
margin-left: 10rpx;
@ -258,7 +288,7 @@
display: flex;
justify-content: space-around;
padding-top: 17rpx;
font-size: 18px;
font-size: 32rpx;
background-color: #fff;
font-weight: 500;
color: #999999;
@ -285,8 +315,8 @@
height: 176rpx;
image {
width: 176rpx;
height:176rpx;
width: 100%;
width: 100%;
}
}
@ -314,7 +344,11 @@
.item_text {
width: 100%;
padding: 15px 10px 15px 10px;
padding-left: 25rpx;
padding-right: 25rpx;
margin-top: 19rpx;
margin-bottom: 20rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@ -336,7 +370,9 @@
font-size: 18px;
color: #F84221;
padding-left: 15px;
padding-bottom: 18rpx;
border-bottom: 1px solid #707070;
}
.item_name {
@ -353,17 +389,19 @@
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-top: 19rpx;
margin-right:10rpx ;
image{
width: 60rpx;
height: 60rpx;
margin-top: 19rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
display: block;
}
}
.item_name_text{
margin-top: 30rpx;
.item_name_text {
margin-top: 30rpx;
}
}
}