Commit d860216c authored by srf's avatar srf

srf

parent 34a2dac3
...@@ -369,6 +369,20 @@ ...@@ -369,6 +369,20 @@
"style" : { "style" : {
"navigationBarTitleText": "外卖配送费设置" "navigationBarTitleText": "外卖配送费设置"
} }
},{
"path":"pages/details/details",
"style" : {
//机型列表
"navigationBarTitleText": "大转盘",
"navigationBarBackgroundColor":"#FFFFFF"
}
},{
"path":"pages/myStore/delivery",
"style" : {
//机型列表
"navigationBarTitleText": "物流发货",
"navigationBarBackgroundColor":"#FFFFFF"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
.head {
margin: 24upx;
height: 150upx;
background-color: #ffffff;
border-radius: 10upx;
.flex1 {
margin: auto;
.head_1 {
width: 120upx;
height: 120upx;
margin: 0 40upx 0 20upx;
}
}
.head_2 {
flex: 3;
align-items: center;
justify-content: center;
.head_2_1 {
margin: 24upx 0 24upx 0;
font-size: 30upx;
font-weight: bold;
}
.head_2_2 {
font-size: 30upx;
font-weight: bold;
// display: flex;
.head_2_1 {
margin: 0 40upx 0 0;
background-color: #f64f15;
border-radius: 10upx;
padding: 4upx 10upx 4upx 10upx;
color: #ffffff;
}
}
}
}
// 2222222
.head_1 {
margin: 24upx;
.bonus {
font-size: 36upx;
font-weight: bold;
padding: 24upx;
color: #f64f15;
}
.bonus_1 {
background-color: #ffffff;
.bonus_1_1 {
padding: 20upx;
display: flex;
align-items: center;
.bonus_1_1_1{
font-size:28upx;
flex: 2;
// color: #f64f15;
font-weight: bold;
}
.bonus_1_1_1_1{
margin-left: 30upx;
flex: 4;
}
.nome{
display: none;
}
.input_1{
flex: 1;
font-size: 28upx;
font-weight: bold;
}
}
.bonus_1_2 {
padding: 20upx;
display: flex;
}
}
.input{
font-size: 28upx;
}
.bonus_2 {
height: 320upx;
background-color: #ffffff;
display: flex;
justify-content: center;
.bonus_img {
width: 100upx;
height: 80upx;
}
.bonus_2_1 {
margin: 10upx;
font-weight: bold;
font-size: 32upx;
color: rgba(102, 102, 102, 1);
}
}
}
.bonus_3 {
height: 160upx;
align-items: center;
.bonus_1_2 {
width: 50upx;
height: 50upx;
}
.bonus_3_1 {
margin-top: 10upx;
}
.bonus_3_2 {
margin: 0 20upx 0 20upx;
font-size: 32upx;
font-weight: 600;
}
}
.inputbox{
position: relative;
width:250upx;
// height:72upx;
border:1px solid rgba(181,181,181,1);
margin-left: 20upx;
.jiantouicon{
position: absolute;
top: 4px;
right: 8upx;
width: 22upx;
height: 24upx;
}
}
.bonus_4 {
height: 720upx;
background-color: #ffffff;
padding-left: 24rpx;
.box{
display: flex;
align-items: center;
.box_1{
font-size: 28upx;
// color: #f64f15;
font-weight: bold;
}
}
.box_2{
font-size:28upx;
font-weight: bold;
}
.bonus_4_1 {
padding: 20upx;
// border-bottom: 2upx solid red;
}
}
.bonus_5 {
// height: 80rpx;
line-height: 80upx;
background-color: #f64f15;
border-radius: 10upx;
text-align: center;
margin-top: 100upx;
}
.bonus_5_1 {
color: #ffffff;
font-weight: bold;
background-color: #f64f15;
}
// 列表
image {
width: 100%;
height: 100%;
}
.ali-f {
display: flex;
align-items: flex-end;
}
.goods_item {
// display: flex;
margin-bottom: 10upx;
border-radius: 14upx;
background: #ffffff;
padding: 24upx;
// box-sizing: border-box;
// margin: 80upx;
// width: 100%;
// height:506upx;
.thumbnail {
width: 200upx;
height: 200upx;
position: relative;
.pmimg {
width: 200upx;
height: 200upx;
position: absolute;
left: 10upx;
top: 0;
margin: 0 20upx 0 0;
}
}
.body_goods {
position: relative;
padding: 0 0 0 30upx;
flex: 1;
.shopname {
color: rgba(0, 0, 0, 1);
margin-bottom: 20upx;
font-weight: bold;
font-size: 32upx;
.twoline_s {
font-weight: bold;
font-size: 32upx;
margin: 0 20upx 0 0;
}
}
.flexbox {
display: flex;
align-items: center;
}
.hongkng {
font-size: 32upx;
font-weight: 500;
line-height: 32upx;
}
.hongkngs {
padding: 0 10upx;
height: 32upx;
background-color: #ff6900;
border-radius: 6upx;
font-size: 22upx;
font-weight: 400;
color: #ffffff;
line-height: 36upx;
text-align: center;
margin-right: 20upx;
margin-bottom: 10upx;
}
.gmbtnimg {
width: 36upx;
height: 36upx;
}
.gmbtn {
width: 144upx;
height: 44upx;
background: rgba(255, 0, 0, 1);
border-radius: 6upx;
font-size: 30upx;
font-weight: 400;
color: rgba(255, 255, 255, 1);
line-height: 44upx;
text-align: center;
}
.goods_foot {
position: absolute;
padding: 0 0 0 30upx;
box-sizing: border-box;
width: 100%;
bottom: 0;
left: 0;
.prciebox {
color: #f64f15;
.fuhao {
font-size: 26upx;
line-height: 110%;
}
.shuzi {
font-size: 34upx;
font-weight: bold;
line-height: 110%;
padding: 10upx 30upx 10upx 30upx;
border-radius: 10upx;
background-color: rgb(252, 204, 187);
color: #f64f15;
}
}
.xiaol {
font-size: 26upx;
color: rgba(153, 153, 153, 1);
margin-left: 10upx;
text-decoration: line-through;
line-height: 110%;
}
}
}
}
.base {
height: 100upx;
background: #ffffff;
border-radius: 6upx;
// margin: 24upx;
display: flex;
justify-content:space-between;
align-items: center;
// padding: 24upx;
font-weight: bold;
font-size: 32rpx;
.base_1{
background-color: rgb(252, 204, 187);
color: #f64f15;
padding: 10upx 30upx 10upx 30upx;
border-radius: 10upx;
}
.opa{
opacity: 0.6;
}
}
.gmbtns{
width: 160upx;
height: 50upx;
background: #f64f15;
border-radius: 6upx;
font-size: 30upx;
font-weight: 400;
color: #ffffff;
line-height: 50upx;
text-align: center;
padding: 0;
}
.message{
}
\ No newline at end of file
<template>
<view class="tabs">
<!-- <scroll-view id="tab-bar" class="scroll-h" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto">
<view v-for="(tab, index) in tabBars" :key="tab.id" class="uni-tab-item" :id="tab.id" :data-current="index" @click="ontabtap">
<text class="uni-tab-item-title" :class="tabIndex == index ? 'uni-tab-item-title-active' : ''">{{ tab.name }}</text>
</view>
</scroll-view> -->
<view class="end-title">
<!-- <view @tap="change(0)" :class="{ btna: btnnum == 0 }">我的奖券</view> -->
<view @tap="change(1)" :class="{ btna: btnnum == 1 }">发布活动</view>
<view @tap="change(2)" :class="{ btna: btnnum == 2 }">已发布活动</view>
<view @tap="change(3)" :class="{ btna: btnnum == 3 }">中奖专区</view>
</view>
<view class="line-h"></view>
<!-- 111111 -->
<!-- <view class="head flex" v-show="btnnum == 0" v-for="(item,index) in sample" :key="index">
<view class="flex1"><image class="head_1" src="../../static/Course/oppoicon.png" mode=""></image></view>
<view class="head_2">
<view class="head_2_1">已购买{{item.num}}张抽奖券</view>
<view class="head_2_2 jus-b">
<view>已使用{{item.use_number}}</view>
<view class="head_2_1">再次购买</view>
</view>
</view>
</view> -->
<!-- 2222222 -->
<view class="head_1" v-show="btnnum == 1">
<!-- <form @submit="formSubmit"> -->
<view data-var="0">
<view style="display: flex;justify-content: space-between;align-items: center;font-weight: bold;font-size: 16px;">
<view class="bonus">奖项一</view>
<!-- <view data-num=0 @tap="switching">关闭奖项</view> -->
</view>
<view class="bonus_1">
<view class="bonus_1_1">
<view class="bonus_1_1_1">奖品名称</view>
<view class="bonus_1_1_1_1"><input class="input" type="text" name="name_1" v-model="prize[0].title" placeholder="请输入奖品名称" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖名额</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_2" v-model="prize[0].num" placeholder="请输入中奖名额" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖概率</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_3" v-model="prize[0].proportion" placeholder="请输入中奖概率" /></view>
<view class="input_1">%</view>
</view>
<view class="line-h"></view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否为奖品</view>
<switch checked @change="switch1" />
<view class="bonus_1_1_1_1 nome"><input class="input" type="text" name="name_4" :value="this.prize[0].status" placeholder="" /></view>
</view>
</view>
</view>
<view class="bonus_2">
<robby-image-upload
fileKeyName="img"
:value="c_pics"
:server-url="uploadurl1 + '/merchant.php/FileUpload/uploadify'"
:form-data="c_formData"
:server-url-delete-image="uploadurl1"
@delete="c_delImage"
@add="c_onImg"
@move="onMove_c"
:limit="1"
></robby-image-upload>
<!-- <view> -->
<!-- <view class="jus-c"><image class="bonus_img" style="margin: auto;" src="../../static/picture.png" mode=""></image></view> -->
<!-- <view class="">请添加奖品图片</view> -->
<!-- </view> -->
</view>
</view>
<!-- 二 -->
<view>
<view style="display: flex;justify-content: space-between;align-items: center;font-weight: bold;font-size: 16px;">
<view class="bonus">奖项二</view>
<!-- <view data-num=1 @tap="switching">关闭奖项</view> -->
</view>
<view class="bonus_1">
<view class="bonus_1_1">
<view class="bonus_1_1_1">奖品名称</view>
<view class="bonus_1_1_1_1"><input class="input" type="text" name="name_5" v-model="prize[1].title" placeholder="请输入奖品名称" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖名额</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_6" v-model="prize[1].num" placeholder="请输入中奖名额" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖概率</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_7" v-model="prize[1].proportion" placeholder="请输入中奖概率" /></view>
<view class="input_1">%</view>
</view>
<view class="line-h"></view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否为奖品</view>
<switch checked @change="switch2" />
<view class="bonus_1_1_1_1 nome"><input class="input" type="text" name="name_8" :value="this.prize[1].status" placeholder="" /></view>
</view>
</view>
</view>
<view class="bonus_2">
<robby-image-upload
fileKeyName="img"
:value="c_picss"
:server-url="uploadurl1 + '/merchant.php/FileUpload/uploadify'"
:form-data="c_formData"
:server-url-delete-image="uploadurl1"
@delete="c_delImage"
@add="c_onImgs"
@move="onMove_c"
:limit="1"
></robby-image-upload>
<!-- <view>
<view class="jus-c"><image class="bonus_img" style="margin: auto;" src="../../static/picture.png" mode=""></image></view>
<view class="bonus_2_1">请添加奖品图片</view>
</view> -->
</view>
</view>
<!-- 3333333 -->
<view class="beack">
<view>
<view style="display: flex;justify-content: space-between;align-items: center;font-weight: bold;font-size: 16px;">
<view class="bonus">奖项三</view>
<!-- <view data-num=2 @tap="switching">关闭奖项</view> -->
</view>
<view class="bonus_1">
<view class="bonus_1_1">
<view class="bonus_1_1_1">奖品名称</view>
<view class="bonus_1_1_1_1"><input class="input" type="text" name="name_9" v-model="prize[2].title" placeholder="请输入奖品名称" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖名额</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_10" v-model="prize[2].num" placeholder="请输入中奖名额" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖概率</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_11" v-model="prize[2].proportion" placeholder="请输入中奖概率" /></view>
<view class="input_1">%</view>
</view>
<view class="line-h"></view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否为奖品</view>
<switch checked @change="switch3" />
<view class="bonus_1_1_1_1 nome"><input class="input" type="text" name="name_12" :value="this.prize[2].status" placeholder="" /></view>
</view>
</view>
</view>
<view class="bonus_2">
<robby-image-upload
fileKeyName="img"
:value="c_picsss"
:server-url="uploadurl1 + '/merchant.php/FileUpload/uploadify'"
:form-data="c_formData"
:server-url-delete-image="uploadurl1"
@delete="c_delImage"
@add="c_onImgss"
@move="onMove_c"
:limit="1"
></robby-image-upload>
<!-- <view>
<view class="jus-c"><image class="bonus_img" style="margin: auto;" src="../../static/picture.png" mode=""></image></view>
<view class="bonus_2_1">请添加奖品图片</view>
</view> -->
</view>
</view>
</view>
<!-- 444444 -->
<view class="beack">
<view>
<view style="display: flex;justify-content: space-between;align-items: center;font-weight: bold;font-size: 16px;">
<view class="bonus">奖项四</view>
<!-- <view data-num=3 @tap="switching">关闭奖项</view> -->
</view>
<view class="bonus_1">
<view class="bonus_1_1">
<view class="bonus_1_1_1">奖品名称</view>
<view class="bonus_1_1_1_1"><input class="input" type="text" name="name_13" v-model="prize[3].title" placeholder="请输入奖品名称" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖名额</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_14" v-model="prize[3].num" placeholder="请输入中奖名额" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖概率</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_15" v-model="prize[3].proportion" placeholder="请输入中奖概率" /></view>
<view class="input_1">%</view>
</view>
<view class="line-h"></view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否为奖品</view>
<switch checked @change="switch4" />
<view class="bonus_1_1_1_1 nome"><input class="input" type="text" name="name_16" :value="this.prize[3].status" placeholder="" /></view>
</view>
</view>
</view>
<view class="bonus_2">
<robby-image-upload
fileKeyName="img"
:value="c_picssss"
:server-url="uploadurl1 + '/merchant.php/FileUpload/uploadify'"
:form-data="c_formData"
:server-url-delete-image="uploadurl1"
@delete="c_delImage"
@add="c_onImgsss"
@move="onMove_c"
:limit="1"
></robby-image-upload>
<!-- <view>
<view class="jus-c"><image class="bonus_img" style="margin: auto;" src="../../static/picture.png" mode=""></image></view>
<view class="bonus_2_1">请添加奖品图片</view>
</view> -->
</view>
</view>
</view>
<!-- 55555 -->
<view v-show="additio == 3 || additio == 4">
<view>
<view style="display: flex;justify-content: space-between;align-items: center;font-weight: bold;font-size: 16px;">
<view class="bonus">奖项五</view>
<!-- <view data-num=4 @tap="switching">关闭奖项</view> -->
</view>
<view class="bonus_1">
<view class="bonus_1_1">
<view class="bonus_1_1_1">奖品名称</view>
<view class="bonus_1_1_1_1"><input class="input" type="text" name="name_17" v-model="prize[4].title" placeholder="请输入奖品名称" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖名额</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_18" v-model="prize[4].num" placeholder="请输入中奖名额" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖概率</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_19" v-model="prize[4].proportion" placeholder="请输入中奖概率" /></view>
<view class="input_1">%</view>
</view>
<view class="line-h"></view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否为奖品</view>
<switch checked @change="switch5" />
<view class="bonus_1_1_1_1 nome"><input class="input" type="text" name="name_20" :value="this.prize[4].status" placeholder="" /></view>
</view>
</view>
</view>
<view class="bonus_2">
<robby-image-upload
fileKeyName="img"
:value="c_picsssss"
:server-url="uploadurl1 + '/merchant.php/FileUpload/uploadify'"
:form-data="c_formData"
:server-url-delete-image="uploadurl1"
@delete="c_delImage"
@add="c_onImgssss"
@move="onMove_c"
:limit="1"
></robby-image-upload>
<!-- <view>
<view class="jus-c"><image class="bonus_img" style="margin: auto;" src="../../static/picture.png" mode=""></image></view>
<view class="bonus_2_1">请添加奖品图片</view>
</view> -->
</view>
</view>
</view>
<!-- 66666 -->
<view :class="{ beack: additio == 4 }" class="nome">
<view>
<view style="display: flex;justify-content: space-between;align-items: center;font-weight: bold;font-size: 16px;">
<view class="bonus">奖项六</view>
<!-- <view data-num=5 @tap="switching">关闭奖项</view> -->
</view>
<view class="bonus_1">
<view class="bonus_1_1">
<view class="bonus_1_1_1">奖品名称</view>
<view class="bonus_1_1_1_1"><input class="input" type="text" name="name_21" v-model="prize[5].title" placeholder="请输入奖品名称" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖名额</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_22" v-model="prize[5].num" placeholder="请输入中奖名额" /></view>
<view class="input_1"></view>
</view>
<view class="line-h"></view>
<view class="bonus_1_1">
<view class="bonus_1_1_1">中奖概率</view>
<view class="bonus_1_1_1_1"><input class="input" type="number" name="name_23" v-model="prize[5].proportion" placeholder="请输入中奖概率" /></view>
<view class="input_1">%</view>
</view>
<view class="line-h"></view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否为奖品</view>
<switch checked @change="switch6" />
<view class="bonus_1_1_1_1 nome"><input class="input" type="text" name="name_24" :value="this.prize[5].status" placeholder="" /></view>
</view>
</view>
</view>
<view class="bonus_2">
<robby-image-upload
fileKeyName="img"
:value="c_picssssss"
:server-url="uploadurl1 + '/merchant.php/FileUpload/uploadify'"
:form-data="c_formData"
:server-url-delete-image="uploadurl1"
@delete="c_delImage"
@add="c_onImgsssss"
@move="onMove_c"
:limit="1"
></robby-image-upload>
<!-- <view>
<view class="jus-c"><image class="bonus_img" style="margin: auto;" src="../../static/picture.png" mode=""></image></view>
<view class="bonus_2_1">请添加奖品图片</view>
</view> -->
</view>
</view>
</view>
<view class="jus-c bonus_3" @tap="addition">
<view class="bonus_3_1"><image class="bonus_1_2" src="../../static/attachment.png" mode=""></image></view>
<view class="bonus_3_2">添加更多奖项</view>
</view>
<view class="bonus_4">
<view class="box">
<view class="box_1">请填写活动名称:</view>
<view class="bonus_4_1" style="width: 400upx;text-align: center;">
<input class="input" type="text" v-model="diameter.name" placeholder="请输入活动名称" />
</view>
<!-- <view class="box_2"></view> -->
</view>
<view class="line-h"></view>
<view class="box">
<view class="box_1">满足抽奖资格金额:</view>
<view class="bonus_4_1" style="width: 240upx;text-align: center;">
<input class="input" type="number" v-model="diameter.condition_money" placeholder="例:满100元" />
</view>
<view class="box_2"></view>
</view>
<!-- <view class="bonus_4_1"><input class="input" type="text" name="name_14" placeholder="请设置抽奖金额条件(例:满100元即可抽奖)" /></view> -->
<view class="line-h"></view>
<!-- <view class="bonus_4_1"><input class="input" type="text" name="name_15" placeholder="满()元即可抽奖" /></view>
<view class="line-h"></view> -->
<!-- <view class="box">
<view class="box_1">请设置抽奖满足金额</view>
<view class="bonus_4_1" style="width: 240upx;text-align: center;">
<input class="input" type="number" name="name_15" placeholder="例:20元" />
</view>
<view class="box_2"></view>
</view>
<view class="line-h"></view> -->
<!-- 领取结束时间 -->
<view class="box">
<view class="box_1">活动领取结束时间:</view>
<view class="bonus_4_1" style="width: 240upx;text-align: center;">
<input class="input" type="number" v-model="diameter.receive_endtime" placeholder="例:20小时" />
</view>
<view class="box_2">小时</view>
</view>
<view class="line-h"></view>
<!-- 时间选择 -->
<view style="display: flex;padding:20upx 20upx 20upx 0;">
<view class="title" style="flex:3;font-size: 28upx;font-weight: bold;margin:auto;">活动时间:</view>
<view class="inputbox" style="flex:4;border: 1upx solid rgba(102,102,102,1);text-align: center;margin: auto;" @tap="showtime(1)">
<input type="text" class="inputs" value="" v-model="diameter.start_time" disabled="disabled" placeholder="开始时间" placeholder-class="plclass" />
<image class="jiantouicon" v-show="parameter.start_time == ''" src="../../static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
<view style="margin-left: 10;line-height:50upx;">-</view>
<view class="inputbox" style="flex:4;border: 1upx solid rgba(102,102,102,1);text-align: center;margin: auto;" @tap="showtime(2)">
<input type="text" class="inputs" value="" v-model="diameter.end_time" disabled="disabled" placeholder="结束时间" placeholder-class="plclass" />
<image class="jiantouicon" v-show="parameter.start_time == ''" src="../../static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</view>
<!-- <view class="bonus_4_1"><input class="input" type="text" name="name_15" placeholder="请填写活动到期时间(例:2020-8-31 13:00)" /></view> -->
<view class="line-h"></view>
<view style="font-size: 28upx;font-weight: bold;margin: 10px 0 10px 0;">活动描述</view>
<textarea v-model="diameter.content" style="height:300upx;width:660upx ;" placeholder="请输入活动描述"></textarea>
</view>
<view class="uni-list" style="padding: 24upx 0 24upx 0;">
<view class="uni-list-cell uni-list-cell-pd jus-b">
<view class="uni-list-cell-db " style="font-size:28upx;font-weight: bold;margin: 0 20upx 0 20upx;">是否开启活动</view>
<switch checked @change="switch1Change" />
</view>
</view>
<view class="bonus_5"><button class="bonus_5_1" @tap="formSubmi" v-show="diameter.status == 2">确认发布</button></view>
<!-- </form> -->
</view>
<!-- 333333 -->
<view class="head_2" v-show="btnnum == 2">
<view class="goods_item" v-for="(item, index) in published" :key="index">
<view v-for="(ind, index) in item.prize" :key="index" style="display: flex;margin: 40upx 0 40upx 0;padding-bottom:40upx;">
<view class="thumbnail">
<view class="pmimg"><image :src="staticUrl + ind.pic" mode=""></image></view>
</view>
<view class="body_goods">
<view class="shopname twoline">
<text class="twoline_s">{{ ind.title }}</text>
<text v-if="ind.num > 0">中奖名额{{ ind.num }}</text>
</view>
<!-- <view class="flex"><view class="hongkng">一等奖 中奖名额 2名 3500</view></view> -->
<view class="goods_foot flex ali-f jus-b">
<view class="prciebox flex ali-f"><view class="shuzi">奖品</view></view>
<view class="gmbtn" v-if="ind.use_number > 0">已中{{ ind.use_number }}</view>
</view>
</view>
</view>
<view class="base" v-show="published.length > 0">
<view>
活动到期时间
<text style="margin: 0 18upx 0 40upx;">{{ item.end_time }}</text>
</view>
<view class="base_1" :class="{ opa: item.status == 1 }" :data-id="item.id" v-show="item.status == 1" @tap="showstatus">已关闭活动</view>
<view class="base_1" :data-id="item.id" v-show="item.status == 2" @tap="showstatus">已开启活动</view>
<view class="base_1" :data-id="item.id" v-show="item.status == 3">已结束</view>
<!-- <view class="base_1" else>活动已关闭</view> -->
</view>
</view>
</view>
<!-- 444444 -->
<view class="head_2" v-show="btnnum == 3">
<view class="goods_item" style="display: flex;" v-for="(item, index) in winning" :key="index">
<view class="thumbnail">
<view class="pmimg"><image :src="staticUrl + item.prize_pic" mode=""></image></view>
</view>
<view class="body_goods">
<view class="shopname twoline jus-b">
<view>
<text class="twoline_s">{{ item.prize_title }}</text>
</view>
<view class="gmbtns" v-if="item.order_status == 1" @tap="express" :data-order_id="item.order_id">待领奖</view>
<view class="gmbtns" v-if="item.order_status == 3" @tap="express" :data-order_id="item.order_id">待收货</view>
<view class="gmbtns" v-if="item.order_status == 4" @tap="express" :data-order_id="item.order_id">已完成</view>
</view>
<view style="font-size: 30upx;font-weight: bold;">{{ item.nickname }} {{ item.mobile }}</view>
<!-- <view class="flex"><view class="hongkng">一等奖 中奖名额 2名 3500</view>
</view> -->
<view class="goods_foot flex ali-f jus-b">
<view class="prciebox flex ali-f"><view class="shuzi">奖品</view></view>
<!-- <view class="gmbtns" v-if="item.order_status==1" @tap="express" :data-order_id="item.order_id">待领奖</view> -->
<view class="gmbtns" style="background-color: red;" v-if="item.order_status == 2" @tap="express" :data-order_id="item.order_id">发货</view>
<!-- <view class="gmbtns" v-if="item.order_status==3" @tap="express" :data-order_id="item.order_id">待收货</view>
<view class="gmbtns" v-if="item.order_status==4" @tap="express" :data-order_id="item.order_id">已完成></view> -->
</view>
</view>
</view>
</view>
<!-- 时间弹窗 -->
<w-picker
mode="range"
startYear="2019"
endYear="2025"
:defaultVal="defaultVal"
:current="true"
@confirm="onConfirm"
:selectList="[]"
themeColor="#f64f15"
ref="picker"
></w-picker>
</view>
</template>
<script>
// import easyupload from '@/components/easy-upload/easy-upload.vue';
import robbyImageUpload from '@/components/plan-image-upload/up_img'; //上传资质图片组件
import wPicker from '@/components/w-picker/w-picker.vue'; //时间弹窗
import { addTurntableActivity, getTurntableActivityList, getShopLuckDrawList, getBuyRecord, setTurntableActivityStatus } from '@/utils/api/merchant.js';
// 缓存每页最多
const MAX_CACHE_DATA = 100;
// 缓存页签数量
const MAX_CACHE_PAGE = 3;
export default {
components: {
// easyupload,
robbyImageUpload,
wPicker
},
data() {
return {
targets:[],
prize: [
{ title: '', num: '', proportion: '',status:1 },
{ title: '', num: '', proportion: '',status:1 },
{ title: '', num: '', proportion: '',status:1 },
{ title: '', num: '', proportion: '',status:1 },
{ title: '', num: '', proportion: '',status:1 },
{ title: '', num: '', proportion: '',status:1 ,},
],
shop_id: '',
statuslist: [],
sample: [], //抽奖劵
isoneload: true, //是否第一次加载进来
id: '',
status: 2,
// 已发布活动
published: [],
// 中奖
winning: [],
radioItems: [
{
name: 'USA',
value: '美国'
},
{
name: 'CHN',
value: '中国',
checked: 'true'
}
],
btnnum: 1,
scrollTop: '',
isshowtop: false,
page: 0, //中奖区
page_1: 0, //中奖区
page_2: 0, //中奖区
shopdata: {}, //传送数据
//时间弹窗
selectList: [],
defaultVal: [],
c_pics: [], //主图的数据
newsList: [],
cacheTab: [],
fromname: [],
index: 0,
c_picss: [],
c_picsss: [],
c_picssss: [],
c_picsssss: [],
c_picssssss: [],
diameter: {
name: '',
condition_money: '',
receive_endtime: '',
start_time: '',
end_time: '',
content: '',
status: 2,
condition_list: []
},
c_photos: [], //主图的数据 单张的 存储数据 提交的数据需要转换
additio: 2,
tabIndex: 1,
//表单提交的参数
parameter: {
end_time: '', //结束时间
start_time: '' //开始时间
},
tabBars: [
{
name: '我的奖券',
id: 'guanzhu'
},
{
name: '发布活动',
id: 'tuijian'
},
{
name: '已发布活动',
id: 'tiyu'
},
{
name: '中奖专区',
id: 'redian'
}
],
scrollInto: '',
showTips: false,
navigateFlag: false,
pulling: false,
order_id: ''
// vendor:""
};
},
//监听滚动
onPageScroll(e) {
this.scrollTop = e.scrollTop;
// console.log(e.scrollTop)
//处理返回顶部
},
computed: {
uploadurl1() {
return this.$store.state.uploadurl1;
},
staticUrl() {
//静态资源地址
return this.$store.state.staticUrl;
},
//上传图片传的参数
c_formData() {
let obj = {
model: 'goods',
user_token: this.$store.state.token
};
return obj;
}
},
//下拉刷新事件
onPullDownRefresh() {
this.winning = [];
this.page = 0;
this.getShopLuckDrawList();
},
//滚动到最底部 加载更多
onReachBottom() {
// console.log('11');
if (this.btnnum == 3) {
if (!this.isallshow) {
this.getShopLuckDrawList();
}
}
},
onShow() {
// this.addTurntableActivity();
// this.getTurntableActivityList();
// this.getShopLuckDrawList();
// this.getBuyRecord()
},
onLoad(e) {
console.log(e);
// this.btnnum ="3"
this.shop_id = e.shop_id;
// this.setTurntableActivityStatus();
// this.getTurntableActivityList();
// this.getShopLuckDrawList();
// var d = new Date();
// this.defaultVal = [(d.getFullYear()).toString(),(d.getMonth()+1).toString()]
// this.defaultVal= [(d.getFullYear()).toString(),(d.getMonth()+1).toString(),'01','-',(d.getFullYear()).toString(),(d.getMonth()+1).toString(),'01'];
// setTimeout(() => {
// this.tabBars.forEach(tabBar => {
// this.newsList.push({
// data: [],
// isLoading: false,
// refreshText: '',
// loadingText: '加载更多...'
// });
// });
// // this.getList(0);
// }, 350);
},
// 66666
methods: {
// 跳转发快递订单 ok
express(e) {
console.log(e);
let num = e.currentTarget.dataset.order_id;
this.winning.map((item, index, arr) => {
if (num == item.order_id) {
console.log(item);
uni.redirectTo({
url: '/pages/myStore/delivery?order_id=' + item.order_id + '&shop_id=' + this.shop_id
});
}
});
},
totop() {
uni.pageScrollTo({
scrollTop: 0,
duration: 200
});
},
switch6(e) {
console.log(e);
if (e.target.value == true) {
this.prize[5].status = 1;
} else {
this.prize[5].status = 2;
}
},
switch5(e) {
console.log(e);
if (e.target.value == true) {
this.prize[4].status = 1;
} else {
this.prize[4].status = 2;
}
},
switch4(e) {
console.log(e);
if (e.target.value == true) {
this.prize[3].status = 1;
} else {
this.prize[3].status = 2;
}
},
switch3(e) {
console.log(e);
if (e.target.value == true) {
this.prize[2].status = 1;
} else {
this.prize[2].status = 2;
}
},
switch2(e) {
console.log(e);
if (e.target.value == true) {
this.prize[1].status = 1;
} else {
this.prize[1].status = 2;
}
},
switch1(e) {
console.log(e);
if (e.target.value == true) {
this.prize[0].status = 1;
} else {
this.prize[0].status = 2;
}
},
switching(e) {
// console.log(this.shopdata)
// this.shopdata.map((item, index, arr) => {
// if(item.title==""){
// arr.splice(index,1)
// console.log("哈哈",arr)
// }
// })
},
// 9999999
showstatus(e) {
// this.getTurntableActivityList()
let num = e.currentTarget.dataset.id;
this.published.map((item, index, arr) => {
if (num == item.id) {
console.log(item);
console.log(this.published[index].status);
if (item.status == 1) {
item.status = 2;
} else {
item.status = 1;
}
this.id = item.id;
this.status = item.status;
this.setTurntableActivityStatus();
}
});
console.log(e, this.id, this.status);
},
radioChange: function(e) {
var checked = e.detail.value;
console.log(checked);
},
change(e) {
console.log(e);
this.btnnum = e;
// if(e==1){
// this.addTurntableActivity();
// }
if (e == 2) {
this.getTurntableActivityList();
} else if (e == 3) {
this.getShopLuckDrawList();
}
},
// 77777
switch1Change: function(e) {
console.log(e.target.value);
if (e.target.value == true) {
this.diameter.status = 2;
// this.addTurntableActivity();
} else {
this.diameter.status = 1;
// this.formSubmit()
// this.addTurntableActivity();
}
},
onConfirm(e) {
console.log(e);
this.diameter.start_time = e.checkArr[0] + '-' + e.checkArr[1] + '-' + e.checkArr[2];
this.diameter.end_time = e.checkArr[3] + '-' + e.checkArr[4] + '-' + e.checkArr[5];
},
showtime() {
this.$refs.picker.show();
},
hiddetime() {
this.$refs.picker.hide();
},
addition() {
this.additio += 1;
console.log(this.additio);
if (this.additio > 4) {
this.additio = 4;
uni.showToast({
title: '没有更多了...',
duration: 2000
});
}
},
//图片上传
c_delImage(e) {
console.log(e, '哈哈');
let arr = [];
// for (let k in e.allImages) {
// arr[k] = e.allImages[k].id
// }
this.c_photos = arr;
},
c_onImg(e) {
console.info(e);
this.c_pics = e.allImages;
const obj = e.allImages;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[index] = id;
}
console.info(this.c_photos);
},
c_onImgs(e) {
console.info(e);
this.c_picss = e.allImages;
const obj = e.allImages;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[1] = id;
}
console.info(this.c_photos);
},
c_onImgss(e) {
console.info(e);
this.c_picsss = e.allImages;
const obj = e.allImages;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[2] = id;
}
console.info(this.c_photos);
},
c_onImgsss(e) {
console.info(e);
this.c_picssss = e.allImages;
const obj = e.allImages;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[3] = id;
}
console.info(this.c_photos);
},
c_onImgssss(e) {
console.info(e);
this.c_picsssss = e.allImages;
const obj = e.allImages;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[4] = id;
}
console.info(this.c_photos);
},
c_onImgsssss(e) {
console.info(e);
this.c_picssssss = e.allImages;
const obj = e.allImages;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[5] = id;
}
console.info(this.c_photos);
},
onMove_c(e) {
console.log(e);
this.c_pics = e;
const obj = e;
for (let index in obj) {
let id = obj[index].data;
this.c_photos[index] = id;
}
},
successvideo(e) {
console.log(e);
},
// 66666666666
formSubmi: function(e) {
// this.fromname = e.detail.value;
// let formdata = this.fromname;
// console.log(this.prize)
console.log(e);
// let formdat = []; //对象转成后的数组["邱艺","1","邱艺2","1"]
// for (let i in formdata) {
// formdat.push(formdata[i]);
// }
// // console.log(formdat,'111111111111111')
// let form = []; //将数组转为对象类型的数组
// for (let i = 0; i < 24; i++) {
// if (i % 4 == 0) {
// //每两个值一组
// let js = {
// title: '',
// num: '',
// proportion: '',
// status: ''
// };
// js.title = formdat[i]; //第一个值
// js.num = formdat[i + 1]; //第二个值
// js.proportion = formdat[i + 2]; //第二个值
// js.status = formdat[i + 3]; //第三个值
// // js.name_5= formdat[i + 4]; //第三个值
// console.log(js,'aaaaaa')
// form.push(js);
// }
// // console.log(form)
// };
// console.log(form)
// let form = this.prize;
// console.log(this.prize);
// console.log(this.shop_id);
// console.log(form);
console.log(this.shopdata, '卧槽');
console.log(this.prize, '卧槽');
// this.shopdata==this.prize;
let target=JSON.parse(JSON.stringify(this.prize));
console.log(target);
target[0].pic = this.c_photos[0] ? this.c_photos[0] : '';
target[1].pic = this.c_photos[1] ? this.c_photos[1] : '';
target[2].pic = this.c_photos[2] ? this.c_photos[2] : '';
target[3].pic = this.c_photos[3] ? this.c_photos[3] : '';
target[4].pic = this.c_photos[4] ? this.c_photos[4] : '';
target[5].pic = this.c_photos[5] ? this.c_photos[5] : '';
target.map((item, index) => {
item.shop_id = this.shop_id;
});
console.log(target, 'aaa卧槽');
if (this.shopdata.length != 0) {
for(let i=target.length-1;i>=0;i--){
console.log("啧啧")
if (target[i].proportion == "" && target[i].title == "" && target[i].num == "") {
console.log(i,"哈哈");
target.splice(i, 1);
}
}
console.log(target)
}
console.info(target)
if (target.length == 0) {
uni.showModal({
title: '提示',
content: '请填写内容',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// uni.showToast({
// title: '请填写内容',
// duration: 2000
// });
} else {
let nums = 0;
target.forEach((item, index) => {
if (item.title == '' || item.proportion == '' || item.num == '' || item.pic == '') {
console.log('啊啊啊啊');
uni.showModal({
title: '提示',
content: '有奖项未填写完整',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// uni.showToast({
// title: '奖项未填写完整',
// duration: 2000
// });
} else {
nums++;
console.log(target)
this.targets=target
if (nums == target.length) {
this.addTurntableActivity();
}
}
});
}
// console.log(this.shopdata, this.shopdata.length);
},
// 77777
async addTurntableActivity() {
// console.log(this.shopdata);
if(this.diameter.start_time==""||this.diameter.end_time==""){
uni.showModal({
title: '提示',
content: '请选择活动时间',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// uni.showToast({
// title: '请选择活动时间',
// duration: 2000
// });
}
else if(this.diameter.start_time==this.diameter.end_time){
console.log("hah")
uni.showModal({
title: '提示',
content: '活动开始与结束相同',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// uni.showToast({
// title: '开始与结束相同',
// duration: 2000
// });
}else{
let param = {
prize:this.targets,
name: this.diameter.name,
condition_money: Math.floor(this.diameter.condition_money),
receive_endtime: Math.floor(this.diameter.receive_endtime),
start_time: this.diameter.start_time,
end_time: this.diameter.end_time,
content: this.diameter.content,
status: this.diameter.status
};
console.log(this.shopdata);
let res = await addTurntableActivity(param);
uni.showToast({
title: res.msg,
duration: 2000
});
if (res.code == 0) {
if (this.scrollTop > 1500) {
this.totop();
}
console.log('哈哈');
this.btnnum = 2;
this.getTurntableActivityList();
}
}
},
// 8888
// 奖品专区
async getTurntableActivityList() {
let param = {
shop_id: this.shop_id,
page: this.page_1
};
let res = await getTurntableActivityList(param);
// uni.hideLoading();//结束加载
// this.isshowloading = false;
// this.shop_list = [...this.shop_list,...res.data];//列表
// // console.log(this.shop_list)
// uni.stopPullDownRefresh();//关闭下拉刷新
// if(res.data.length==0){
// this.$api.msg("没有更多了~");
// }
this.published = res.data.list;
console.info(res.data.list);
},
//中奖专区
async getShopLuckDrawList() {
console.log(this.page);
this.page++;
if (!this.isoneload) {
// this.isoneload = true;
uni.showLoading({
title: '加载中...'
});
} else {
this.isoneload = false;
}
let param = {
shop_id: this.shop_id,
page: this.page,
pagesize: 10
};
let res = await getShopLuckDrawList(param);
uni.hideLoading(); //结束加载
this.isshowloading = false;
this.winning = [...this.winning, ...res.data.list]; //列表
console.log(this.winning);
uni.stopPullDownRefresh(); //关闭下拉刷新
if (res.data.list.length == 0) {
this.$api.msg('没有更多了~');
}
console.info(res.data.list);
},
// 抽奖卷
async getBuyRecord() {
let res = await getBuyRecord({
shop_id: this.shop_id,
page: this.page_2
});
console.info(res);
this.sample = res.data.list;
console.info(this.sample);
},
// 88888
async setTurntableActivityStatus() {
let res = await setTurntableActivityStatus({ shop_id: this.shop_id, id: this.id, status: this.status });
console.info(res);
this.statuslist = res.data;
},
ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
this.switchTab(index);
},
switchTab(index) {
if (this.tabIndex === index) {
return;
}
this.tabIndex = index;
this.scrollInto = this.tabBars[index].id;
// 释放 tabId
if (this.cacheTab.length > MAX_CACHE_PAGE) {
let cacheIndex = this.cacheTab[0];
// this.clearTabData(cacheIndex);
this.cacheTab.splice(0, 1);
//console.log("remove cache index:: " + cacheIndex);
}
}
}
};
</script>
<style lang="scss">
@import './details.scss';
page {
width: 100%;
min-height: 100%;
display: flex;
}
::-webkit-input-placeholder {
/* WebKit browsers */
font-size: 14upx;
}
// 选项卡
.end-title {
display: flex;
}
.end-title view {
flex-grow: 1;
text-align: center;
height: 50px;
line-height: 50px;
font-size: 18px;
font-weight: bold;
background: #ffffff;
}
.end-cont {
display: none;
background: #c8c7cc;
}
.btna {
color: #f64f15;
// background: #00A0FF;
}
.dis {
display: block;
}
.show {
display: block;
}
.tabs {
flex: 1;
flex-direction: column;
overflow: hidden;
/* background-color: #ffffff; */
// height: 100vh;
}
.scroll-h {
width: 750rpx;
height: 80rpx;
flex-direction: row;
white-space: nowrap;
}
.line-h {
height: 1rpx;
background-color: rgba(205, 205, 205, 0.3);
}
.uni-tab-item {
/* #ifndef APP-PLUS */
display: inline-block;
/* #endif */
flex-wrap: nowrap;
padding-left: 34rpx;
padding-right: 34rpx;
}
.uni-tab-item-title {
color: #555;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
flex-wrap: nowrap;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
}
.uni-tab-item-title-active {
color: #007aff;
}
.swiper-box {
flex: 1;
}
.swiper-item {
flex: 1;
flex-direction: row;
}
.scroll-v {
flex: 1;
/* #ifndef MP-ALIPAY */
flex-direction: column;
/* #endif */
width: 750rpx;
}
.update-tips {
position: absolute;
left: 0;
top: 41px;
right: 0;
padding-top: 5px;
padding-bottom: 5px;
background-color: #fddd9b;
align-items: center;
justify-content: center;
text-align: center;
}
.update-tips-text {
font-size: 14px;
color: #ffffff;
}
.refresh {
width: 750rpx;
height: 64px;
justify-content: center;
}
.refresh-view {
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
.refresh-icon {
width: 30px;
height: 30px;
transition-duration: 0.5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon-active {
transform: rotate(180deg);
}
.loading-icon {
width: 20px;
height: 20px;
margin-right: 5px;
color: #999999;
}
.loading-text {
margin-left: 2px;
font-size: 16px;
color: #999999;
}
.loading-more {
align-items: center;
justify-content: center;
padding-top: 10px;
padding-bottom: 10px;
text-align: center;
}
.loading-more-text {
font-size: 28rpx;
color: #999;
}
.nome {
display: none;
}
.beack {
display: block;
}
</style>
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<!-- 商家助手首页 --> <!-- 商家助手首页 -->
<view class="index"> <view class="index">
<view class="head"> <view class="head">
<!-- @tap="demoaudio" -->
<view class="tit">店铺名称:{{storeinfo.shop_name}} </view> <view class="tit">店铺名称:{{storeinfo.shop_name}} </view>
<!-- {{shop.shop_name}} --> <!-- {{shop.shop_name}} -->
<view class="jiu"> <view class="jiu">
...@@ -239,17 +240,15 @@ ...@@ -239,17 +240,15 @@
</navigator> </navigator>
</view> </view>
<view class="jiu_max" v-if="shop_type=='ele'"> <view class="jiu_max " @tap="shops">
<!-- 外卖配送费设置 --> <!-- <navigator url="/pages/details/details"> -->
<navigator url="/pages/deliveryCost/deliveryCost">
<view class="jiu_min"> <view class="jiu_min">
<view> <view>
<image class="img" src="/static/icon/psfei.png" mode=""></image> <image class="img" src="/static/turntable/turntable.png" mode=""></image>
</view> </view>
<view>配送费设置</view> <view>大转盘</view>
</view> </view>
<!-- </navigator> -->
</navigator>
</view> </view>
</view> </view>
...@@ -280,9 +279,11 @@ ...@@ -280,9 +279,11 @@
return { return {
tancl: false, tancl: false,
shop_id:"",
shop: {}, shop: {},
countdata: {}, countdata: {},
shop_type: "", //店铺类型 ele goods shop_type: "", //店铺类型 ele goods
is_luck_draw:""
} }
}, },
components: { components: {
...@@ -329,19 +330,88 @@ ...@@ -329,19 +330,88 @@
}, 1000) }, 1000)
}, },
methods: { methods: {
shops(){
if(this.is_luck_draw==1){
uni.navigateTo({
url:"/pages/details/details?shop_id="+this.shop_id
})
}else{
uni.showModal({
title: '温馨提示',
content: '不符合参与条件!请联系客服开通权限400-807-3023',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
demoaudio() {
//语音提醒
//AudioVoice openVoice
// setInterval(()=>{
// this.$store.dispatch('AudioVoice',"您有新的资金变化,请注意查看").then((e) => {
// console.log(e);
// })
// },10000);
this.$store.dispatch('AudioVoice', "您有新的订单,请注意查看").then((e) => {
console.log(e);
//震动 调用
//400ms
//长震动
uni.vibrateLong({
success: (re) => {
},
fail: (a) => {
}
})
// 短震动
//15ms
// uni.vibrateShort()({
// success:(re)=> {
// },
// fail:(a)=> {
// }
// })
})
},
//弹窗 //弹窗
tan() { tan() {
this.tancl = !this.tancl this.tancl = !this.tancl
}, },
//获取首页的数据 //获取首页的数据
async storeIndexfun() { async storeIndexfun() {
let res = await storeIndex({ let res = await storeIndex({
}); });
uni.stopPullDownRefresh(); //结束下拉刷新 uni.stopPullDownRefresh(); //结束下拉刷新
console.log(res.data.shop_info.shop_id)
if (res.code == 0) { if (res.code == 0) {
this.countdata = res.data.counts; //统计的数据 this.countdata = res.data.counts; //统计的数据
this.shop_type = res.data.shop_type; //店铺类型 商城 goods this.shop_type = res.data.shop_type; //店铺类型 商城 goods
this.shop_id = res.data.shop_info.shop_id;
this.is_luck_draw=res.data.shop_info.is_luck_draw
} else { } else {
this.$api.msg(res.msg); this.$api.msg(res.msg);
......
//快速发货
.delivery{
min-height: 100vh;
background: #F2F3F3;
padding: 20upx 0;
}
.fahuobox{
margin: 0 24upx;
padding: 0 20upx;
padding-bottom: 60upx;
background: #FFFFFF;
.selectcell{
height: 107upx;
line-height: 107upx;
border-bottom: 1px solid #F4F4F4;
.names{
font-size:30upx;
color:rgba(0,0,0,1);
}
.icons1{
width:48upx;
height:38upx;
margin-right: 26upx;
}
.icons2{
width:10upx;
height:18upx;
}
.icons3{
width:39upx;
height:42upx;
margin-right: 26upx;
}
.tosaomaboxs{
width: 50px;
text-align: right;
}
.icons4{
width:25upx;
height:25upx;
}
}
}
.btnsbox{
margin-top: 60upx;
.btns{
width:300upx;
height:90upx;
line-height: 90upx;
text-align: center;
border:1px solid rgba(160,160,160,1);
border-radius:6upx;
font-size:32upx;
color:rgba(0,0,0,1);
}
.btns1{
border:0;
background: #FF6600;
color:#FFFFFF;
}
}
\ No newline at end of file
<template>
<!-- 快速发货 -->
<!-- 发货 -->
<view class="delivery fahuo yocode">
<view class="fahuobox">
<picker @change="bindPickerChange" :value="index" :range="logsitslist">
<view class="selectcell flex ali-c jus-b">
<view class="flex ali-c">
<image class="icons1" src="../../static/store/fahuo.png" mode=""></image>
<view class="names">{{chindtext==''?'选择快递公司':chindtext}}</view>
</view>
<image class="icons2" src="/static/store/xiala.png" mode=""></image>
</view>
</picker>
<view class="selectcell flex ali-c jus-b">
<view class="flex ali-c">
<image class="icons3" src="../../static/store/dindhao.png" mode=""></image>
<input class="names" type="text" value="" v-model="logscode" placeholder="输入快递单号" />
</view>
<view @tap="tosaoyisao" class="tosaomaboxs">
<image class="icons4" src="../../static/store/saoma.png" mode=""></image>
</view>
</view>
<view class="btnsbox flex ali-c jus-a">
<view class="btns">取消</view>
<view class="btns btns1" @tap="showsend">确定发货</view>
</view>
</view>
</view>
</template>
<script>
import { logisticsList, oneKeyShipments } from '@/utils/api/hotel.js';
import { showsend } from '@/utils/api/merchant.js';
export default{
data(){
return{
logsitslist:[],
index:0,
chindtext:"",
logscode:"",
shop_id:'',//厂家id
}
},
onLoad(opdata) {
console.log(opdata)
this.order_id = opdata.order_id;
this.shop_id = opdata.shop_id;
this.logisticsList();
},
methods:{
async logisticsList(){
let res = await logisticsList({
});
if(res.code==0){
this.logsitslist =res.data;
}else{
this.$api.msg(res.msg);
}
},
//快速发货 确认发货
async showsend(){
// if(this.order_id.replace(/\s*/g,"")==""){
// this.$api.msg("没有获取到您的订单信息");
// return false;
// }
if(this.chindtext==""){
this.$api.msg("请选中快速公司");
return false;
}
if(this.logscode==""){
this.$api.msg("物流单号不能为空");
return false;
}
let res = await showsend({
logisticCode:this.logscode,//物流好
shipperName:this.chindtext,//名称
order_id:this.order_id,
shop_id:this.shop_id,
});
if(res.code==0){
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success(res) {
uni.redirectTo({
url: '/pages/details/details'
})
// uni.navigateBack({
// //delta: 2
// });
}
})
}else{
this.$api.msg(res.msg);
}
},
//请求end
bindPickerChange(e){
console.log(e.detail.value);
this.chindtext = this.logsitslist[e.detail.value];
},
//扫码方法
tosaoyisao(){
uni.scanCode({
success: (res)=> {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
// let qrcodecon =
this.logscode = res.result;
}
});
}
}
}
</script>
<style lang="scss">
@import "./delivery.scss"
</style>
\ No newline at end of file
...@@ -55,3 +55,7 @@ import request from "./../request.js";//这里用的是two ...@@ -55,3 +55,7 @@ import request from "./../request.js";//这里用的是two
export function slotuserList(data) { export function slotuserList(data) {
return request.post("LotteryActive/userList", data, { noAuth: false ,isurltwo:true}); return request.post("LotteryActive/userList", data, { noAuth: false ,isurltwo:true});
} }
// 大转盘
export function addTurntableActivity(data) {
return request.post("Turntable/addTurntableActivity", data, { noAuth: false ,isurltwo:true});
}
\ No newline at end of file
...@@ -83,3 +83,16 @@ export function affirmIntake(data) ...@@ -83,3 +83,16 @@ export function affirmIntake(data)
{ {
return request.post("order/affirmIntake",data,{ noAuth : false}); return request.post("order/affirmIntake",data,{ noAuth : false});
} }
/**
* 查询物流公司
*/
export function logisticsList(data) {
return request.post("turntable/logisticsList", data, { noAuth: false });
}
/**
* 一键发货
*/
// export function oneKeyShipments(data) {
// return request.post("Store/oneKeyShipments", data, { noAuth: false });
// }
//抽奖相关的接口
import request from "./../request.js";//这里用的是two
// 大转盘
export function addTurntableActivity(data) {
return request.post("Turntable/addTurntableActivity", data, { noAuth: true});
}
//已发布
export function getTurntableActivityList(data) {
return request.post("Turntable/getTurntableActivityList", data, { noAuth: true});
}
//中奖区
export function getShopLuckDrawList(data) {
return request.post("Turntable/getShopLuckDrawList", data, { noAuth: true});
}
//抽奖劵
// export function getBuyRecord(data) {
// return request.post("Turntable/getBuyRecord", data, { noAuth: true});
// }
//状态
export function setTurntableActivityStatus(data) {
return request.post("Turntable/setTurntableActivityStatus", data, { noAuth: true});
}
// 订单号
export function showsend(data) {
return request.post("Turntable/send", 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