Commit 1ca458e3 authored by xieyishang's avatar xieyishang

addxx

parent 79413fd3
......@@ -285,45 +285,6 @@
}
},
//抽奖相关start
{
"path": "pages/LuckDraw/send/send",
"style": {
"navigationBarTitleText": "发起抽奖"
}
},
{
"path": "pages/LuckDraw/preview/preview",
"style": {
"navigationBarTitleText": "预览抽奖详情"
}
},
{
"path": "pages/LuckDraw/homenav/homenav",
"style": {
"navigationBarTitleText": "活动抽奖"
}
},
{
"path": "pages/LuckDraw/LuckList/LuckList",
"style": {
// 三个页面写在了一块 参与抽奖 发起抽奖 中奖记录
"navigationBarTitleText": ""
}
},
{
"path": "pages/LuckDraw/LuckyDetails/LuckyDetails",
"style": {
"navigationBarTitleText": "抽奖详情"
}
},
{
"path": "pages/LuckDraw/PartakeUser/PartakeUser",
"style": {
"navigationBarTitleText": "参与用户"
}
},
//抽奖相关end
//酒店管理的
......@@ -400,31 +361,9 @@
"navigationBarTitleText": "物流发货",
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/publishActivities/activityList/activityList",
"style": {
//机型列表
"navigationBarTitleText": "活动列表",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
}, {
"path": "pages/publishActivities/publishActivity/publishActivity",
"style": {
//机型列表 activityDetail
"navigationBarTitleText": "发布免费活动",
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/publishActivities/activityDetail/activityDetail",
"style": {
//机型列表 activityDetail
"navigationBarTitleText": "活动详情",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
}, {
},
{
"path": "pages/order/shoprefundorderdetail/shoprefundorderdetail",
"style": {
"navigationBarTitleText": "商城售后订单详情",
......@@ -475,35 +414,7 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/table_code/table_code/table_code",
"style": {
"navigationBarTitleText": "餐台二维码",
"enablePullDownRefresh": false
}
}, {
"path": "pages/table_code/manageTableCode/manageTableCode",
"style": {
"navigationBarTitleText": "餐台管理",
"enablePullDownRefresh": false
}
}, {
"path": "pages/table_code/addTableCode/addTableCode",
"style": {
"navigationBarTitleText": "添加餐台码",
"enablePullDownRefresh": false
}
}, {
"path": "pages/table_code/tableCodeList/tableCodeList",
"style": {
"navigationBarTitleText": "餐台码列表",
"enablePullDownRefresh": true
}
},
},
{
"path": "pages/myStockRight/myStockRight",
"style": {
......
/**活动列表里面的样式*/
.LuckList{
min-height: 100vh;
background-color: #F5F1F2;
padding: 20upx 0;
}
.Luck_card{
padding: 20upx;
background: #FFFFFF;
margin: 0 24upx 20upx 24upx;
border-radius:14upx;
}
.Luck_card .thumbnail{
width: 143upx;
height: 143upx;
}
.Luck_card_r{
margin-left: 20upx;
}
.Luck_card_r .titlebox .onestatic{
font-size:32upx;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1)
}
.Luck_card_r .titlebox .twostatic{
font-size:24upx;
color:rgba(153,153,153,1);
}
.Prizelist .Prizeitem{
font-size:32upx;
color:rgba(0,0,0,1);
margin-bottom: 6upx;
}
.Prizesysbtn{
}
.Prizesysbtn .times{
color: #999999;
font-size: 24upx;
}
.Prizesysbtn .btns .sysbtns{
width:140upx;
height:50upx;
line-height: 50upx;
text-align: center;
background:rgba(255,105,0,1);
border-radius:4upx;
font-size: 28upx;
color:#FFFFFF;
margin-left: 20upx;
}
.Prizesysbtn .btns .sysbtns1{
background: #ff0000;
color:#FFFFFF;
}
\ No newline at end of file
<template>
<!-- 活动列表 参与抽奖 发起抽奖 中奖记录 -->
<!-- 三个页面 写在一块 通过传参区分 -->
<view class="LuckList">
<!-- 参与抽奖 发起抽奖 -->
<view class="listdatas" v-if="type==0 || type==1 || type==2 || type==3">
<view @tap="tozjxq(item.lottery_id)" class="Luck_card flex " v-for="(item,index) in dataLotteryList" :key="index">
<image class="thumbnail" :src="staticUrl+item.prize[0].img" mode=""></image>
<view class="Luck_card_r flex1">
<view class="titlebox flex jus-b">
<view v-if="item.type == 1" class="onestatic">抽奖正在进行中</view>
<view v-else-if="item.type == 2" class="onestatic">已开奖</view>
<view v-else-if="item.type == 0" class="onestatic">已停止抽奖</view>
<view v-else class="onestatic">状态获取中</view>
<!-- 活动已结束 -->
<!-- 抱歉您未抽中奖品 -->
<view class="twostatic">{{item.pepole_num}}人自动开奖</view>
</view>
<view class="Prizelist">
<view class="Prizeitem oneline" v-for="(item1,index1) in item.prize" :key="index1">{{numberarr[index1]}} 等奖:{{item1.title}}</view>
</view>
</view>
</view>
</view>
<!-- edns -->
<!-- 中将记录 -->
<view class="listdatas" v-if="type==4">
<view @tap="tozjxq(item.lottery_id)" class="Luck_card flex ali-c" v-for="(item,index) in dataLotteryList" :key="index">
<image class="thumbnail" :src="staticUrl+item.img" mode=""></image>
<view class="Luck_card_r flex1">
<view class="titlebox flex jus-b">
<view class="onestatic">恭喜您抽中{{numberarr[item.grade-1]}}等奖</view>
<!-- 活动已结束 -->
<!-- 抱歉您未抽中奖品 -->
<view class="twostatic">活动已结束</view>
</view>
<view class="Prizelist">
<view class="Prizeitem oneline">{{item.title}} </view>
<view class="Prizesysbtn flex jus-b ali-c">
<!-- <view class="times">3月6日 10:20</view> -->
<view class="times oneline" v-if="item.type == 0" >中奖时间:{{item.start_time}}</view>
<view class="times oneline" v-if="item.type == 1" >领奖时间:{{item.end_time}}</view>
<view class="btns flex">
<view class="sysbtns" v-if="item.type == 0" :data-goods_id="item.goods_id" :data-win_id="item.win_id" @tap.stop="goShopping">点击领取</view>
<view class="sysbtns" v-if="item.type == 1" >已领奖</view>
</view>
</view>
</view>
</view>
</view>
</view>
<empty v-if="dataLotteryList.length==0"></empty>
<!-- 空数据展示 -->
</view>
</template>
<script>
import {LotteryList,slotuserList} from "@/utils/api/LuckDraw.js";
import empty from "@/components/empty/empty.vue";
export default {
components:{
empty
},
data(){
return {
numberarr:["","","","","","","","","",""],
type:"",
page:0,
dataLotteryList:[],
isbottomload:true,//瀑布流开关 true 加载 false 关闭
}
},
computed: {
staticUrl () {//静态资源地址
return this.$store.state.staticUrl;
}
},
//瀑布流
onReachBottom() {
if(this.isbottomload){
this.getLotteryList();
}
},
onLoad(opdata) {
let type = opdata.type;
this.type = type;
//设置动态标题
//规则略
switch(type) {
case "0":
//代码块
uni.setNavigationBarTitle({
title:"关闭的抽奖"
})
break;
case "1":
//代码块
uni.setNavigationBarTitle({
title:"发起的抽奖"
})
break;
case "2":
//代码块
uni.setNavigationBarTitle({
title:"开奖记录"
})
break;
case "3":
//代码块
uni.setNavigationBarTitle({
title:"参与的抽奖"
})
break;
case "4":
//代码块
uni.setNavigationBarTitle({
title:"中奖记录"
})
break;
default:
//默认代码块
}
//获取列表
this.getLotteryList();
},
methods:{
//进入详情
todetailes(){
},
//查看活动详情
tozjxq(id){
uni.navigateTo({
url:"/pages/LuckDraw/LuckyDetails/LuckyDetails?id="+id,
})
},
async getLotteryList(){
this.page++;
let res = {};
if(this.type!=3 && this.type!=4){
res = await LotteryList({
limit: 10,
page:this.page,
type: this.type,
});
}else{
res = await slotuserList({
limit: 10,
page:this.page,
type: this.type,
});
}
if(res.code==0){
if(res.data.length!=0){
this.dataLotteryList = [...this.dataLotteryList,...res.data];
}else{
this.isbottomload = false;//关闭
this.$api.msg("没有更多了~");
}
}else{
this.$api.msg(res.msg);
}
},
//领取奖品
goShopping(e){
this.$api.msg("请到APP或小程序中领取领取");
return false;
let goods_id = e.currentTarget.dataset.goods_id;
let win_id = e.currentTarget.dataset.win_id;
uni.navigateTo({
url: '/pages/product/product?id=' + goods_id + "&win_id=" + win_id + "&cate_id=0",
})
},
}
}
</script>
<style lang="scss">
@import "./LuckList.scss";
</style>
/*抽奖详情里面的*/
.LuckyDetails{
padding-bottom: 160upx;
background: #F5F1F2;
}
.flexbutton{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 88upx;
line-height: 88upx;
text-align: center;
color:#FFFFFF;
background: #ff6900;
}
.textarea1{
height: auto !important;
}
.sysbtnPartake{
}
.Partakeboxmain{
width: 100%;
height:214upx;
text-align: center;
position: relative;
}
.Partakebox{
// position: relative;
width:214upx;
height:214upx;
background:#FACEB6;
opacity:0.26;
border-radius:50%;
text-align: center;
margin: 0 auto;
position: absolute;
top: 50%;
left: 50%;
margin-left: -107upx;
//动画
animation:run 1400ms steps(1,end) infinite 0s;
-webkit-animation:run 1400ms steps(1,end) infinite 0s;
}
.sysbtnPartake .Partake{
// border:solid 27upx #F6CDB0;
// position: absolute;
margin: 0 auto;
padding-top: 38upx;
width: 187upx;
height: 187upx;
opacity:1;
background:#FF6900;
border-radius:50%;
}
.sysbtnPartake .PartakewaitFor{
background: #ccc !important;
}
.sysbtnPartake .Partake .texts{
font-size: 32upx;
color:#FFFFFF;
}
.sysbtnPartake .Partake .texts1{
margin-top: 8upx;
}
.partaketext{
margin-top: 20upx;
text-align: center;
font-size:28upx;
color:rgba(0,0,0,1);
}
.partaketext .text{
color:#ff6900;
}
.partakeuserlist{
margin-top: 15upx;
}
.partakeuserlist .usertxs{
width: 70upx;
height: 70upx;
margin: 0 10upx;
}
/**动画开始*/
@keyframes run {
0% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
20% {
width:207.25upx;
height:207.25upx;
margin-left: -103.625upx;
margin-top: -103.625upx;
}
40% {
width:200.5upx;
height:200.5upx;
margin-left: -100.25upx;
margin-top: -100.25upx;
}
60% {
width:193.75upx;
height:193.75upx;
margin-left: -96.875upx;
margin-top: -96.875upx;
}
80% {
width:187upx;
height:187upx;
margin-left: -93.5upx;
margin-top: -93.5upx;
}
100% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
}
@-webkit-keyframes run {
0% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
20% {
width:207.25upx;
height:207.25upx;
margin-left: -103.625upx;
margin-top: -103.625upx;
}
40% {
width:200.5upx;
height:200.5upx;
margin-left: -100.25upx;
margin-top: -100.25upx;
}
60% {
width:193.75upx;
height:193.75upx;
margin-left: -96.875upx;
margin-top: -96.875upx;
}
80% {
width:187upx;
height:187upx;
margin-left: -93.5upx;
margin-top: -93.5upx;
}
100% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
}
@-moz-keyframes run {
0% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
20% {
width:207.25upx;
height:207.25upx;
margin-left: -103.625upx;
margin-top: -103.625upx;
}
40% {
width:200.5upx;
height:200.5upx;
margin-left: -100.25upx;
margin-top: -100.25upx;
}
60% {
width:193.75upx;
height:193.75upx;
margin-left: -96.875upx;
margin-top: -96.875upx;
}
80% {
width:187upx;
height:187upx;
margin-left: -93.5upx;
margin-top: -93.5upx;
}
100% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
}
@-o-keyframes run {
0% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
20% {
width:207.25upx;
height:207.25upx;
margin-left: -103.625upx;
margin-top: -103.625upx;
}
40% {
width:200.5upx;
height:200.5upx;
margin-left: -100.25upx;
margin-top: -100.25upx;
}
60% {
width:193.75upx;
height:193.75upx;
margin-left: -96.875upx;
margin-top: -96.875upx;
}
80% {
width:187upx;
height:187upx;
margin-left: -93.5upx;
margin-top: -93.5upx;
}
100% {
width:214upx;
height:214upx;
margin-left: -107upx;
margin-top: -107upx;
}
}
/**动画end*/
/*中奖者名单*/
.zprize{
margin: 40upx 24upx 20upx 24upx;
border-radius:14upx;
background: #FFFFFF;
}
.zprize_item{
padding: 20upx;
}
.zprize_itembor{
border-top: 1px solid #f5f1f2;
}
.z_head{
color:#7A7A7A;
font-size: 32upx;
text-align: center;
}
.z_title{
font-size:28upx;
color:rgba(255,105,0,1);
text-align: center;
margin-bottom: 24upx;
}
.zprize_item .userlist .usertxss{
width: 62upx;
height: 62upx;
border-radius: 50%;
}
.zprize_item .userlist .usernames{
font-size:24upx;
color:rgba(0,0,0,1);
}
.zprize_item .tolist{
margin-top: 20upx;
font-size:24upx;
color:rgba(58,58,58,1);
text-align: center;
}
.zprize_item .useritem{
text-align: center;
max-width: 120upx;
overflow: hidden;
}
This diff is collapsed.
<template>
<!-- 抽奖详情 抽奖活动详情页面 -->
<!-- 中奖详情 -->
<view class="LuckyDetails">
<!-- 发布 抽奖 -->
<view class="sendpage">
<view class="send_cell_box" v-for="(item,index) in PrizeList" :key="index">
<!-- 单个输入框 -->
<view class="send_cell flex ali-c">
<view class="inputname">一等奖</view>
<view class="input_box flex1">
<view class="input">小清新60支长绒棉四件套</view>
</view>
</view>
<view class="send_cell flex ali-c">
<view class="inputname">奖品数量</view>
<view class="input_box">
<view class="input">2份</view>
</view>
</view>
<view class="send_cell flex ali-c">
<view class="inputname">中奖后下单金额</view>
<view class="input_box">
<view class="input">99.00</view>
</view>
</view>
<view class="uploadbox">
<!-- <view class="uploadbtn" @tap="uploadimgs">
<image class="unpoadimg" src="/static/LuckDraw/Prize_icon.png" mode=""></image>
<view class="btnstext">添加奖品图片</view>
</view> -->
<image class="thumbnail" src="http://pic121.huitu.com/res/20190521/2134763_20190521094542188060_1.jpg" mode=""></image>
</view>
</view>
<!-- 大卡片end -->
<!-- 抽奖说明 -->
<view class="luckmsg flex ">
<view class="titles">奖品说明</view>
<view class="textareabox flex1">
<!-- <textarea class="textarea" value="" placeholder="请填写抽奖说明" /> -->
<view class="textarea textarea1">
迎接3.8女神节,本店特推出 此次抽奖活动,中奖者即可获 得精美床单一套。
</view>
</view>
</view>
<!-- 抽奖说明end -->
<!-- 抽奖设置 -->
<view class="lucksys">
<view class="send_cell flex ali-c">
<view class="inputname">开奖方式</view>
<view class="input_box flex1 flex">
<view class="input">满6人自动开奖</view>
<view class="input ml-20">
已结束
</view>
</view>
</view>
<view class="send_cell flex ali-c send_cell_boder">
<view class="inputname">抽奖发起人</view>
<view class="input_box flex ali-c">
<image class="usertx" src="/static/missing-face.png" mode=""></image>
<view class="input">江西多思盈|鹿马108</view>
</view>
</view>
</view>
<!-- 抽奖设置end -->
<!-- 中奖者名单 -->
<view class="zprize">
<view class="zprize_item">
<view class="z_head">— 中奖者名单 —</view>
</view>
<view class="zprize_item zprize_itembor" v-for="(items,index) in 3" :key="index">
<view class="z_title">一等奖:小清新60支长绒棉四件套</view>
<view class="userlist jus-a flex">
<view class="useritem" v-for="(item,index) in 3" :key="index">
<image class="usertxss" src="/static/missing-face.png" mode=""></image>
<view class="usernames">用户名</view>
</view>
</view>
<view class="tolist">查看全部中奖名单 ></view>
</view>
</view>
<!-- 参与抽奖按钮 -->
<view class="sysbtnPartake">
<!-- 抽奖按钮end -->
<view class="partaketext">
已有<text class="text">2</text>人参与,<text class="text">查看全部></text>
</view>
<view class="partakeuserlist flex jus-c">
<image v-for="(item,index) in 3" :key="index" class="usertxs" src="/static/missing-face.png" mode=""></image>
</view>
</view>
<!-- <view class="flexbutton">分享抽奖活动</view> -->
</view>
</view>
</template>
<script>
export default {
data(){
return {
current:1,//单选选中的值
PrizeList:[
{name:"",conut:"",imgurl:"",price:""},
{name:"",conut:"",imgurl:"",price:""},
// {name:"",conut:"",imgurl:""},
// {name:"",conut:"",imgurl:""},
],//奖品列表
shuliang:"0",//开奖人数
ischecked:true,//开关
}
},
onLoad() {
},
methods:{
//开关改变后的触发事件
switch1Change(){
}
}
}
</script>
<style lang="scss">
@import "../send/send.scss";
@import "./LuckyDetails.scss";
</style>
.PartakeUser{
background: #F5F1F2;
min-height: 100vh;
padding: 20upx 0;
}
.PartakeUsercount{
padding-left: 24upx;
font-size:32upx;
color:rgba(107,107,107,1);
}
.PartakeUsercount .text{
color:#ff6900;
}
.usercardlist{
margin: 28upx 24upx 24upx 24upx;
border-radius:14upx;
background: #FFFFFF;
}
.usercard{
padding-right: 20upx;
}
.usercard .usertxs{
width:90upx;
height:91upx;
border-radius:4upx;
margin-right: 20upx;
margin-left: 20upx;
}
.usercard .usermgs{
border-bottom:2upx solid rgba(220,220,220,1);
padding: 20upx;
}
.usercard:nth-last-child(1) .usermgs{
border:0;
}
.usercard .usermgs .username{
font-size:32upx;
color:rgba(0,0,0,1);
}
.usercard .usermgs .userid{
color: #B6B6B6;
font-size:30upx;
}
\ No newline at end of file
<template>
<!-- 参与用户 和 中奖名单 -->
<!-- 两个页面 两种情况 -->
<view class="PartakeUser">
<view class="PartakeUsercount" v-if="type==1">已有{{counts}}人参与抽奖</view>
<view class="PartakeUsercount" v-if="type==2">已有{{counts}}人抽中<text class="text">{{jpname}}</text></view>
<view class="usercardlist">
<view class="usercard flex ali-c" v-for="(item,index) in userinfoList" :key="index">
<image class="usertxs" :src="item.avatar" mode=""></image>
<view class="usermgs flex1">
<view class="username">{{item.nickname}}</view>
<view class="userid">id号{{item.user_id}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {LotteryUserInfo} from "@/utils/api/LuckDraw.js";
export default {
data(){
return {
type:1,//1 参与用户 2中奖名单
lottery_id:"",//活动id
grade:"",
userinfoList:[],//用户列表
page:0,
istoload:true,//瀑布流加载开关
jpname:"",//奖品名称
counts:0,//参与人数 以及中奖人数统计
}
},
onLoad(options) {
this.type = options.type;
switch (options.type) {
case "1":
//代码块
uni.setNavigationBarTitle({
title: "参与用户"
})
break;
case "2":
//代码块
uni.setNavigationBarTitle({
title: "中奖名单"
})
break;
default:
//默认代码块
}
this.grade = options.grade;
this.lottery_id = options.lottery_id;
this.LotteryUserInfocode();
this.jpname = options.jpname;//奖品名称
},
onReachBottom() {
// if(this.istoload){
// this.LotteryUserInfocode();
// }
},
methods:{
//获取名单 以及参与名单
async LotteryUserInfocode(){
this.page++;
let res = await LotteryUserInfo({
lottery_id:this.lottery_id,
type:this.type,
grade:this.grade,
limit: 10,
page: this.page
});
if(res.code==0){
if(res.data){
this.counts = res.data.userCount;//统计人数
if(res.data.userinfo.length!=0){
this.userinfoList = [...this.userinfoList,...res.data.userinfo];
}else{
this.$api.msg("没有更多了哦~");
this.istoload = false;
}
}else{
this.$api.msg("没有更多了哦~");
}
}else{
this.$api.msg(res.msg);
}
}
}
}
</script>
<style lang="scss">
@import "./PartakeUser.scss"
</style>
.homenavpages{
background: #F5F1F2;
min-height: 100vh;
padding: 20upx 0;
// margin: 0 24upx;
}
.honenavlist{
margin: 0 24upx;
}
.send_cell{
padding: 0 20upx;
height: 88upx;
line-height: 88upx;
border-bottom: 1px solid #F4F1F2;
background: #fff;
}
.send_cell:nth-child(1){
border-radius: 14upx 14upx 0px 0px;
}
.send_cell_boder{
border-radius: 0px 0px 14upx 14upx ;
}
.send_cell .inputname{
color: #333333;
font-size: 32upx;
}
.send_cell .input_box{
margin-left: 20upx;
}
.input_box .texts{
font-size: 32upx;
}
.input_box .usertx{
width: 62upx;
height: 62upx;
border-radius: 50%;
margin-right: 20upx;
}
.input_box .uni-list-cell1{
margin-right: 20upx;
}
.input_box .jiantou_icon{
width: 13upx;
height: 24upx;
}
.input_box .textssum{
margin-right: 18upx;
color:#000000;
font-size: 30upx;
}
.send_cell .input_box .input{
font-size: 32upx;
color: #333333;
}
.linetowpad{
margin-top: 20upx;
}
\ No newline at end of file
<template>
<!-- 活动抽奖 -->
<!-- navy页面 -->
<view class="homenavpages">
<view class="honenavlist">
<view v-if="isshowall==2">
<navigator url="/pages/LuckDraw/send/send" class="send_cell flex ali-c">
<view class="inputname">实物抽奖</view>
<view class="input_box flex1 jus-e">
<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</navigator>
<navigator url="/pages/LuckDraw/LuckList/LuckList?type=0" class="send_cell flex ali-c linetowpad">
<view class="inputname">关闭抽奖</view>
<view class="input_box flex1 jus-e ali-c">
<text class="textssum">{{conutdata.closeLottery}}</text>
<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</navigator>
<navigator url="/pages/LuckDraw/LuckList/LuckList?type=1" class="send_cell flex ali-c ">
<view class="inputname">发起抽奖</view>
<view class="input_box flex1 jus-e ali-c">
<text class="textssum">{{conutdata.inLottery}}</text>
<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</navigator>
<navigator url="/pages/LuckDraw/LuckList/LuckList?type=2" class="send_cell flex ali-c">
<view class="inputname">开奖记录</view>
<view class="input_box flex1 jus-e ali-c">
<text class="textssum">{{conutdata.openLottery}}</text>
<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</navigator>
</view>
<navigator url="/pages/LuckDraw/LuckList/LuckList?type=3" class="send_cell flex ali-c ">
<view class="inputname">参与抽奖</view>
<view class="input_box flex1 jus-e ali-c">
<text class="textssum">{{conutdata.inCount}}</text>
<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</navigator>
<navigator url="/pages/LuckDraw/LuckList/LuckList?type=4" class="send_cell flex ali-c send_cell_boder">
<view class="inputname">中奖记录</view>
<view class="input_box flex1 jus-e ali-c">
<text class="textssum">{{conutdata.inPrize}}</text>
<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
</view>
</navigator>
<!-- App 进来的只剩下 参与抽奖 和 中奖记录 -->
</view>
</view>
</template>
<script>
import {slotCountLottery} from "@/utils/api/LuckDraw.js";
export default {
data(){
return {
conutdata:{},
isshowall:2,// 1是显示 部分的 2是显示全部的
}
},
computed: {
staticUrl () {//静态资源地址
return this.$store.state.joinurl;
}
},
onLoad(opdata) {
// if(opdata.isshowal!=undefined){
// this.isshowall = opdata.isshowall;
// }else{
// this.isshowall = 1;//默认部分
// }
//this.isshowall = opdata.isshowall;
},
onShow() {
this.getslotCountLottery();
},
methods:{
async getslotCountLottery(){
console.info("请求开始");
let res = await slotCountLottery({
});
console.info("请求结束");
if(res.code==0){
this.conutdata = res.data;
}else{
this.$api.msg(res.msg);
}
}
}
}
</script>
<style lang="scss">
@import "./homenav.scss";
</style>
/*预览的样式*/
.preview{
padding-bottom: 88upx;
}
.flexbutton{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 88upx;
line-height: 88upx;
text-align: center;
color:#FFFFFF;
background: #ff6900;
}
.textarea1{
height: auto !important;
}
\ No newline at end of file
<template>
<!-- 预览抽奖详情 -->
<view class="preview">
<!-- 发布 抽奖 -->
<view class="sendpage">
<view class="send_cell_box" v-for="(item,index) in PrizeList" :key="index">
<!-- 单个输入框 -->
<view class="send_cell flex ali-c">
<view class="inputname" v-if="PrizeList.length<=1">抽奖名称</view>
<view class="inputname" v-if="PrizeList.length>1">{{numberarr[index]}}等奖</view>
<view class="input_box flex1">
<view class="input oneline">{{item.title}}</view>
</view>
</view>
<view class="send_cell flex ali-c">
<view class="inputname">奖品数量</view>
<view class="input_box">
<view class="input">{{item.num}}</view>
</view>
</view>
<view class="send_cell flex ali-c">
<view class="inputname">中奖后下单金额</view>
<view class="input_box">
<view class="input">{{item.price}}</view>
</view>
</view>
<view class="uploadbox">
<image class="unpoadimgshow" :src="staticUrl+item.img" mode=""></image>
</view>
</view>
<!-- 大卡片end -->
<!-- 抽奖说明 -->
<view class="luckmsg flex ">
<view class="titles">奖品说明</view>
<view class="textareabox flex1">
<view class="textarea textarea1">
{{info}}
</view>
</view>
</view>
<!-- 抽奖说明end -->
<!-- 抽奖设置 -->
<view class="lucksys">
<view class="send_cell flex ali-c">
<view class="inputname">开奖方式</view>
<view class="input_box flex1">
<view class="input">{{shuliang}}人自动开奖</view>
</view>
</view>
<view class="send_cell flex ali-c send_cell_boder">
<view class="inputname">抽奖发起人</view>
<view class="input_box flex ali-c">
<image class="usertx" :src="userinfodata.face" mode=""></image>
<view class="input">{{userinfodata.nickname}}</view>
</view>
</view>
</view>
<!-- 抽奖设置end -->
<view class="flexbutton" @tap="sendsubmit">发布抽奖</view>
</view>
<prizemodel ref="prizemodel" :shuliang="shuliang" @fromSubmitfun="fromSubmitfun"></prizemodel>
<!-- 抽奖弹窗 -->
</view>
</template>
<script>
import prizemodel from "@/components/prizemodel/prizemodel.vue";//提示窗
import {sendLottery} from "@/utils/api/LuckDraw.js";//发起抽奖的接口
export default {
components:{
prizemodel,
},
data(){
return {
numberarr:["","","","","","","","","",""],
shuliang:"0",//开奖人数
//预览内容
info:"",//奖品说明
// pepole_num:0,//开奖人数
PrizeList:[],//奖品列表
way:0,
current:1,//单选选中的值
}
},
computed: {
staticUrl () {//静态资源地址
return this.$store.state.staticUrl;
},
//用户信息
userinfodata(){
return this.$store.state.userInfo;
}
},
onLoad() {
this.getpreviewdata();
},
methods:{
//获取本地存储信息
getpreviewdata(){
let previewdata = uni.getStorageSync("previewdata");
if(previewdata){
this.info = previewdata.info;//说明
this.shuliang = previewdata.pepole_num;//开奖人数
this.PrizeList = previewdata.prize;//奖品列表
this.current = previewdata.way;//
}
},
sendsubmit(){
if(this.shuliang==0){
this.$api.msg("开奖人数不能为0");
}else{
this.$refs.prizemodel.show();//显示弹窗
}
},
//表单提交最终的方法
async fromSubmitfun(){
console.info("表单提交");
if(this.info.replace(/\s+/g,"")==""){
this.$api.msg("抽奖说明不能为空");
return false;
}else if(this.shuliang<0){
this.$api.msg("请输入正确的开奖人数");
return false;
}
let res = await sendLottery({
info: this.info,//奖品说明
pepole_num: this.shuliang,//开奖人数
prize: this.PrizeList,//奖品列表
way: this.current,//开奖方式 满人开奖2 手动开奖3
});
if(res.code==0){
this.$api.msg("抽奖发布成功");
setTimeout(()=>{
// uni.navigateBack({
// })
//进入活动详情
uni.navigateTo({
url:`/pages/LuckDraw/LuckyDetails/LuckyDetails?id=${res.data}`
});
},1000)
}else{
this.$api.msg(res.msg);
}
},
}
}
</script>
<style lang="scss">
@import "../send/send.scss";
@import "./preview.scss";
</style>
/**为了快速兼容小程序的代码 这里不使用scss**/
.sendpage{
padding: 20upx 0;
background: #F5F1F2;
min-height: 100vh;
}
/*抽奖输入框卡片*/
.send_cell_box{
margin: 0 24upx;
margin-bottom: 20upx;
}
.send_cell{
padding: 0 20upx;
height: 88upx;
line-height: 88upx;
border-bottom: 1px solid #F4F1F2;
background: #fff;
}
.send_cell:nth-child(1){
border-radius: 14upx 14upx 0px 0px;
}
.send_cell_boder{
border-radius: 0px 0px 14upx 14upx ;
}
.send_cell .inputname{
color: #333333;
font-size: 32upx;
}
.send_cell .input_box{
margin-left: 20upx;
}
.input_box .texts{
font-size: 32upx;
}
.input_box .usertx{
width: 62upx;
height: 62upx;
border-radius: 50%;
margin-right: 20upx;
}
.input_box .uni-list-cell1{
margin-right: 20upx;
}
.input_box .jiantou_icon{
width: 13upx;
height: 24upx;
}
.send_cell .input_box .input{
font-size: 32upx;
color: #333333;
}
/*抽奖输入框卡片 end*/
/*上传图片部分*/
.uploadbox{
height:380upx;
//background:rgba(243,85,67,1);
border-radius:0px 0px 14upx 14upx;
}
.uploadbox.active{
height:255upx;
background:rgba(243,85,67,1);
opacity:0.54;
}
.uploadbox .thumbnail{
width: 100%;
height: 255upx;
border-radius:0px 0px 14upx 14upx;
}
.uploadbtn{
padding-top: 53upx;
text-align: center;
}
.uploadbtn .unpoadimg{
width: 110upx;
height: 116upx;
}
.unpoadimgshow{
width: 100%;
height: 380upx;
border-radius: 0px 0px 14upx 14upx;
}
.uploadbtn .btnstext{
color:#FFFFFF;
font-size: 26upx;
}
/*上传图片部分end*/
.addluck{
margin: 30upx 0;
color:#FF6900;
font-size: 32upx;
text-align: center;
}
/*抽奖说明*/
.luckmsg{
padding: 30upx 20upx;
margin: 20upx 24upx;
height: 230upx;
background: #FFFFFF;
box-sizing: border-box;
color:#333333;
font-size: 32upx;
border-radius:14upx;
}
.luckmsg .titles{
}
.luckmsg .textareabox{
height: 230upx;
margin-left: 20upx;
box-sizing: border-box;
}
.luckmsg .textarea{
width: 100%;
height: 230upx;
}
/*抽奖说明end*/
/*抽奖设置*/
.lucksys{
margin: 20upx 24upx;
}
.LuckDrawsubmit{
height: 88upx;
margin: 20upx 24upx;
margin-top: 70upx;
}
.LuckDrawsubmit button{
width: 50%;
height: 88upx;
line-height: 88upx;
color: #FFFFFF;
font-size: 32upx;
}
.LuckDrawsubmit button::after{
border-radius: 0;
border: 0;
}
.LuckDrawsubmit .subbtns1{
background:rgba(243,85,67,1);
border-radius:14upx 0px 0px 14upx;
}
.LuckDrawsubmit .subbtns2{
background:rgba(255,105,0,1);
border-radius:0px 14upx 14upx 0px;
}
<template>
<!-- 发布 抽奖 -->
<view class="sendpage">
<view class="send_cell_box" v-for="(item,index) in PrizeList" :key="index">
<!-- 单个输入框 -->
<view class="send_cell flex ali-c">
<view class="inputname" v-if="PrizeList.length<=1">抽奖名称</view>
<view class="inputname" v-if="PrizeList.length>1">{{numberarr[index]}}等奖</view>
<view class="input_box flex1">
<input class="input" type="text" value="" v-model="item.title" placeholder="请输入奖品名称" />
</view>
</view>
<view class="send_cell flex ali-c">
<view class="inputname">奖品数量</view>
<view class="input_box">
<input type="number" value="" v-model="item.num" placeholder="请输入奖品数量" />
</view>
</view>
<view class="send_cell flex ali-c">
<view class="inputname">金额</view>
<view class="input_box">
<input type="number" value="" v-model="item.price" placeholder="请输入中奖后下单金额" />
</view>
</view>
<view class="uploadbox" :class="{active:item.img==''}">
<image class="unpoadimgshow" @tap="toselectshp(index)" v-if="item.img" :src="staticUrl+item.img" mode=""></image>
<view class="uploadbtn" v-else @tap="toselectshp(index)">
<image class="unpoadimg" src="/static/LuckDraw/Prize_icon.png" mode=""></image>
<view class="btnstext">选择奖品</view>
</view>
<!-- <image class="thumbnail" src="http://pic121.huitu.com/res/20190521/2134763_20190521094542188060_1.jpg" mode=""></image> -->
</view>
</view>
<!-- 大卡片end -->
<!-- 添加奖品 -->
<view class="addluck flex jus-a">
<view class="addbtns" v-if="PrizeList.length>1" @tap="delPrize">-删减奖品</view>
<view class="addbtns" @tap="addPrize">+添加奖品</view>
</view>
<!-- 抽奖说明 -->
<view class="luckmsg flex ">
<view class="titles">奖品说明</view>
<view class="textareabox flex1">
<textarea class="textarea" value="" v-model="cjinfo" placeholder="请填写抽奖说明" />
</view>
</view>
<!-- 抽奖说明end -->
<!-- 抽奖设置 -->
<view class="lucksys">
<!-- <view class="send_cell flex ali-c">
<view class="inputname">开奖方式</view>
<view class="input_box flex1">
<radio-group @change="radioChange" class="flex">
<label class="uni-list-cell1" >
<view class="flex">
<radio value="2" color="#ff6900" :checked="current==2" />
<view class="texts">满人开奖</view>
</view>
</label>
<label class="uni-list-cell1 " >
<view class="flex">
<radio value="3" color="#ff6900" :checked="current==3" />
<view class="texts">手动开奖</view>
</view>
</label>
</radio-group>
</view>
</view> -->
<view class="send_cell flex ali-c send_cell_boder">
<view class="inputname">开奖人数</view>
<view class="input_box">
<input type="number" value="" v-model="shuliang" placeholder="请输入开奖人数" />
</view>
</view>
</view>
<!-- 抽奖设置end -->
<!-- 提交按钮 -->
<view class="LuckDrawsubmit flex">
<button type="primary" class="subbtns1" @tap="toPreview">预览奖池</button>
<button type="primary" class="subbtns2" @tap="sendsubmit">发布抽奖</button>
</view>
<prizemodel ref="prizemodel" :shuliang="shuliang" @fromSubmitfun="fromSubmitfun"></prizemodel>
<!-- 抽奖弹窗 -->
</view>
</template>
<script>
import prizemodel from "@/components/prizemodel/prizemodel.vue";//提示窗
import {sendLottery} from "@/utils/api/LuckDraw.js";//发起抽奖的接口
export default {
components:{
prizemodel,
},
data(){
return {
numberarr:["","","","","","","","","",""],
current:2,//单选选中的值
PrizeList:[
{
closed: "1",//多余参数?
goods_id: "",//商品id
img: "",//产品图
num: "",//奖品数量
price: "",//中奖后的金额
title: "",//抽奖名称
},
],//奖品列表
shuliang:"0",//开奖人数
cjinfo:"",//抽奖说明
}
},
computed: {
staticUrl () {//静态资源地址
return this.$store.state.staticUrl;
}
},
onLoad() {
// setTimeout(()=>{
// // this.$refs.prizemodel.show();//显示弹窗
// },300)
},
onShow() {
//取之前页面选的获取到的商品
let selcarddata = uni.getStorageSync('selectaddres');
console.info(selcarddata);
if(selcarddata){
let datas = selcarddata.data;
let sendindex = selcarddata.sendindex;//插入索引
let obj = {
closed: "1",//多余参数?
goods_id: datas.goods_id,//商品id
img: datas.photo,//产品图
num: this.PrizeList[sendindex].num?this.PrizeList[sendindex].num:1,//奖品数量
price: datas.price,//中奖后的金额
title: datas.title,//抽奖名称
}
console.info(obj,sendindex);
//this.PrizeList[sendindex] = obj;//赋值
this.$set(this.PrizeList, sendindex,obj);//赋值
setTimeout(()=>{
uni.removeStorageSync('selectaddres');//移除
},1000)
}
},
methods:{
//单选触发事件 开奖方式
radioChange(e){
this.current = e.detail.value;
},
//添加奖品
addPrize(){
this.PrizeList.push({
closed: "1",//多余参数?
goods_id: "",//商品id
img: "",//产品图
num: "1",//奖品数量
price: "",//中奖后的金额
title: "",//抽奖名称
})
},
//删除奖品
delPrize(){
this.PrizeList.splice(this.PrizeList.length-1,1);
},
toPreview(){
if(this.shuliang=="0" && this.shuliang==0){
this.$api.msg("开奖人数不能为O");
return false;
}
if(this.cjinfo==""){
this.$api.msg("奖品说明必须要填哦,亲~");
return false;
}
//预览
uni.setStorageSync("previewdata",{
info: this.cjinfo,//奖品说明
pepole_num: this.shuliang,//开奖人数
prize: this.PrizeList,//奖品列表
way: this.current,//开奖方式 满人开奖2 手动开奖3
});
uni.navigateTo({
url:"/pages/LuckDraw/preview/preview",
})
},
//提交发布的是
sendsubmit(){
if(this.shuliang==0){
this.$api.msg("开奖人数不能为0");
}else{
this.$refs.prizemodel.show();//显示弹窗
}
},
//表单提交最终的方法
async fromSubmitfun(){
console.info("表单提交");
if(this.cjinfo.replace(/\s+/g,"")==""){
this.$api.msg("抽奖说明不能为空");
return false;
}else if(this.pepole_num<0){
this.$api.msg("请输入正确的开奖人数");
return false;
}
let res = await sendLottery({
info: this.cjinfo,//奖品说明
pepole_num: this.shuliang,//开奖人数
prize: this.PrizeList,//奖品列表
way: this.current,//开奖方式 满人开奖2 手动开奖3
});
if(res.code==0){
this.$api.msg("抽奖发布成功");
setTimeout(()=>{
// uni.navigateBack({
// })
//进入活动详情
uni.navigateTo({
url:`/pages/LuckDraw/LuckyDetails/LuckyDetails?id=${res.data}`
});
},1000)
}else{
this.$api.msg(res.msg);
}
},
//去商品列表获取商品
toselectshp(index){
//传的是数组插入索引
uni.navigateTo({
url:`/pages/edit/pro_manage/pro_manage?isselect=1&sendindex=${index}`,
})
}
}
}
</script>
<style lang="scss">
@import "./send.scss"
</style>
......@@ -2,18 +2,14 @@
<!-- 商家助手首页 -->
<view class="index">
<view class="head">
<view class="tit">店铺名称:{{ storeinfo.shop_name }}</view>
<!-- {{shop.shop_name}} -->
<view :class="['jiu', shop_type == 'ele'?'':'jus-b']">
<view class="jiu_01" v-if="is_bld == 1">
<view @tap="saoma">
<image class="img" src="/static/icon/1.png" mode=""></image>
<view>扫码入库</view>
</view>
</view>
<view class="jiu_01" :style="is_bld==1?'':'width: 33%;'">
<navigator url="/pages/notice/notice">
<view>
......@@ -22,7 +18,6 @@
<view>消息通知</view>
</navigator>
</view>
<view class="jiu_01" :style="is_bld==1?'':'width: 33%;'">
<navigator url="/pages/user/tongji/tongji">
<view>
......@@ -104,14 +99,12 @@
<view class="BH"></view>
<view class="six">
<view class="jiu_max" v-if="shop_type == 'goods'" @tap="jump">
<!-- <navigator url="/pages/edit/pro_manage/pro_manage"> -->
<view class="jiu_min">
<view>
<image class="img" src="/static/icon/spgl.png" mode=""></image>
</view>
<view>商品管理</view>
</view>
<!-- </navigator> -->
</view>
<view class="jiu_max " v-if="shop_type == 'ele'">
......@@ -232,17 +225,6 @@
</navigator>
</view>
<!-- 活动管理 只有商城才有抽奖活动-->
<view class="jiu_max " v-if="shop_type == 'goods'">
<navigator url="/pages/LuckDraw/homenav/homenav">
<view class="jiu_min">
<view>
<image class="img" src="/static/icon/liwuiocn.png" mode=""></image>
</view>
<view>抽奖活动</view>
</view>
</navigator>
</view>
<view class="jiu_max ">
<navigator url="/pages/CardSend/CardSend">
......@@ -320,19 +302,6 @@
</view>
</view>
<!-- url="/pages/publishActivities/activityList/activityList" -->
<view class="jiu_max " v-if="shop_type == 'ele'">
<navigator url="/pages/publishActivities/activityList/activityList">
<view class="jiu_min">
<view>
<image class="img" src="/static/icon/0yuan.png" mode=""></image>
</view>
<view>0元领活动</view>
</view>
</navigator>
</view>
<view class="jiu_max " v-if="shop_type == 'ele'">
<navigator url="/pages/guidegoods/guidegoods">
......@@ -356,19 +325,6 @@
</navigator>
</view>
<!-- <view class="jiu_max " v-if="shop_type == 'ele'">
<navigator url="/pages/table_code/manageTableCode/manageTableCode">
<view class="jiu_min">
<view>
<image class="img" src="/static/table_code/tableCode.png" mode=""></image>
</view>
<view>餐台码</view>
</view>
</navigator>
</view> -->
</view>
<view class="BH"></view>
......
<template>
<view>
<view class="projuctTab flex">
<view class="tabitems flex1" :class="{active:tabactive==1}" @tap="taggletab(1)">
<view class="tabtitle">参与人员</view>
<!-- ({{count[0]}}) -->
</view>
<view class="tabitems flex1" :class="{active:tabactive==2}" @tap="taggletab(2)">
<view class="tabtitle">核销人员</view>
<!-- ({{count[1]}}) -->
</view>
</view>
<view class="" style="margin-top:90upx ;" :hidden="!(tabactive==1)">
<view class="">
<view class="" style="text-align: center;height: 120upx;line-height: 120upx;font-weight: bold;font-size: 32upx;">
已有 <text style="color: #21B94C;font-size: 60upx;">{{receivePeopleNumber}}</text>人参与
</view>
</view>
<view class="" style="height: 100upx;padding: 0 24upx;background-color: rgb(255, 255, 255);margin-bottom: 2upx;"v-for="(item,index) in getAllDetail">
<view class="fx " style="justify-content: space-between;background-color: #fff; align-items: center;height: 100%">
<view class="fx" style="width: 75%;align-items: center;">
<view style="height: 80upx;width: 80upx;border-radius: 120upx;text-align: center;line-height: 80upx;overflow: hidden;">
<image :src="item.face" style="display: inline;"></image>
</view>
<view style="margin:0 0 0 10upx;width: 75%;padding: 20upx 10upx;">
<view style="font: 34upx 微软雅黑;padding-bottom:10upx ;" class="oneline">{{item.nickname}}</view>
<view style="font-size:20upx;color:rgb(116, 113, 113);padding-top: 10upx;">{{item.create_time}}</view>
</view>
</view>
<view style="width: 15%;height: 104upx;">
<!-- <image src="/static/lingqu.png" mode="" style="width:100% ;height: 100%;display: inline;"></image> -->
</view>
<!-- 关注插槽 -->
<!-- <slot name="before"></slot> -->
</view>
<!-- <slot name="content"> </slot> -->
</view>
<view v-if="getAllDetail.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;">
<image src="https://kazuma.jxdsy.cn//static/applet5/images/uts/meiyoule.png" mode=""></image>
</view>
</view>
<view class="" style="margin-top:90upx ;" :hidden="tabactive==1">
<view class="">
<view class="" style="text-align: center;height: 120upx;line-height: 120upx;font-weight: bold;font-size: 32upx;">
已有 <text style="color: #21B94C;font-size: 60upx;">{{enterPeopleNumber}}</text>人核销
</view>
</view>
<view class="" style="height: 100upx;padding: 0 24upx;background-color: rgb(255, 255, 255);margin-bottom: 2upx;"
v-for="(item,index) in getScanDetail">
<view class="fx " style="justify-content: space-between;background-color: #fff; align-items: center;
height: 100%">
<view class="fx" style="width: 75%;align-items: center;">
<view style="height: 80upx;width: 80upx;border-radius: 120upx;text-align: center;line-height: 80upx;overflow: hidden;">
<image :src="item.face" style="display: inline;"></image>
</view>
<view style="margin:0 0 0 10upx;width: 75%;padding: 20upx 10upx;">
<view style="font: 34upx 微软雅黑;padding-bottom:10upx ;" class="oneline">{{item.nickname}}</view>
<view style="font-size:20upx;color:rgb(116, 113, 113);padding-top: 10upx;">{{item.verification_time}}</view>
</view>
</view>
<view style="width: 10%;height: 70upx;">
<image src="/static/lingqu.png" mode="" style="width:100% ;height: 100%;display: inline;"></image>
</view>
<!-- 关注插槽 -->
<!-- <slot name="before"></slot> -->
</view>
<!-- <slot name="content"> </slot> -->
</view>
<view v-if="getScanDetail.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;">
<image src="https://kazuma.jxdsy.cn//static/applet5/images/uts/meiyoule.png" mode=""></image>
</view>
</view>
</view>
</template>
<script>
import {
activity_user
} from '@/utils/api/merchant.js';
export default {
data() {
return {
shop_id: '',
activity_id: '',
getAllDetail: [], // 参与人员列表
getScanDetail: [], //核销人员列表
allpage: 0, // 参与人员分页数
scanpage: 0, //核销人员分页数
enterPeopleNumber:0,//核销人数
receivePeopleNumber: 0, //参与人数
// unreceivePeopleNumber: 0,
tabactive: 1,
}
},
onLoad(options) {
let that = this
that.activity_id = options.activity_id
uni.getStorage({
key: 'userInfo',
success(res) {
that.shop_id = res.data.shop_id
}
})
this.activityUserAll(that.shop_id, that.activity_id); //获取参与人员
},
/**
* 触底事件
*/
onReachBottom() {
// console.log('触底了',this.tabactive)
if (this.tabactive == 1) {
this.allpage++
// this.activityUserAll(this.shop_id, this.activity_id, 0, this.allpage)
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: 0,
page: this.allpage
}).then(res => {
if (res.code == 0) {
this.getScanDetail =[...this.getScanDetail,...res.data.list]
this.receivePeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
} else if (this.tabactive == 2) {
this.scanpage++
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: 1,
page: this.scanpage
}).then(res => {
if (res.code == 0) {
this.getScanDetail =[this.getScanDetail,...res.data.list]
this.enterPeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
// this.activityUserScan(this.shop_id, this.activity_id, 1, this.scanpage)
} else {
return false;
}
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
this.allpage = 1
this.scanpage = 1
this.activityUserAll(this.shop_id, this.activity_id, )
this.activityUserScan(this.shop_id, this.activity_id)
uni.stopPullDownRefresh();
},
methods: {
taggletab(index) {
this.tabactive = index;
if (index == 1) {
this.activityUserAll(this.shop_id, this.activity_id, )
} else if (index == 2) {
this.activityUserScan(this.shop_id, this.activity_id)
}
},
/**
* @param {Number} nucleus
* @param {Number} activity_id
* @param {Number} shop_id
*/
activityUserAll(shop_id, activity_id, nucleus = 0, pages = 0) {
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: nucleus,
page: pages
}).then(res => {
if (res.code == 0) {
this.getAllDetail =res.data.list
this.receivePeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
},
/**
* @param {Number} nucleus
* @param {Number} activity_id
* @param {Number} shop_id
*/
activityUserScan(shop_id, activity_id, nucleus = 1, pages = 0) {
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: nucleus,
page: pages
}).then(res => {
if (res.code == 0) {
this.getScanDetail =res.data.list
this.enterPeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
}
},
}
</script>
<style lang="scss">
.projuctlist {
margin: 130upx 24upx;
padding-top: 18upx;
background: rgba(255, 255, 255, 1);
border-radius: 14upx;
.itempro {
position: relative;
border-bottom: 1px solid rgba(220, 220, 220, 1);
padding: 20upx;
.thumbnail {
width: 170upx;
height: 170upx;
border-radius: 6upx;
margin-right: 27upx;
margin-left: 20upx;
}
.infobox {
.title {
font-size: 34upx;
color: rgba(51, 51, 51, 1);
//margin-bottom: 5upx;
}
.time {
//margin-bottom: 5upx;
}
.time,
.price {
font-size: 30upx;
color: rgba(153, 153, 153, 1);
}
}
.btnbox {
position: absolute;
bottom: 5px;
right: 5px;
.btns {
width: 100upx;
height: 60upx;
line-height: 60upx;
text-align: center;
border: 1upx solid rgba(160, 160, 160, 1);
border-radius: 4upx;
font-size: 30upx;
color: rgba(0, 0, 0, 1);
}
.btnboxdel {
margin-left: 16upx;
}
.btnboxxj {
background: #FF6900;
color: #FFFFFF;
border: 0;
margin-left: 16upx;
}
}
}
}
.projuctTab {
background: #FFFFFF;
width: 100%;
height: 98upx;
line-height: 98upx;
position: fixed;
top: 0;
/* #ifdef H5 */
top: 86upx;
/* #endif */
left: 0;
z-index: 99;
.tabitems {
text-align: center;
.tabtitle {
text-align: center;
height: 98upx;
line-height: 98upx;
font-size: 30upx;
display: inline-block;
box-sizing: border-box;
color: #333333;
}
}
.tabitems.active {
.tabtitle {
font-family: PingFang SC;
font-weight: bold;
color: #FF6900;
border-bottom: 1px solid #FF6900;
}
}
}
.fx {
display: flex;
}
.guanzhu {
padding: 24upx;
border-top: 2upx solid #eee;
/* border-bottom: 1upx solid #eee; */
}
.pd24 {
padding: 24upx
}
</style>
This diff is collapsed.
<template>
<view class="w1005">
<view class="flex" style="padding: 20upx 24upx;background-color: #fff;margin-bottom: 20rpx;">
<view class="">
开始桌号:
</view>
<view class="">
<input type="number" v-model="startName" placeholder="桌号 整数" placeholder-style="font-size:24upx" />
</view>
</view>
<view class="flex" style="padding: 20upx 24upx;background-color: #fff;margin-bottom: 20rpx;">
<view class="">
结束桌号:
</view>
<view class="">
<input type="number" v-model="endName" placeholder="桌号 整数" placeholder-style="font-size:24upx" />
</view>
</view>
<button class="submitbtn" type="default" @click="addTable">添加桌码</button>
</view>
</template>
<script>
import {
addTable
} from "@/utils/api/api.js";
export default {
data() {
return {
startName:'',
endName:''
}
},
onLoad() {
// this.addTable('add', '05');
},
onShow() {
},
methods: {
//name,修改 传 table_id
addTable() {
let that = this
if(this.tableName == ""){
uni.showToast({
title:"请填写桌号",
icon:"none"
})
return;
}
uni.showLoading({
title:'正在添加,请稍后...'
})
addTable({
name: that.startName,
end_name:that.endName
}).then(res => {
if(res.code==0){
uni.hideLoading()
uni.showToast({
title:res.msg,
icon:"none",
success() {
that.startName = '',
that.endName =''
}
})
}
})
},
}
}
</script>
<style>
.submitbtn {
margin: 60upx 24upx;
height: 88upx;
line-height: 88upx;
text-align: center;
background: #f64f15;
border-radius: 6upx;
font-size: 32upx;
color: rgba(255, 255, 255, 1);
}
</style>
/* 页面左右间距 */
$page-row-spacing: 30upx;
$page-color-base: #f8f8f8;
/* 文字尺寸 */
$font-base: 28upx;
$font-lg: 32upx;
/*文字颜色*/
$font-color-dark: #303133;
$font-color-light: #909399;
/* 边框颜色 */
/* 图片加载中颜色 */
/* 行为相关颜色 */
$uni-color-primary:#fa436a;
page{
background: $page-color-base;
}
.list-cell{
display:flex;
align-items:center;
padding: 20upx $page-row-spacing;
line-height:60upx;
position:relative;
background: #fff;
justify-content: center;
&.log-out-btn{
padding-top: 100upx;box-sizing: border-box;
.cell-tit{
color: $uni-color-primary;
text-align: center;
margin-right: 0;
}
}
&.cell-hover{
background:#fafafa;
}
&.b-b:after{
left: 30upx;
}
&.m-t{
margin-top: 16upx;
}
.cell-more{
align-self: baseline;
font-size:$font-lg;
color:$font-color-light;
margin-left:10upx;
}
.cell-tit{
flex: 1;
font-size: $font-base + 2upx;
color: $font-color-dark;
margin-right:10upx;
}
.cell-tip{
font-size: $font-base;
color: $font-color-light;
}
switch{
transform: translateX(16upx) scale(.84);
}
.jiantousi{
width: 40upx;
height: 40upx;
}
}
.list-cell.b-b:after {
left: 30upx;
}
.b-b:after {
bottom: 0;
}
.b-b:after, .b-t:after {
position: absolute;
z-index: 3;
left: 0;
right: 0;
height: 0;
content: '';
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
border-bottom: 1px solid #E4E7ED;
}
.log-out-btncolor{
color:#fff !important;
}
.button{
width: 98%;
height: 80upx;margin: 0 auto;background-color: #ff6900;text-align: center;line-height: 80upx;border-radius: 50upx;
}
\ No newline at end of file
<template>
<!-- 设置页面 -->
<view class="setup">
<view class="container">
<navigator url="/pages/table_code/tableCodeList/tableCodeList" class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">我的餐台码</text>
<image class="jiantousi" src="/static/news/jiantousi.png" mode=""></image>
</navigator>
<navigator url="/pages/table_code/addTableCode/addTableCode" class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">添加餐台码</text>
<image class="jiantousi" src="/static/news/jiantousi.png" mode=""></image>
</navigator>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
};
},
onLoad() {
},
computed: {
//选中状态
ischecked() {
return this.$store.state.isvoice;
},
debug() {
return debug;
}
},
methods:{
}
}
</script>
<style lang="scss">
@import "./manageTableCode.scss";
</style>
<template>
<view class="flex-wrap jus-b" style="margin:24upx">
<view v-for="(item,index) in tableList" class="" @click="findCode(item.qr_code,item.name)" style="width: 49%;text-align: center;margin-bottom: 20upx;background-color: #FFFFFF;border-radius: 24upx;">
<view class="" style="font-size: 24upx;padding: 34upx 0;">
桌位号
</view>
<view class="" style="font-weight: bold;color: #F64F15;font-size: 100upx;">
{{item.name}}
</view>
<view class="flex jus-b" style="width: 80%;font-size: 32upx;margin: 24rpx auto 44upx;">
<view @click.stop="delcode(item.table_id,index)" style="color: #808080;background-color: #E0E0E0;padding: 2rpx 34upx;border-radius: 24upx;">删除</view>
<view @click.stop="showedit(item.table_id)" style="color: #FFFFFF;background-color: #F64F15;padding: 2rpx 34upx;border-radius: 24upx;">修改</view>
</view>
</view>
<uni-popup ref="popup" type="center">
<view class="" style="background-color: #EEEEEE;padding:44upx 24upx 1upx 24upx;border-radius: 20upx;">
<view class="flex" style="padding: 20upx 24upx;background-color: #fff;margin-bottom: 20rpx;border-radius: 10upx;">
<view class="">
桌号:
</view>
<view class="">
<input type="text" v-model="name" placeholder="桌号三位数 例如:001,002" placeholder-style="font-size:24upx" />
</view>
</view>
<button class="submitbtn" type="default" @click="editcode">确认修改</button>
</view>
</uni-popup>
</view>
</template>
<script>
import {
eleTable,
deleteTable,
addTable as editTable
} from "@/utils/api/api.js";
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
data() {
return {
tableList: [],
name: ''
}
},
components: {
uniPopup
},
onShow() {
},
//下拉刷新
onPullDownRefresh() {
this.eletable();
uni.stopPullDownRefresh();
},
onLoad() {
this.eletable();
},
methods: {
findCode(qr_code, name) {
console.log(qr_code)
uni.navigateTo({
url: `/pages/table_code/table_code/table_code?codeurl=${qr_code}&name=${name}`
})
},
eletable() {
eleTable({}).then(res => {
if (res.code == 0) {
this.tableList = res.data
}
})
},
delcode(table_id, index) {
let that = this
uni.showModal({
title: '提示',
content: '确定删除?',
success: function(res) {
if (res.confirm) {
uni.showLoading({
title: '正在删除'
})
deleteTable({
table_id: table_id
}).then(res => {
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: "none",
success() {
// that.tableList.splice(index,0)
that.eletable();
}
})
}
})
}
}
});
},
showedit(table_id) {
this.$refs.popup.open();
this.table_id = table_id
},
editcode() {
let that = this
uni.showLoading({
title: "正在修改"
})
editTable({
name: that.name,
table_id: that.table_id
}).then(res => {
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: "none",
success() {
that.eletable();
that.$refs.popup.close();
that.name = ""
}
})
}
});
}
},
}
</script>
<style>
.submitbtn {
margin: 60upx 24upx;
height: 88upx;
line-height: 88upx;
text-align: center;
background: #f64f15;
border-radius: 6upx;
font-size: 32upx;
color: rgba(255, 255, 255, 1);
}
</style>
This diff is collapsed.
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