Browse Source

Merge branch 'dev' into tid1553

tid1731
刘嘉炜 10 months ago
parent
commit
9b64850131
  1. 17
      src/pages.json
  2. 2
      src/pages/index/index.vue
  3. 11
      src/pages/write_off/menu/menu.vue
  4. 2
      src/pages/write_off/operate/operate.vue
  5. 8
      src/pages/write_off/ym_confirm/ym_confirm.vue
  6. 12
      src/subpackage/verification/js/api.js
  7. 10
      src/subpackage/verification/js/server.js
  8. 284
      src/subpackage/verification/pages/site_people/index.vue
  9. 66
      src/subpackage/verification/pages/site_people/modules/auto_clean.vue
  10. 73
      src/subpackage/verification/pages/site_people/modules/classify_tab.vue
  11. 62
      src/subpackage/verification/pages/site_people/modules/methods_bar.vue
  12. 155
      src/subpackage/verification/pages/site_people/modules/modify_number.vue
  13. 127
      src/subpackage/verification/pages/site_people/modules/not_leave_modal.vue
  14. 67
      src/subpackage/verification/pages/site_people/modules/number_show.vue
  15. 97
      src/subpackage/verification/pages/site_people/modules/stadium_select.vue
  16. BIN
      src/subpackage/verification/static/images/arrow_c33.png
  17. BIN
      src/subpackage/verification/static/images/countdown_bg.png
  18. BIN
      src/subpackage/verification/static/images/x_close.png

17
src/pages.json

