Commit 595101bb authored by 石家欣's avatar 石家欣

sjx

parent b2b7f626
......@@ -3,8 +3,8 @@
//"appid" : "__UNI__FC9419E",
"appid" : "__UNI__1EA80F1", //这个是 web
"description" : "",
"versionName" : "1.0.78",
"versionCode" : 178,
"versionName" : "1.0.81",
"versionCode" : 181,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
......
......@@ -63,105 +63,175 @@
<view class="mints">
*注:餐盒费分配单位为 元
</view>
<view class="submitbtns" @tap="setShop" >确认</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">起步配送费:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="nitial_delivery_fee" placeholder-class='hahatext' placeholder="请输入" />
</view>
</view>
<view class="mints">
*注:起步配送费单位为 元
</view>
<view class="submitbtns" @tap="setShop">确认</view>
</view>
</view>
</template>
<script>
import {setShopDeliveryPrice} from "@/utils/api/api.js"
import {
setShopDeliveryPrice,
getShopDeliveryPrice
} from "@/utils/api/api.js"
export default {
data() {
return {
distance:'',//基础距离
basics_price:'',//基础距离起步费用
single_price:'',//每公里增加费用
dawn:2,// 是否设置凌晨参数
dawn_distance:0,//凌晨基础距离
dawn_basics_priceP:0,//凌晨基础距离起步费用
dawn_single_price:0,//凌晨每公里增加费用
meals_fee_price:'',//凌晨每公里增加费用
distance: '', //基础距离
basics_price: '', //基础距离起步费用
single_price: '', //每公里增加费用
dawn: 2, // 是否设置凌晨参数
dawn_distance: 0, //凌晨基础距离
dawn_basics_priceP: 0, //凌晨基础距离起步费用
dawn_single_price: 0, //凌晨每公里增加费用
meals_fee_price: '', //餐盒费分配
nitial_delivery_fee: '', //起步配送费
}
},
onLoad() {
this.getShopDeliveryPriceFun();
},
methods: {
setShop(){
setShopDeliveryPrice({
distance:this.distance,
basics_price:this.basics_price,
single_price:this.single_price,
dawn:this.dawn,
dawn_distance:this.dawn_distance,
dawn_basics_priceP:this.dawn_basics_priceP,
dawn_single_price:this.dawn_single_price,
meals_fee_price:this.meals_fee_price,
setShop() {
this.setShopDeliveryPriceFun();
},
async setShopDeliveryPriceFun() {
// if(this.distance==''){
// this.$api.msg('基础距离不能为空')
// return false
// }
// if(this.basics_price==''){
// this.$api.msg('基础距离起步费用不能为空')
// return false
// }
// if(this.single_price==''){
// this.$api.msg('每公里增加费用不能为空')
// return false
// }
// if(this.meals_fee_price==''){
// this.$api.msg('餐盒费分配不能为空')
// return false
// }
// if(this.nitial_delivery_fee==''){
// this.$api.msg('起步配送费不能为空')
// return false
// }
let res = await setShopDeliveryPrice({
distance: this.distance,
basics_price: this.basics_price,
single_price: this.single_price,
dawn: this.dawn,
dawn_distance: this.dawn_distance,
dawn_basics_priceP: this.dawn_basics_priceP,
dawn_single_price: this.dawn_single_price,
meals_fee_price: this.meals_fee_price,
nitial_delivery_fee: this.nitial_delivery_fee,
})
.then( res =>{
if (res.code == 0) {
uni.showModal({
title: '提示',
content: res.msg,
})
})
uni.switchTab({
url:'/pages/index/index',
success: res => {},
fail: () => {},
complete: () => {}
});
title: '提示',
content: res.msg,
})
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index',
});
}, 600)
}
},
// 获取
async getShopDeliveryPriceFun() {
let res = await getShopDeliveryPrice({})
if (res.code == 0) {
this.distance = res.data.distance,
this.basics_price = res.data.basics_price,
this.single_price = res.data.single_price,
this.dawn = res.data.dawn,
this.dawn_distance = res.data.dawn_distance,
this.dawn_basics_priceP = res.data.dawn_basics_priceP,
this.dawn_single_price = res.data.dawn_single_price,
this.meals_fee_price = res.data.meals_fee_price,
this.nitial_delivery_fee = res.data.nitial_delivery_fee
}
}
}
}
</script>
<style lang="scss">
.addcategory{
margin: 20upx 24upx;
padding: 20upx;
padding-top: 70upx;
background-color: #FFFFFF;
border-radius: 14upx;
.mints{
margin-left: 40%;
margin-bottom: 30upx;
color: #ff6900;
font-size: 20upx;
font-weight: 500;
}
.hahatext{
font-size: 28upx;
}
.cell_input{
margin-bottom: 10upx;
height: 80upx;
line-height: 80upx;
.lablename{
height: 80upx;
line-height: 80upx;
margin-right: 20upx;
.addcategory {
margin: 20upx 24upx;
padding: 20upx;
padding-top: 70upx;
background-color: #FFFFFF;
border-radius: 14upx;
.mints {
margin-left: 40%;
margin-bottom: 30upx;
color: #ff6900;
font-size: 20upx;
font-weight: 500;
}
.inputboxs{
width: 60%;
border: 1px solid rgb(241, 241, 241);
.hahatext {
font-size: 28upx;
}
.inputboxs .input{
padding: 20upx;
.cell_input {
margin-bottom: 10upx;
height: 80upx;
line-height: 80upx;
.lablename {
height: 80upx;
line-height: 80upx;
margin-right: 20upx;
}
.inputboxs {
width: 60%;
border: 1px solid rgb(241, 241, 241);
}
.inputboxs .input {
padding: 20upx;
height: 80upx;
line-height: 80upx;
}
}
.submitbtns {
margin-top: 60upx;
background: $base_color;
color: #FFFFFF;
font-size: 32upx;
border-radius: 12upx;
height: 88upx;
line-height: 88upx;
text-align: center;
}
}
.submitbtns{
margin-top: 60upx;
background: $base_color;
color:#FFFFFF;
font-size: 32upx;
border-radius: 12upx;
height: 88upx;
line-height: 88upx;
text-align: center;
}
}
</style>
......@@ -4,15 +4,17 @@
<!-- 发货 -->
<view class="delivery fahuo yocode">
<view class="fahuobox">
<picker @change="bindPickerChange" :value="index" :range="logsitslist">
<view class="selectcell flex ali-c jus-b">
<!-- <picker @change="bindPickerChange" :value="index" :range="logsitslist"> -->
<view class="selectcell flex ali-c jus-b" @tap='pickerone'>
<view class="flex ali-c">
<image class="icons1" src="/static/news/fahuo.png" mode=""></image>
<view class="names">{{chindtext==''?'选择快递公司':chindtext}}</view>
</view>
<image class="icons2" src="/static/news/xiala.png" mode=""></image>
</view>
</picker>
<lb-picker ref="picker" :list="logsitslist" :value='chindtext' range-key="label" :props="myProps" @confirm='confirm'></lb-picker>
<!-- </picker> -->
<view class="selectcell flex ali-c jus-b">
<view class="flex ali-c">
<image class="icons3" src="/static/news/dindhao.png" mode=""></image>
......@@ -36,6 +38,10 @@
export default{
data(){
return{
myProps: {
label: 'value',
value: 'cate_id',
},
vendor:'',
logsitslist:[
"圆通速递",
......@@ -69,6 +75,13 @@
this.logisticsListfun();
},
methods:{
confirm(e){
console.log(e)
this.chindtext=e.value;
},
pickerone(){
this.$refs.picker.show() // 显示
},
async logisticsListfun(){
let res = await logisticsList({
......@@ -126,7 +139,7 @@
},
//请求end
bindPickerChange(e){
console.log(e.detail.value);
console.log(e.detail.value,'哈哈哈');
this.chindtext = this.logsitslist[e.detail.value];
},
//扫码方法
......
......@@ -45,7 +45,12 @@
//订单列表
.listorder{
margin: 20upx 24upx;
.cretime{
color: #888888;
font-size: 22upx;
font-weight: 500;
margin-bottom: 20upx;
}
//单个订单
.orderItemss{
background: #FFFFFF;
......@@ -155,4 +160,7 @@
border-top: 1px solid rgba(229,229,234,1);
padding: 20upx 0;
box-sizing: border-box;
}
.mt-20{
margin-top: 20upx;
}
\ No newline at end of file
......@@ -24,6 +24,9 @@
</view>
</view>
<view class="cretime mt-10">
下单时间:{{item.create_time}}
</view>
<view>
<!-- 列表 -->
<view class="order_body " v-for="(productList,index1) in item.products" :key="index1" >
......@@ -46,7 +49,7 @@
</view>
<view class="order_foot bodbod flex jus-e mb-20 mt-10">
<view v-if="productList.operation!=''" class="order_foot bodbod flex jus-e mb-20 mt-20">
<block v-for="(action,index) in productList.operation" :key="index">
<view class='btnss ' :data-orderid='item.order_id' :data-vendor='index1' @tap.stop="operation" :data-action='action.way' :data-is_ld='item.buytype'>{{action.name}}</view>
</block>
......
......@@ -73,7 +73,7 @@
</view>
<view class="cellitems flex ali-c jus-b">
<view class="name">创建时间</view>
<view class="vlas">¥{{logs.createtime}}</view>
<view class="vlas">{{logs.createtime}}</view>
</view>
<view class="cellitems flex ali-c jus-b" v-if="detail.status==4">
<view class="name">退款原因</view>
......
......@@ -479,4 +479,10 @@ export function setShopDeliveryPrice(data)
export function geTPublicadvices(data)
{
return request.post("store/geTPublicadvices",data,{ noAuth : true});
}
//获取配送费(外卖)
export function getShopDeliveryPrice(data)
{
return request.post("user/getShopDeliveryPrice",data,{ noAuth : true});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment