Commit 08e9ccdf authored by piwen's avatar piwen

Merge branch 'dev' of http://rungit.jxdsy.cn:10000/xys/lumastoreapp into dev

parents ebc1bbb6 53048dd1
...@@ -229,6 +229,7 @@ ...@@ -229,6 +229,7 @@
"navigationBarTitleText":"外卖商品列表" "navigationBarTitleText":"外卖商品列表"
} }
}, },
{ {
"path" : "pages/addEditEleProduct/addEditEleProduct", "path" : "pages/addEditEleProduct/addEditEleProduct",
"style" : { "style" : {
...@@ -363,6 +364,12 @@ ...@@ -363,6 +364,12 @@
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#FFFFFF"
} }
} }
,{
"path" : "pages/deliveryCost/deliveryCost",
"style" : {
"navigationBarTitleText": "外卖配送费设置"
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
......
<template>
<view>
<view class="addcategory">
<view class="cell_input jus-b ali-c">
<view class="lablename">基础距离:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="distance" placeholder-class='hahatext' placeholder="请设置基础距离" />
</view>
</view>
<view class="mints">
*注:基础距离单位为公里
</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">起步费用:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="basics_price" placeholder-class='hahatext' placeholder="请输入起步费用" />
</view>
</view>
<view class="mints">
*注:起步费用单位为元
</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">每公里增加费用:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="single_price" placeholder-class='hahatext' placeholder="请输入每公里增加费用" />
</view>
</view>
<view class="mints">
*注:每公里增加用单位为 公里/元
</view>
<view v-if="false">
<view class="cell_input jus-b ali-c">
<view class="lablename">是否凌晨配送:</view>
<view class="inputboxs ">
<view class="lablename" v-model="dawn"></view>
</view>
</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">基础距离:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="dawn_distance" placeholder-class='hahatext' placeholder="请设置基础距离" />
</view>
</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">起步费用:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="dawn_basics_priceP" placeholder-class='hahatext' placeholder="请输入起步费用" />
</view>
</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">每公里增加费用:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="dawn_single_price" placeholder-class='hahatext' placeholder="请输入每公里增加费用" />
</view>
</view>
</view>
<view class="cell_input jus-b ali-c">
<view class="lablename">餐盒费设置:</view>
<view class="inputboxs ">
<input type="number" class="input" value="" v-model="meals_fee_price" 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"
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:'',//凌晨每公里增加费用
}
},
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,
})
.then( res =>{
uni.showModal({
title: '提示',
content: res.msg,
})
})
uni.switchTab({
url:'/pages/index/index',
success: res => {},
fail: () => {},
complete: () => {}
});
}
}
}
</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;
}
.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;
}
}
</style>
.ProductManage{ .ProductManage{
min-height: 100vh; min-height: 100vh;
background: #F5F2F2; background: #F5F2F2;
padding-bottom: 120upx; padding-bottom: 200upx;
padding-top: 110upx; padding-top: 110upx;
} }
.projuctTab{ .projuctTab{
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
bottom:5px; bottom:5px;
right: 5px; right: 5px;
.btns{ .btns{
width:130upx; width:100upx;
height:60upx; height:60upx;
line-height: 60upx; line-height: 60upx;
text-align: center; text-align: center;
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
<view class="btns btnboxdel" @tap="tochanges(item,index)">修 改</view> <view class="btns btnboxdel" @tap="tochanges(item,index)">修 改</view>
</view> </view>
</view> </view>
<!-- <video src="" controls></video> --> <!-- <video src="" controls></video> -->
</checkbox-group> </checkbox-group>
......
...@@ -240,6 +240,19 @@ ...@@ -240,6 +240,19 @@
</navigator> </navigator>
</view> </view>
<view class="jiu_max" v-if="shop_type=='ele'">
<!-- 外卖配送费设置 -->
<navigator url="/pages/deliveryCost/deliveryCost">
<view class="jiu_min">
<view>
<image class="img" src="/static/icon/psfei.png" mode=""></image>
</view>
<view>配送费设置</view>
</view>
</navigator>
</view>
</view> </view>
<view class="BH"></view> <view class="BH"></view>
......
<template> <template>
<!-- 公告 消息 提示 页面 --> <!-- 公告 消息 提示 页面 -->
<view class="notice"> <view class="notice">
<view class="head"> <!-- <view class="head">
<view class="head_l">消息中心</view> <view class="head_l">消息中心</view>
</view> -->
<view class="toptabbar flex">
<view class="toptabbaritem flex1" :class="{active:navactive==0}" @tap="tagglenav(0)">
<view class="navnames">本店消息</view>
</view> </view>
<block v-for="(item,index) of list" :key="index"> <view class="toptabbaritem flex1" :class="{active:navactive==1}" @tap="tagglenav(1)">
<view class="navnames">平台消息</view>
</view>
</view>
<block v-if="navactive==0" v-for="(item,index) of list" :key="index">
<view class="list" @tap="todetailes">
<view class="msgboxs">
<view class="list_l twoline">{{item.title}} </view>
<view class="list_l">{{item.msg_text.content}}</view>
</view>
<view class="list_03">
<view class="list_l">{{item.day}} {{item.time}}</view>
</view>
</view>
</block>
<block v-if="navactive==1" v-for="(item,index) of listow" :key="index">
<view class="list" @tap="todetailes"> <view class="list" @tap="todetailes">
<view class="msgboxs"> <view class="msgboxs">
<view class="list_l twoline">{{item.title}} </view> <view class="list_l twoline">{{item.title}} </view>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
</template> </template>
<script> <script>
import {storeAdvices} from "@/utils/api/api.js"; import {storeAdvices,geTPublicadvices} from "@/utils/api/api.js";
import pageScrollTo from "@/components/pageScrollTo/pageScrollTo.vue" import pageScrollTo from "@/components/pageScrollTo/pageScrollTo.vue"
export default { export default {
components:{ components:{
...@@ -30,21 +50,30 @@ ...@@ -30,21 +50,30 @@
}, },
data() { data() {
return { return {
navactive:0,//tab的选中 0是添加 1是分类管理
list:[], list:[],
listow:[],
page:0,//分页 page:0,//分页
pages:0,
istoall:true,//瀑布流开关 istoall:true,//瀑布流开关
istoalls:true,//瀑布流开关
isshowtop:false, isshowtop:false,
}; };
}, },
onLoad() { onLoad() {
this.storeAdvicesfun() this.storeAdvicesfun();
this.geTPublicadvicesfun();
}, },
//下拉刷新 //下拉刷新
onPullDownRefresh(){ onPullDownRefresh(){
this.list=[]; this.list=[];
this.listow=[];
this.page=0;//分页 this.page=0;//分页
this.pages=0;//分页
this.istoall=true;//瀑布流开关 this.istoall=true;//瀑布流开关
this.istoalls=true;//瀑布流开关
this.storeAdvicesfun(); this.storeAdvicesfun();
this.geTPublicadvicesfun();
// uni.stopPullDownRefresh();//结束下拉刷新 // uni.stopPullDownRefresh();//结束下拉刷新
}, },
//处理瀑布流 //处理瀑布流
...@@ -53,6 +82,10 @@ ...@@ -53,6 +82,10 @@
if(this.istoall){ if(this.istoall){
this.storeAdvicesfun(); this.storeAdvicesfun();
};
if(this.istoalls){
this.geTPublicadvicesfun();
} }
}, },
//监听滚动 //监听滚动
...@@ -66,6 +99,10 @@ ...@@ -66,6 +99,10 @@
} }
}, },
methods:{ methods:{
//tab切换
tagglenav(numbers){
this.navactive = numbers;
},
//查看消息详情 处理消息 //查看消息详情 处理消息
todetailes(){ todetailes(){
//做不了 ~~~ //做不了 ~~~
...@@ -77,6 +114,7 @@ ...@@ -77,6 +114,7 @@
// } // }
}, },
// 本店消息
async storeAdvicesfun(){ async storeAdvicesfun(){
this.page++; this.page++;
let res = await storeAdvices({ let res = await storeAdvices({
...@@ -99,13 +137,59 @@ ...@@ -99,13 +137,59 @@
}else{ }else{
this.$api.msg(res.msg); this.$api.msg(res.msg);
} }
},
// 平台消息
async geTPublicadvicesfun(){
this.pages++;
let res = await geTPublicadvices({
page:this.pages,
});
uni.stopPullDownRefresh();//结束下拉刷新
if(res.code==0){
if(res.data){
if(res.data.length!=0){
this.listow = [...this.listow,...res.data]
}else{
this.istoalls = false;
this.$api.msg("没有更多了哦~");
}
}else{
this.istoalls = false;
this.$api.msg("没有更多了哦~");
}
}else{
this.$api.msg(res.msg);
}
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.toptabbar{
width: 100%;
height: 88upx;
background: rgba(255,255,255,1);
// padding: 0 100upx;
box-sizing: border-box;
line-height: 88upx;
.toptabbaritem{
height: 88upx;
line-height: 88upx;
text-align: center;
.navnames{
display: inline-block;
}
}
.toptabbaritem:nth-child(2){
border-left:1px solid rgba(245,241,241,1);
}
.toptabbaritem.active .navnames{
border-bottom: 2px solid $base_color;
}
}
.notice{ .notice{
.msgboxs{ .msgboxs{
......
...@@ -468,3 +468,15 @@ export function refuseEleRefund(data) ...@@ -468,3 +468,15 @@ export function refuseEleRefund(data)
{ {
return request.post("order/refuseEleRefund",data,{ noAuth : true}); return request.post("order/refuseEleRefund",data,{ noAuth : true});
} }
//设置配送费(外卖)
export function setShopDeliveryPrice(data)
{
return request.post("user/setShopDeliveryPrice",data,{ noAuth : true});
}
//平台消息
export function geTPublicadvices(data)
{
return request.post("store/geTPublicadvices",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