@ -177,12 +177,6 @@
}
},
{
"path": "pages/write_off/number_of_people/number_of_people",
"style": {
"navigationBarTitleText": "查询"
}
},
{
"path": "pages/write_off/menu/menu",
"style": {
"navigationBarTitleText": "核销订单"
@ -866,6 +860,17 @@
}
}
]
},
{
"root": "subpackage/verification",
"pages": [
{
"path": "pages/site_people/index",
"style" : {
"navigationBarTitleText": "现场人数"
}
}
]
}
],
"globalStyle": {

2
src/pages/index/index.vue

@ -251,7 +251,7 @@
});
}
if(tabInfo.id === 10 || tabInfo.id === 11)return util.routeTo(tabInfo.path + `?brand_id=${indexData.brand.id}`,'nT');
if([ 10, 11, 4 ].includes(tabInfo.id))return util.routeTo(tabInfo.path + `?brand_id=${indexData.brand.id}`,'nT');
if(tabInfo.id === 12){
// if(!indexData.brand.mini_wechat_appid)return util.showNone('appid')

11
src/pages/write_off/menu/menu.vue

@ -56,9 +56,18 @@
import util from '../../../utils/util';
import { WRITE_OFF_STORE_NAME } from '../../../js/once_name';
export default {
data(){
return {
brand_id: ''
}
},
onLoad(options){
this.brand_id = options?.brand_id || ''
},
methods: {
toPeopleNum(){
util.routeTo(`/pages/write_off/number_of_people/number_of_people`, 'nT');
let _qryStr = `brand_id=${this.brand_id}`
util.routeTo(`/subpackage/verification/pages/site_people/index?${_qryStr}`, 'nT');
},
toOperate(type){
util.$_emit(WRITE_OFF_STORE_NAME, null);

2
src/pages/write_off/operate/operate.vue

@ -252,7 +252,7 @@ export default {
//
if(_data.extension&&_data.extension.verify_order_type === 'monthly_card'){
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data});
util.$_emit(WRITE_OFF_ORDER_INFO, { data: _data, query });
util.routeTo(`/pages/write_off/ym_confirm/ym_confirm?type=${vType}`, 'nT');
return
}

8
src/pages/write_off/ym_confirm/ym_confirm.vue

@ -45,14 +45,16 @@ export default {
orderInfo: {
extension: {},
card_info: {}
}
},
operate_stadium_id: '', // id, id
}
},
onLoad(options){
if(options.type)this.type = options.type || '';
util.$_once(WRITE_OFF_ORDER_INFO, data => {
console.warn(data)
this.orderInfo = data;
this.orderInfo = data?.data || {};
this.operate_stadium_id = data?.query?.stadium_id ?? data?.data?.stadium_id ?? '';
})
},
methods: {
@ -67,7 +69,7 @@ export default {
data: {
brand_id: orderInfo.brand_id,
card_no: orderInfo.card_no,
stadium_id: orderInfo.stadium_id,
stadium_id: this.operate_stadium_id ?? '',
type: type == 'verify_code'? 5 : 6,
},
isDefaultGet: false,

12
src/subpackage/verification/js/api.js

@ -0,0 +1,12 @@
import { ORIGIN } from '@/js/api';
export const SUB_API = {
stadiumList: `${ORIGIN}/admin/stadium/list`, // 店铺列表
skNumber: `${ORIGIN}/stadium/sk/number`, // 散客人数 - 进场人数
skNotLeavingNums: `${ORIGIN}/stadium/sk/notLeavingNums`, // 【1001536】散客人数 - 未离场订单数量
setStadiumPresentNumber: `${ORIGIN}/admin/stadium/setStadiumPresentNumber`, // 商家助手散客人数校正
timingOpen: `${ORIGIN}/stadium/person/timing/open`, // 【20220208】凌晨自动清零【开/关】
}
export default SUB_API;

10
src/subpackage/verification/js/server.js

@ -0,0 +1,10 @@
import { Server } from '../../../js/server';
class SubServer extends Server {
constructor(props){
super(props)
}
}
export default new SubServer();

284
src/subpackage/verification/pages/site_people/index.vue

@ -0,0 +1,284 @@
<template>
<view class="site-people">
<stadium-select
ref="stadiumSelect"
@change:stadium="stadiumChange"
></stadium-select>
<methods-bar
:type="igsType"
></methods-bar>
<classify-tab
v-if="[1, 2].includes(igsType)&&tabLs.length"
:tabs="tabLs"
@click:tab="tabLs = $event"
></classify-tab>
<number-show :num="siteNum"></number-show>
<view class="sp-modify" @click="modifyBtn">修改人数</view>
<view class="sp-check" @click="checkNotLeaveBtn">查看未离场订单</view>
<auto-clean
:auto-clean="siteInfo.present_person_number_clear"
@switch:change="switchAutoClean"
></auto-clean>
<modify-number ref="modifyNum"></modify-number>
<not-leave-modal ref="notLeaveModal"></not-leave-modal>
</view>
</template>
<script>
import stadium_select from "./modules/stadium_select.vue";
import auto_clean from "./modules/auto_clean.vue";
import methods_bar from "./modules/methods_bar.vue";
import classify_tab from "./modules/classify_tab.vue";
import number_show from "./modules/number_show.vue";
import modify_number from "./modules/modify_number.vue";
import not_leave_modal from './modules/not_leave_modal.vue';
import API from "../../js/api.js";
import server from "../../js/server.js";
import { showLoad, hideLoad, showNone } from "@/utils/util.js";
export default {
components: {
'stadium-select': stadium_select,
'auto-clean': auto_clean,
'methods-bar': methods_bar,
'classify-tab': classify_tab,
'number-show': number_show,
'modify-number': modify_number,
'not-leave-modal': not_leave_modal
},
computed: {
igsType(){
// 0/ 1/ 2
return this.siteInfo?.igs_type || 0;
},
//
siteNum(){
let { igsType, siteInfo, tabLs } = this;
if(igsType === 0) return siteInfo?.stadium_num || 0;
if([1,2].includes(igsType)){
let _tab = tabLs.find(e=>e.selected);
return _tab?.number || 0;
};
return 0
}
},
data(){
return {
stadiumInfo: {},
siteInfo: {},
tabLs: [
// { [label], [key], [number], [selected] }
],
intervalTimer: null
}
},
async onLoad(options){
this.$refs.stadiumSelect.initStadium(options?.brand_id || '')
.then(stadiumInfo=>{
if(!stadiumInfo?.id) return;
this.stadiumInfo = stadiumInfo;
this.initData({
brand_id: options?.brand_id || '',
stadium_id: stadiumInfo?.id || ''
})
})
},
onShow(){
this.setTimer();
},
onHide(){
this.clearTimer(this.intervalTimer);
},
onUnload(){
this.clearTimer(this.intervalTimer);
},
methods: {
setTimer(){
this.intervalTimer = setInterval(()=>{
let { brand_id, id } = this.stadiumInfo;
if(!brand_id || !id) return;
this.refreshData({ brand_id, stadium_id: id });
}, 5000)
},
clearTimer(timer){
try{
clearInterval(timer);
timer = null;
}catch(err){
}
},
stadiumChange(sInfo){
if(!sInfo?.id) return;
this.stadiumInfo = sInfo;
this.initData({
brand_id: sInfo?.brand_id || '',
stadium_id: sInfo?.id || ''
})
},
async initData({ brand_id, stadium_id }){
try{
showLoad();
let _skInfo = await this.getSkNumber({ brand_id, stadium_id });
hideLoad();
this.resetData(_skInfo);
}catch(err){
console.warn('site people index initData err', err);
}
},
//
resetData(res){
this.siteInfo = res || {};
this.tabLs = [];
if([1,2].includes(res?.igs_type)){
let _tabLs = this.getTabList(res);
_tabLs[0].selected = true;
this.tabLs = _tabLs;
}
},
async refreshData({ brand_id, stadium_id }){
let { siteInfo, tabLs } = this;
let _skInfo = await this.getSkNumber({ brand_id, stadium_id });
if(_skInfo?.igs_type === siteInfo?.igs_type){
if(_skInfo?.igs_type === 0)return this.siteInfo = _skInfo;
let _tabLs = this.getTabList(_skInfo);
let _selectedTab = tabLs.find(e=>e.selected);
let _newTabIdx = _tabLs.findIndex(e=>e.key === _selectedTab?.key);
if(_newTabIdx > -1){
_tabLs[_newTabIdx].selected = true;
this.tabLs = _tabLs;
this.siteInfo = _skInfo;
}else{
this.resetData(_skInfo);
}
}else{
this.resetData(_skInfo);
}
this.$forceUpdate();
},
getSkNumber({ brand_id, stadium_id }){
return server.post({
url: API.skNumber,
data: {
brand_id,
stadium_id,
},
failMsg: '加载现场人数信息失败!'
})
.then(res=>{
// if(stadium_id === 156){
// res.igs_type = 1;
// res.hw_num = [
// { gate_id: 1, gate_name: 'A', number: 10 },
// { gate_id: 2, gate_name: 'B', number: 20 },
// { gate_id: 3, gate_name: 'C', number: 30 },
// ]
// }
// if(stadium_id === 151){
// res.igs_type = 2;
// res.vt_num = [
// { venue_type_key: 1, venue_type_name: '', number: 101 },
// { venue_type_key: 2, venue_type_name: '', number: 210 },
// { venue_type_key: 3, venue_type_name: '', number: 310 },
// ]
// }
return res || {};
})
.catch(err=>{
console.warn('site people index getSkNumber', err);
})
},
getTabList(res){
let _ls = [];
if(res?.igs_type === 1){ //
res?.hw_num?.forEach(e=>{
if(e?.gate_id)_ls.push({
label: e?.gate_name || '',
key: e?.gate_id,
number: e?.number || 0
})
})
}
if(res?.igs_type === 2){ //
res?.vt_num?.forEach(e=>{
if(e?.venue_type_key)_ls.push({
label: e?.venue_type_name || '',
key: e?.venue_type_key,
number: e?.number || 0
})
})
}
return _ls;
},
modifyBtn(){
let { siteNum, stadiumInfo, tabLs, igsType } = this;
let { brand_id, id } = stadiumInfo;
this.$refs.modifyNum.initData({
num: siteNum,
brand_id,
stadium_id: id,
igsType,
key: tabLs.find(e=>e.selected)?.key,
success: ()=>{
this.refreshData({ brand_id, stadium_id: id });
}
});
},
//
switchAutoClean(status){
let { brand_id, id } = this.stadiumInfo;
server.get({
url: API.timingOpen,
data: {
brand_id: brand_id,
stadium_id: id,
status: status
},
failMsg: '操作失败!'
})
.then(res=>{
hideLoad();
showNone('操作成功!');
setTimeout(_=>{
this.refreshData({ brand_id, stadium_id: id });
}, 1000)
})
},
checkNotLeaveBtn(){
let { tabLs, stadiumInfo, igsType } = this;
let { brand_id, id } = stadiumInfo;
this.$refs.notLeaveModal.initData({
brand_id,
stadium_id: id,
igsType,
key: tabLs.find(e=>e.selected)?.key
});
},
}
}
</script>
<style lang="scss">
page{
background: #fff;
}
.sp-modify{
margin: 40upx auto 0;
width: 618upx;
text-align: center;
border-radius: 10upx;
background: $mColor;
@include flcw(32upx, 88upx, #fff);
}
.sp-check{
margin-top: 24upx;
margin-bottom: 60upx;
text-decoration: underline;
text-align: center;
@include flcw(24upx, 34upx, $mColor);
}
</style>

66
src/subpackage/verification/pages/site_people/modules/auto_clean.vue

@ -0,0 +1,66 @@
<template>
<view class="auto-clean">
<view class="ac-line">
<view class="al-txt">凌晨自动清零</view>
<switch class="al-switch" color="#009777" :checked="autoClean" disabled @click="switchClick"></switch>
</view>
<view class="ac-desc">
*不开启凌晨自动清零则现场灯光按<text class="ad-txt">现场散客人数</text>去判断是否开启或关闭<text class="ad-txt">修改人数会直接影响现场灯光开关!</text>
</view>
<view class="ac-desc">
*开启凌晨自动清零则现场灯光按<text class="ad-txt">散客订单未离场数量</text>去判断是否开启或关闭<text class="ad-txt">修改人数不会影响现场灯光开关但如有散客订单一直未扫码离场可能会无法关灯需要将未离场的散客订单设置为已离场后才可关闭灯光!</text>
</view>
</view>
</template>
<script>
import { showModal } from "@/utils/util.js";
export default {
props: {
autoClean: {
type: Boolean,
default: false
}
},
methods: {
switchClick(){
let { autoClean } = this;
let _contentTxt = autoClean ? '是否确认关闭凌晨自动清零?' : '是否确认开启凌晨自动清零?';
showModal({
content: _contentTxt,
showCancel: true,
success: e=> {
if(e.confirm){
let _status = autoClean ? 0 : 1;
this.$emit('switch:change', _status);
}
}
})
}
}
}
</script>
<style lang="scss">
.auto-clean{
padding: 30upx;
.ac-line{
@include ctf;
.al-txt{
@include flcw(32upx, 44upx, #1A1A1A, 500);
}
.al-switch{
margin-left: 26upx;
transform: scale(.7);
}
}
.ac-desc{
margin-top: 24upx;
@include flcw(24upx, 48upx, #9C9C9F);
.ad-txt{
color: $mColor;
}
}
}
</style>

73
src/subpackage/verification/pages/site_people/modules/classify_tab.vue

@ -0,0 +1,73 @@
<template>
<scroll-view class="classify-tab" scroll-x>
<view class="ct-list">
<view
v-for="(e, i) in tabs"
:key='i'
class="cl-item"
:class="{ 'cl-active': e.selected }"
@click="tabChange(i)"
>
<view class="ci-box">{{ e.label }}</view>
</view>
</view>
</scroll-view>
</template>
<script>
export default {
props: {
tabs: {
type: Array,
default: () => []
}
},
methods: {
tabChange(index){
let { tabs } = this;
this.$emit('click:tab', tabs.map(e=>{
let _obj = { ...e };
if(tabs[index].key === e.key){
_obj.selected = true;
}else{
_obj.selected = false;
}
return _obj;
}));
}
}
}
</script>
<style lang="scss" >
.classify-tab{
height: 94upx;
border-bottom: 1px solid #D8D8D8;
.ct-list{
padding: 0 40upx;
width: fit-content;
white-space: nowrap;
font-size: 0;
.cl-item{
display: inline-block;
flex-shrink: 0;
flex-grow: 0;
border-bottom: 8upx solid transparent;
.ci-box{
padding: 0 40upx;
text-align: center;
@include flcw(28upx, 80upx, #2D2D2D);
}
&+.cl-item{
margin-left: 70upx;
}
&.cl-active{
border-bottom-color: $mColor;
.ci-box{
color: $mColor;
}
}
}
}
}
</style>

62
src/subpackage/verification/pages/site_people/modules/methods_bar.vue

@ -0,0 +1,62 @@
<template>
<view class="methods-bar">
<view class="mb-top">
<view class="mt-method">现场人数统计方式{{ typeForTxt }}</view>
<view class="mt-date">{{ date || '' }}</view>
</view>
<view class="mb-tip">统计方式如需修改请前往后台散客开关灯规则处修改</view>
</view>
</template>
<script>
import { formatDate } from "@/utils/util.js";
export default {
props: {
type: {
type: Number,
default: 0
}
},
data(){
return {
date: ''
}
},
computed: {
typeForTxt(){
const { type } = this;
const tArr = ['按门店', '按门闸/门禁', '按场地分类'];
return tArr?.[type] ?? '';
}
},
mounted(){
this.$nextTick(() => {
this.date = formatDate({ partition: '.' });
})
},
methods: {
}
}
</script>
<style lang="scss">
.methods-bar{
padding: 0 24upx;
.mb-top{
@include ctf(space-between);
.mt-method{
@include flcw(28upx, 40upx, #1A1A1A);
}
.mt-date{
flex-shrink: 0;
@include flcw(28upx, 40upx, #1A1A1A);
}
}
.mb-tip{
@include flcw(20upx, 28upx, #9C9C9F);
}
}
</style>

155
src/subpackage/verification/pages/site_people/modules/modify_number.vue

@ -0,0 +1,155 @@
<template>
<view class="ox-dark-mask" v-show="visible">
<view class="nop-modifies-modal">
<image class="nmm-close" src="../../../static/images/x_close.png" @click="hide"></image>
<view class="nmm-tit">修改现场散客人数</view>
<view class="nmm-info">
<view class="ni-num">当前现场散客人数为{{ nowNum || 0 }}</view>
<input class="ni-ipt" placeholder="请输入散客人数" v-model="changeNum" type="number" />
<view class="ni-tip">修改现场人数可能会影响现场灯光开关请谨慎操作</view>
</view>
<view class="nmm-btns">
<view @click="hide">取消</view>
<view @click="confirm">确认</view>
</view>
</view>
</view>
</template>
<script>
import API from "../../../js/api.js";
import server from "../../../js/server.js";
import { showNone, showLoad, hideLoad } from "@/utils/util.js";
export default {
props: {
num: { default: 0 }
},
data(){
return {
visible: false,
nowNum: 0, //
brand_id: '',
stadium_id: '',
igsType: '',
key: '', // gate_id / venue_type_key
initOptions: {},
changeNum: '',
}
},
methods: {
confirm(){
let { brand_id, stadium_id, changeNum, igsType, key } = this;
if(isNaN(changeNum))return showNone('请输入正确数量!');
let _query = { brand_id, stadium_id, number: changeNum };
let _keyName = igsType === 1 ? 'gate_id' : igsType === 2 ? 'venue_type_key' : '';
if(_keyName)_query[_keyName] = key || '';
this.setStadiumPresentNumber(_query)
},
/**
* @param { String } brand_id 品牌id
* @param { String } stadium_id 场馆id
* @param { String } venue_type_key 场地分类KEYigs_type=2时必传
* @param { String } gate_id 门禁IDigs_type=1时必传
* @param { String } number 人数
* */
setStadiumPresentNumber(_query){
showLoad();
server.post({
url: API.setStadiumPresentNumber,
data: _query,
isDefaultGet: false,
})
.then(res=>{
hideLoad();
if(res.data.code == 0){
showNone(res.data.message || '操作成功!');
this.$emit('modify:success');
this.initOptions?.success?.();
}else{
showNone(res.data.message || '操作失败!');
}
this.hide();
})
.catch(hideLoad)
},
initData(e){
let { num, brand_id, stadium_id, igsType, key, ...opts } = e;
this.nowNum = num || 0;
this.brand_id = brand_id || '';
this.stadium_id = stadium_id || '';
this.igsType = igsType || '';
this.key = key || '';
this.initOptions = opts;
this.show();
},
show(){
this.visible = true
},
hide(){
this.visible = false
}
}
}
</script>
<style lang="scss">
.ox-dark-mask{
z-index: 10;
}
.nop-modifies-modal{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
padding-top: 78upx;
width: 620upx;
height: 706upx;
background-color: #fff;
border-radius: 10upx;
.nmm-close{
position: absolute;
right: 30upx;
top: 30upx;
width: 34upx;
height: 34upx;
}
.nmm-tit{
text-align: center;
@include flcw(32upx, 44upx, #1A1A1A, 500)
}
.nmm-info{
padding: 54upx 80upx 80upx;
.ni-num{
@include tHide;
@include flcw(28upx, 48upx, #1A1A1A);
}
.ni-ipt{
margin-top: 30upx;
padding: 0 20upx;
height: 88upx;
border-radius: 10upx;
border: 2upx solid #D8D8D8;
@include flcw(28upx, 40upx, #1A1A1A);
}
.ni-tip{
margin-top: 26upx;
@include flcw(24upx, 34upx, #EA5061);
}
}
.nmm-btns{
@include ctf(center);
>view{
margin: 0 10upx;
width: 240upx;
text-align: center;
border-radius: 10upx;
border: 2upx solid $mColor;
@include flcw(32upx, 84upx, $mColor);
&+view{
color: #fff;
background-color: $mColor;
}
}
}
}
</style>

127
src/subpackage/verification/pages/site_people/modules/not_leave_modal.vue

@ -0,0 +1,127 @@
<template>
<view class="not-leave-modal ox-dark-mask" v-show="visible">
<view class="nop-modifies-modal">
<image class="nmm-close" @click="hide" src="../../../static/images/x_close.png"></image>
<view class="nmm-tit">未离场订单</view>
<view class="nmm-line">
<view class="ml-view">次卡未离场{{ notLeaveInfo.person_number || 0 }}</view>
<view class="ml-view" @click="checkBtn(0)">查看</view>
</view>
<view class="nmm-line">
<view class="ml-view">计时未离场{{ notLeaveInfo.person_timing || 0 }}</view>
<view class="ml-view" @click="checkBtn(1)">查看</view>
</view>
<view class="nmm-line">
<view class="ml-view">年月卡未离场{{ notLeaveInfo.monthly_card || 0 }}</view>
<view class="ml-view" @click="checkBtn(0)">查看</view>
</view>
</view>
</view>
</template>
<script>
import API from "../../../js/api.js";
import server from "../../../js/server.js";
import { showNone, showLoad, hideLoad, routeTo } from "@/utils/util.js";
export default {
data(){
return {
visible: false,
notLeaveInfo: {}
}
},
methods: {
show(){
this.visible = true;
},
hide(){
this.visible = false;
},
initData(e){
let { igsType, key, stadium_id, brand_id } = e;
this.show();
let _keyName = igsType === 1 ? 'gate_id' : igsType === 2 ? 'venue_type_key' : '';
let _query = { brand_id, stadium_id };
if(_keyName)_query[_keyName] = key ?? '';
this.getSkNotLeavingNums(_query);
},
/**
* http://api.ouxuan.net:61080/project/11/interface/api/13892
* @param { String } brand_id 品牌id
* @param { String } stadium_id 场馆id
* @param { String } venue_type_key 场地分类KEYigs_type=2时必传
* @param { String } gate_id 门禁IDigs_type=1时必传
* */
getSkNotLeavingNums(_query){
showLoad();
return server.get({
url: API.skNotLeavingNums,
data: _query,
failMsg: '加载信息失败!'
})
.then(res=>{
hideLoad();
this.notLeaveInfo = res || {};
})
.catch(err=>{
hideLoad();
console.warn('site people not leave modal getSkNotLeavingNums err', err);
})
},
checkBtn(type){
if(type == 0)return routeTo(`/pages/write_off/search_result/search_result`, 'nT');
if(type == 1)return routeTo(`/pages/order_list/order_list?order_type=1`, 'nT');
},
}
}
</script>
<style lang="scss">
.not-leave-modal{
z-index: 10;
.nop-modifies-modal{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
padding: 80upx 80upx 0upx;
width: 620upx;
height: 542upx;
background-color: #fff;
border-radius: 10upx;
}
.nmm-close{
position: absolute;
right: 30upx;
top: 30upx;
width: 34upx;
height: 34upx;
}
.nmm-tit{
text-align: center;
@include flcw(32upx, 44upx, #1A1A1A, 500)
}
.nmm-line{
margin-top: 40upx;
@include ctf(space-between);
.ml-view{
&:first-child{
@include flcw(28rpx, 48rpx, #1A1A1A);
@include tHide;
}
&:nth-child(2){
margin-left: 10upx;
flex-shrink: 0;
width: 156rpx;
height: 68rpx;
text-align: center;
border-radius: 10rpx;
border: 2rpx solid $mColor;
@include flcw(32rpx, 64rpx, $mColor);
}
}
}
}
</style>

67
src/subpackage/verification/pages/site_people/modules/number_show.vue

@ -0,0 +1,67 @@
<template>
<view class="number-show">
<view class="ns-title">现场散客人数</view>
<view class="ns-frame">
<image class="nf-bg" mode="aspectFit" src="../../../static/images/countdown_bg.png"></image>
<view class="nf-txt">
<view class="nt-num">{{ num || 0 }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
num: {
type: Number,
default: 0
}
}
}
</script>
<style lang="scss">
.number-show{
padding-top: 40upx;
.ns-title{
text-align: center;
@include flcw(32upx, 44upx, #1A1A1A, 500);
}
.ns-frame{
position: relative;
margin: 40upx auto;
width: 272upx;
height: 272upx;
.nf-bg{
position: absolute;
left: 50%;
top: 50%;
margin-left: -75%;
margin-top: -75%;
width: 150%;
height: 150%;
animation: Rotate 6s linear infinite;
}
@keyframes Rotate{
0% {transform: rotate(360deg);}
50% {transform: rotate(180deg);}
100% {transform: rotate(0deg);}
}
.nf-txt{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
z-index: 2;
@include ctf(center);
.nt-num{
@include flcw(70upx, 100upx, $mColor, 500);
@include tHide;
}
}
}
}
</style>

97
src/subpackage/verification/pages/site_people/modules/stadium_select.vue

@ -0,0 +1,97 @@
<template>
<view class="stadium-select">
<picker :range="stadiumLs" range-key="name" @change="stadiumChange">
<view class="ss-frame">
<input class="sf-ipt" placeholder="请选择店铺" :value="curStadium.name" disabled />
<image class="sf-img" mode="aspectFit" src="../../../static/images/arrow_c33.png"></image>
</view>
</picker>
</view>
</template>
<script>
import API from "../../../js/api.js";
import server from "../../../js/server.js";
import { showLoad, hideLoad, showNone } from "@/utils/util.js";
export default {
data(){
return {
stadiumLs: [],
curStadium: {}
}
},
methods: {
stadiumChange(e){
let { value } = e?.detail;
let { stadiumLs } = this;
this.curStadium = stadiumLs?.[value] || {};
this.$emit('change:stadium', this.curStadium);
},
async initStadium(brand_id){
try{
showLoad();
let _ls = await this.getStadiumLs({ brand_id });
// _ls = _ls.filter(e=>{
// return [167, 156, 151].includes(e.id);
// })
this.stadiumLs = _ls || [];
hideLoad();
if(_ls.length){
this.curStadium = _ls[0];
return _ls[0];
}else{
showNone('暂无店铺信息!');
}
}catch(err){
hideLoad();
console.warn('stadium select initStadium err', err);
}
},
getStadiumLs({
page=1,
page_size=9999,
brand_id='',
}){
return server.get({
url: API.stadiumList,
data: {
page,
page_size,
brand_id,
},
failMsg: '获取店铺列表失败!'
})
.then(res=>{
let _list = res.list || [];
return _list
})
},
}
}
</script>
<style lang="scss">
.stadium-select {
height: 144upx;
@include ctf(center);
.ss-frame{
padding: 0 20upx;
width: 702upx;
height: 92upx;
border-radius: 10upx;
background-color: #F2F2F7;
@include ctf(space-between);
.sf-ipt{
flex-grow: 1;
@include flcw(28upx, 40upx, #1A1A1A);
}
.sf-img{
flex-shrink: 0;
margin-left: 20upx;
width: 28upx;
height: 28upx;
}
}
}
</style>

BIN
src/subpackage/verification/static/images/arrow_c33.png

After

Width: 24  |  Height: 24  |  Size: 599 B

BIN
src/subpackage/verification/static/images/countdown_bg.png

After

Width: 700  |  Height: 700  |  Size: 33 KiB

BIN
src/subpackage/verification/static/images/x_close.png

After

Width: 34  |  Height: 34  |  Size: 233 B

Loading…
Cancel
Save