first commit

This commit is contained in:
2020-07-12 11:20:28 +08:00
commit f11da03f58
375 changed files with 28683 additions and 0 deletions

26
App.vue Normal file
View File

@@ -0,0 +1,26 @@
<script>
import { mapMutations } from 'vuex';
export default {
methods: {
...mapMutations(['login','logout'])
},
onLaunch: function() {
console.log('App Launch')
let userInfo = uni.getStorageSync('userInfo') || '';
if (userInfo.token) {
console.log(userInfo.token)
this.login(userInfo)
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>

View File

@@ -0,0 +1,174 @@
<template>
<view>
<view class="tui-actionsheet-class tui-actionsheet" :class="[show?'tui-actionsheet-show':'']">
<view class="tui-tips" :style="{fontSize:size+'rpx',color:color}" v-if="tips">
{{tips}}
</view>
<view :class="[isCancel?'tui-operate-box':'']">
<block v-for="(item,index) in itemList" :key="index">
<view class="tui-actionsheet-btn tui-actionsheet-divider" :class="[(!isCancel && index==itemList.length-1)?'tui-btn-last':'']"
hover-class="tui-actionsheet-hover" :hover-stay-time="150" :data-index="index" :style="{color:item.color || '#1a1a1a'}"
@tap="handleClickItem">{{item.text}}</view>
</block>
</view>
<view class="tui-actionsheet-btn tui-actionsheet-cancel" hover-class="tui-actionsheet-hover" :hover-stay-time="150"
v-if="isCancel" @tap="handleClickCancel">取消</view>
</view>
<view class="tui-actionsheet-mask" :class="[show?'tui-mask-show':'']" @tap="handleClickMask"></view>
</view>
</template>
<script>
export default {
name: "tuiActionsheet",
props: {
//点击遮罩 是否可关闭
maskClosable: {
type: Boolean,
default: true
},
//显示操作菜单
show: {
type: Boolean,
default: false
},
//菜单按钮数组,自定义文本颜色,红色参考色:#e53a37
itemList: {
type: Array,
default: function() {
return [{
text: "确定",
color: "#1a1a1a"
}]
}
},
//提示文字
tips: {
type: String,
default: ""
},
//提示文字颜色
color: {
type: String,
default: "#9a9a9a"
},
//提示文字大小 rpx
size: {
type: Number,
default: 26
},
//是否需要取消按钮
isCancel: {
type: Boolean,
default: true
}
},
methods: {
handleClickMask() {
if (!this.maskClosable) return;
this.handleClickCancel();
},
handleClickItem(e) {
if (!this.show) return;
const dataset = e.currentTarget.dataset;
this.$emit('click', {
index: dataset.index
});
},
handleClickCancel() {
this.$emit('cancel');
}
}
}
</script>
<style>
.tui-actionsheet {
width: 100%;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
visibility: hidden;
transform: translate3d(0, 100%, 0);
transform-origin: center;
transition: all 0.3s ease-in-out;
background: #eaeaec;
min-height: 100rpx;
}
.tui-actionsheet-show {
transform: translate3d(0, 0, 0);
visibility: visible;
}
.tui-tips {
width: 100%;
padding: 30rpx 60rpx;
box-sizing: border-box;
text-align: center;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.tui-operate-box {
padding-bottom: 12rpx;
}
.tui-actionsheet-btn {
width: 100%;
height: 80rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 28rpx;
position: relative;
}
.tui-btn-last {
padding-bottom: env(safe-area-inset-bottom);
}
.tui-actionsheet-divider::before {
content: '';
width: 100%;
border-top: 1rpx solid #d9d9d9;
position: absolute;
top: 0;
left: 0;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
.tui-actionsheet-cancel {
color: #1a1a1a;
padding-bottom: env(safe-area-inset-bottom);
}
.tui-actionsheet-hover {
background: #f7f7f9;
}
.tui-actionsheet-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 9996;
transition: all 0.3s ease-in-out;
opacity: 0;
visibility: hidden;
}
.tui-mask-show {
opacity: 1;
visibility: visible;
}
</style>

809
components/icon/icon.vue Normal file

File diff suppressed because one or more lines are too long

330
components/tag/tag.vue Normal file
View File

@@ -0,0 +1,330 @@
<template>
<view class="tui-tag-class" :class="[size?'tui-tag-'+size:'tui-tag',getClassName(shape,plain),getTypeClass(type,plain)]"
@tap="handleClick" v-if="visible">
<slot></slot>
</view>
</template>
<script>
export default {
name: "tuiTag",
props: {
type: {
type: String,
default: 'primary'
},
// '', small
size: {
type: String,
default: ''
},
// circle, squarecircleLeftcircleRight
shape: {
type: String,
default: 'square'
},
//是否空心
plain: {
type: Boolean,
default: false
},
//是否可见
visible: {
type: Boolean,
default: true
}
},
methods: {
handleClick() {
this.$emit('click')
},
getTypeClass: function(type, plain) {
return plain ? 'tui-' + type + '-outline' : 'tui-' + type
},
getClassName: function(shape, plain) {
//circle, squarecircleLeftcircleRight
var className = plain ? 'tui-tag-outline ' : '';
if (shape != 'square') {
if (shape == "circle") {
className = className + (plain ? 'tui-tag-outline-fillet' : 'tui-tag-fillet');
} else if (shape == "circleLeft") {
className = className + 'tui-tag-fillet-left';
} else if (shape == "circleRight") {
className = className + 'tui-tag-fillet-right';
}
}
return className;
}
}
}
</script>
<style>
/* color start*/
.tui-primary {
background: #5677fc !important;
color: #fff;
}
.tui-light-primary {
background: #5c8dff !important;
color: #fff;
}
.tui-dark-primary {
background: #4a67d6 !important;
color: #fff;
}
.tui-dLight-primary {
background: #4e77d9 !important;
color: #fff;
}
.tui-danger {
background: #ed3f14 !important;
color: #fff;
}
.tui-red {
background: #ff201f !important;
color: #fff;
}
.tui-warning {
background: #ff7900 !important;
color: #fff;
}
.tui-green {
background: #19be6b !important;
color: #fff;
}
.tui-high-green {
background: #52dcae !important;
color: #52dcae;
}
.tui-black {
background: #000 !important;
color: #fff;
}
.tui-white {
background: #fff !important;
color: #333 !important;
}
.tui-translucent {
background: rgba(0, 0, 0, 0.7);
}
.tui-light-black {
background: #333 !important;
}
.tui-gray {
background: #ededed !important;
}
.tui-phcolor-gray {
background: #ccc !important;
}
.tui-divider-gray {
background: #eaeef1 !important;
}
.tui-btn-gray {
background: #ededed !important;
color: #999 !important;
}
.tui-hover-gray {
background: #f7f7f9 !important;
}
.tui-bg-gray {
background: #fafafa !important;
}
.tui-light-blue {
background: #ecf6fd;
color: #4dabeb !important;
}
.tui-light-brownish {
background: #fcebef;
color: #8a5966 !important;
}
.tui-light-orange {
background: #fef5eb;
color: #faa851 !important;
}
.tui-light-green {
background: #e8f6e8;
color: #44cf85 !important;
}
.tui-primary-outline::after {
border: 1px solid #5677fc !important;
}
.tui-primary-outline {
color: #5677fc !important;
background: none;
}
.tui-danger-outline {
color: #ed3f14 !important;
background: none;
}
.tui-danger-outline::after {
border: 1px solid #ed3f14 !important;
}
.tui-red-outline {
color: #ff201f !important;
background: none;
}
.tui-red-outline::after {
border: 1px solid #ff201f !important;
}
.tui-warning-outline {
color: #ff7900 !important;
background: none;
}
.tui-warning-outline::after {
border: 1px solid #ff7900 !important;
}
.tui-green-outline {
color: #44cf85 !important;
background: none;
}
.tui-green-outline::after {
border: 1px solid #44cf85 !important;
}
.tui-high-green-outline {
color: #52dcae !important;
background: none;
}
.tui-high-green-outline::after {
border: 1px solid #52dcae !important;
}
.tui-gray-outline {
color: #999 !important;
background: none;
}
.tui-gray-outline::after {
border: 1px solid #ccc !important;
}
.tui-black-outline {
color: #333 !important;
background: none;
}
.tui-black-outline::after {
border: 1px solid #333 !important;
}
.tui-white-outline {
color: #fff !important;
background: none;
}
.tui-white-outline::after {
border: 1px solid #fff !important;
}
/* color end*/
/* tag start*/
.tui-tag {
padding: 16upx 26upx;
font-size: 28upx;
border-radius: 6upx;
/* display: inline-block;
vertical-align: middle; */
line-height: 28upx;
}
.tui-tag-small {
padding: 10upx 16upx;
font-size: 24upx;
border-radius: 6upx;
/* display: inline-block;
vertical-align: middle; */
line-height: 24upx;
}
.tui-tag-outline {
position: relative;
background: none;
color: #5677fc;
}
.tui-tag-outline::after {
content: "";
position: absolute;
width: 200%;
height: 200%;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scale(0.5, 0.5);
transform: scale(0.5, 0.5);
-webkit-box-sizing: border-box;
box-sizing: border-box;
left: 0;
top: 0;
border-radius: 80upx;
border: 1px solid #5677fc;
}
.tui-tag-fillet {
border-radius: 50upx;
}
.tui-white.tui-tag-fillet::after {
border-radius: 80upx;
}
.tui-tag-outline-fillet::after {
border-radius: 80upx;
}
.tui-tag-fillet-left {
border-radius: 50upx 0 0 50upx;
}
.tui-tag-fillet-right {
border-radius: 0 50upx 50upx 0;
}
.tui-tag-fillet-left.tui-tag-outline::after {
border-radius: 100upx 0 0 100upx;
}
.tui-tag-fillet-right.tui-tag-outline::after {
border-radius: 0 100upx 100upx 0;
}
/* tag end*/
</style>

View File

@@ -0,0 +1,146 @@
<template>
<text v-if="text" :class="inverted ? 'uni-badge--' + type + ' uni-badge--' + size + ' uni-badge--' + type + '-inverted' : 'uni-badge--' + type + ' uni-badge--' + size" :style="badgeStyle" class="uni-badge" @click="onClick()">{{ text }}</text>
</template>
<script>
/**
* Badge 数字角标
* @description 数字角标一般和其它控件列表、9宫格等配合使用用于进行数量提示默认为实心灰色背景
* @tutorial https://ext.dcloud.net.cn/plugin?id=21
* @property {String} text 角标内容
* @property {String} type = [default|primary|success|warning|error] 颜色类型
* @value default 灰色
* @value primary 蓝色
* @value success 绿色
* @value warning 黄色
* @value error 红色
* @property {String} size = [normal|small] Badge 大小
* @value normal 一般尺寸
* @value small 小尺寸
* @property {String} inverted = [true|false] 是否无需背景颜色
* @event {Function} click 点击 Badge 触发事件
* @example <uni-badge text="1"></uni-badge>
*/
export default {
name: 'UniBadge',
props: {
type: {
type: String,
default: 'default'
},
inverted: {
type: Boolean,
default: false
},
text: {
type: [String, Number],
default: ''
},
size: {
type: String,
default: 'normal'
}
},
data() {
return {
badgeStyle: ''
};
},
watch: {
text() {
this.setStyle()
}
},
mounted() {
this.setStyle()
},
methods: {
setStyle() {
this.badgeStyle = `width: ${String(this.text).length * 8 + 12}px`
},
onClick() {
this.$emit('click');
}
}
};
</script>
<style scoped>
.uni-badge {
/* #ifndef APP-PLUS */
display: flex;
/* #endif */
justify-content: center;
flex-direction: row;
height: 20px;
line-height: 20px;
color: #333;
border-radius: 100px;
background-color: #f1f1f1;
background-color: transparent;
text-align: center;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
font-size: 12px;
padding: 0px 6px;
}
.uni-badge--inverted {
padding: 0 5px 0 0;
color: #f1f1f1;
}
.uni-badge--default {
color: #333;
background-color: #f1f1f1;
}
.uni-badge--default-inverted {
color: #999;
background-color: transparent;
}
.uni-badge--primary {
color: #fff;
background-color: #007aff;
}
.uni-badge--primary-inverted {
color: #007aff;
background-color: transparent;
}
.uni-badge--success {
color: #fff;
background-color: #4cd964;
}
.uni-badge--success-inverted {
color: #4cd964;
background-color: transparent;
}
.uni-badge--warning {
color: #fff;
background-color: #f0ad4e;
}
.uni-badge--warning-inverted {
color: #f0ad4e;
background-color: transparent;
}
.uni-badge--error {
color: #fff;
background-color: #dd524d;
}
.uni-badge--error-inverted {
color: #dd524d;
background-color: transparent;
}
.uni-badge--small {
transform: scale(0.8);
transform-origin: center center;
}
</style>

View File

@@ -0,0 +1,199 @@
<template>
<view class="uni-countdown">
<text v-if="showDay" :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ d }}</text>
<text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor"></text>
<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ h }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text>
<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ i }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text>
<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ s }}</text>
<text v-if="!showColon" :style="{ color: splitorColor }" class="uni-countdown__splitor"></text>
</view>
</template>
<script>
/**
* Countdown 倒计时
* @description 倒计时组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=25
* @property {String} backgroundColor 背景色
* @property {String} color 文字颜色
* @property {Number} day 天数
* @property {Number} hour 小时
* @property {Number} minute 分钟
* @property {Number} second 秒
* @property {Boolean} showDay = [true|false] 是否显示天数
* @property {Boolean} showColon = [true|false] 是否以冒号为分隔符
* @property {String} splitorColor 分割符号颜色
* @event {Function} timeup 倒计时时间到触发事件
* @example <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
*/
export default {
name: 'UniCountdown',
props: {
showDay: {
type: Boolean,
default: true
},
showColon: {
type: Boolean,
default: true
},
backgroundColor: {
type: String,
default: ''
},
borderColor: {
type: String,
default: '#f2f2f2'
},
color: {
type: String,
default: '#f2f2f2'
},
splitorColor: {
type: String,
default: '#f2f2f2'
},
day: {
type: Number,
default: 0
},
hour: {
type: Number,
default: 0
},
minute: {
type: Number,
default: 0
},
second: {
type: Number,
default: 0
}
},
data() {
return {
timer: null,
syncFlag: false,
d: '00',
h: '00',
i: '00',
s: '00',
leftTime: 0,
seconds: 0
}
},
watch: {
day(val) {
this.changeFlag()
},
hour(val) {
this.changeFlag()
},
minute(val) {
this.changeFlag()
},
second(val) {
this.changeFlag()
}
},
created: function(e) {
this.startData();
},
beforeDestroy() {
clearInterval(this.timer)
},
methods: {
toSeconds(day, hours, minutes, seconds) {
return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds
},
timeUp() {
clearInterval(this.timer)
this.$emit('timeup')
},
countDown() {
let seconds = this.seconds
let [day, hour, minute, second] = [0, 0, 0, 0]
if (seconds > 0) {
day = Math.floor(seconds / (60 * 60 * 24))
hour = Math.floor(seconds / (60 * 60)) - (day * 24)
minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)
second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60)
} else {
this.timeUp()
}
if (day < 10) {
day = '0' + day
}
if (hour < 10) {
hour = '0' + hour
}
if (minute < 10) {
minute = '0' + minute
}
if (second < 10) {
second = '0' + second
}
this.d = day
this.h = hour
this.i = minute
this.s = second
},
startData() {
this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
if (this.seconds <= 0) {
return
}
this.countDown()
this.timer = setInterval(() => {
this.seconds--
if (this.seconds < 0) {
this.timeUp()
return
}
this.countDown()
}, 1000)
},
changeFlag() {
clearInterval(this.timer)
// this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
this.startData();
}
}
}
</script>
<style scoped>
.uni-countdown {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: flex-start;
padding: 2rpx 0;
color: #ff00a0;
}
.uni-countdown__splitor {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
height: 48rpx;
line-height: 48rpx;
font-size: 24rpx;
color: #ff00a0;
}
.uni-countdown__number {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
height: 48rpx;
line-height: 48rpx;
text-align: center;
font-size: 24rpx;
color: #ff00a0;
}
</style>

View File

@@ -0,0 +1,285 @@
<template>
<!-- #ifdef APP-NVUE -->
<cell>
<!-- #endif -->
<view :class="disabled ? 'uni-list-item--disabled' : ''" :hover-class="disabled || showSwitch ? '' : 'uni-list-item--hover'" class="uni-list-item" @click="onClick">
<view class="uni-list-item__container" :class="{'uni-list-item--first':isFirstChild}">
<view v-if="thumb" class="uni-list-item__icon">
<image mode="aspectFit" :src="thumb" class="uni-list-item__icon-img" />
</view>
<view class="uni-list-item__content">
<slot />
<text class="uni-list-item__content-title">{{ title }}</text>
<text v-if="note" class="uni-list-item__content-note">{{ note }}</text>
</view>
<view class="uni-list-item__extra">
<text :class="isabled?'active':''" v-if="rightText" class="uni-list-item__extra-text">{{rightText}}</text>
<uni-badge v-if="showBadge" :type="badgeType" :text="badgeText" />
<switch v-if="showSwitch" :disabled="disabled" :checked="switchChecked" @change="onSwitchChange" />
<slot name="right"></slot>
<image class="right" v-if="showArrow" src="/static/right.png" mode="aspectFit"></image>
</view>
</view>
</view>
<!-- #ifdef APP-NVUE -->
</cell>
<!-- #endif -->
</template>
<script>
import uniBadge from '../uni-badge/uni-badge.vue'
/**
* ListItem 列表子组件
* @description 列表子组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=24
* @property {String} title 标题
* @property {String} note 描述
* @property {String} thumb 左侧缩略图若thumb有值则不会显示扩展图标
* @property {String} badgeText 数字角标内容
* @property {String} badgeType 数字角标类型,参考[uni-icons](https://ext.dcloud.net.cn/plugin?id=21)
* @property {String} rightText 右侧文字内容
* @property {Boolean} disabled = [true|false]是否禁用
* @property {Boolean} showArrow = [true|false] 是否显示箭头图标
* @property {Boolean} showBadge = [true|false] 是否显示数字角标
* @property {Boolean} showSwitch = [true|false] 是否显示Switch
* @property {Boolean} switchChecked = [true|false] Switch是否被选中
* @property {Boolean} showExtraIcon = [true|false] 左侧是否显示扩展图标
* @property {Boolean} scrollY = [true|false] 允许纵向滚动,需要显式的设置其宽高
* @property {Object} extraIcon 扩展图标参数,格式为 {color: '#4cd964',size: '22',type: 'spinner'}
* @event {Function} click 点击 uniListItem 触发事件
* @event {Function} switchChange 点击切换 Switch 时触发
*/
export default {
name: 'UniListItem',
components: {
uniBadge
},
props: {
isabled:{
type:Boolean,
default:false
},
title: {
type: String,
default: ''
}, // 列表标题
note: {
type: String,
default: ''
}, // 列表描述
disabled: {
// 是否禁用
type: [Boolean, String],
default: false
},
showArrow: {
// 是否显示箭头
type: [Boolean, String],
default: true
},
showBadge: {
// 是否显示数字角标
type: [Boolean, String],
default: false
},
showSwitch: {
// 是否显示Switch
type: [Boolean, String],
default: false
},
switchChecked: {
// Switch是否被选中
type: [Boolean, String],
default: false
},
badgeText: {
// badge内容
type: String,
default: ''
},
badgeType: {
// badge类型
type: String,
default: 'success'
},
rightText: {
// 右侧文字内容
type: String,
default: ''
},
thumb: {
// 缩略图
type: String,
default: ''
},
showExtraIcon: {
// 是否显示扩展图标
type: [Boolean, String],
default: false
},
extraIcon: {
type: Object,
default () {
return {
type: 'contact',
color: '#000000',
size: 20
}
}
}
},
inject: ['list'],
data() {
return {
isFirstChild: false
}
},
mounted() {
},
methods: {
onClick() {
this.$emit('click')
},
onSwitchChange(e) {
this.$emit('switchChange', e.detail)
}
}
}
</script>
<style scoped>
.uni-list-item {
font-size: 32rpx;
position: relative;
flex-direction: column;
justify-content: space-between;
padding-left: 30rpx;
padding-right: 30rpx;
}
.uni-list-item--disabled {
opacity: 0.3;
}
.uni-list-item--hover {
background-color: #f1f1f1;
}
.uni-list-item__container {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 16rpx 30rpx;
padding-left: 0;
flex: 1;
position: relative;
justify-content: space-between;
align-items: center;
/* #ifdef APP-PLUS */
border-top-color: #e5e5e5;
border-top-style: solid;
border-top-width: 0.5px;
/* #endif */
border-bottom: 1px solid #F2F2F2;
}
.uni-list-item--first {
border-top-width: 0px;
}
/* #ifndef APP-NVUE */
.uni-list-item__container:after {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 1px;
content: '';
-webkit-transform: scaleY(.5);
transform: scaleY(.5);
background-color: #e5e5e5;
display: none;
}
.uni-list-item--first:after {
height: 0px;
}
/* #endif */
.uni-list-item__content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
overflow: hidden;
flex-direction: column;
color: #3b4144;
}
.uni-list-item__content-title {
font-size: 28rpx;
color: #3b4144;
overflow: hidden;
}
.uni-list-item__content-note {
margin-top: 6rpx;
color: #999;
font-size: 24rpx;
overflow: hidden;
}
.right{
width: 40rpx;
height: 40rpx;
}
.uni-list-item__extra {
/* width: 25%;
*/
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
.active{
background-color: grey!important;
color: #FFFFFF!important;
}
.uni-list-item__icon {
margin-right: 18rpx;
flex-direction: row;
justify-content: center;
align-items: center;
}
.uni-list-item__icon-img {
height: 52rpx;
width: 52rpx;
}
.uni-list-item__extra-text {
color: #999;
font-size: 24rpx;
display: inline-block;
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
border-radius: 10rpx;
text-align: center;
display: flex;
justify-content: center;
background-color: #5680E6;
color: #FFFFFF;
}
</style>

View File

@@ -0,0 +1,78 @@
<template>
<!-- #ifndef APP-NVUE -->
<view class="uni-list">
<slot />
</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<list class="uni-list" :enableBackToTop="enableBackToTop" loadmoreoffset="15" :scroll-y="scrollY" @loadmore="loadMore">
<slot />
</list>
<!-- #endif -->
</template>
<script>
/**
* List 列表
* @description 列表组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=24
*/
export default {
name: 'UniList',
'mp-weixin': {
options: {
multipleSlots: false
}
},
props: {
enableBackToTop: {
type: [Boolean, String],
default: false
},
scrollY: {
type: [Boolean, String],
default: false
}
},
provide() {
return {
list: this
}
},
created() {
this.firstChildAppend = false
},
methods: {
loadMore(e) {
this.$emit("scrolltolower");
}
}
}
</script>
<style scoped>
.uni-list {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
background-color: #ffffff;
position: relative;
flex-direction: column;
/* border-bottom-color: $uni-border-color;
*/
/* border-bottom-style: solid;
*/
/* border-bottom-width: 1px;
*/
}
/* #ifndef APP-NVUE */
.uni-list:before {
height: 0;
}
.uni-list:after {
height: 0;
}
/* #endif */
</style>

View File

@@ -0,0 +1,65 @@
<template>
<!-- #ifdef APP-NVUE -->
<refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown">
<slot />
</refresh>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<view ref="uni-refresh" class="uni-refresh" v-show="isShow">
<slot />
</view>
<!-- #endif -->
</template>
<script>
export default {
name: 'UniRefresh',
props: {
display: {
type: [String],
default: "hide"
}
},
data() {
return {
pulling: false
}
},
computed: {
isShow() {
if (this.display === "show" || this.pulling === true) {
return true;
}
return false;
}
},
created() {},
methods: {
onchange(value) {
this.pulling = value;
},
onrefresh(e) {
this.$emit("refresh", e);
},
onpullingdown(e) {
// #ifdef APP-NVUE
this.$emit("pullingdown", e);
// #endif
// #ifndef APP-NVUE
var detail = {
viewHeight: 90,
pullingDistance: e.height
}
this.$emit("pullingdown", detail);
// #endif
}
}
}
</script>
<style scoped>
.uni-refresh {
height: 0;
overflow: hidden;
}
</style>

View File

@@ -0,0 +1,87 @@
var pullDown = {
threshold: 95,
maxHeight: 200,
callRefresh: 'onrefresh',
callPullingDown: 'onpullingdown',
refreshSelector: '.uni-refresh'
};
function ready(newValue, oldValue, ownerInstance, instance) {
var state = instance.getState()
state.canPullDown = newValue;
// console.log(newValue);
}
function touchStart(e, instance) {
var state = instance.getState();
state.refreshInstance = instance.selectComponent(pullDown.refreshSelector);
state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined);
if (!state.canPullDown) {
return
}
// console.log("touchStart");
state.height = 0;
state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY;
state.refreshInstance.setStyle({
'height': 0
});
state.refreshInstance.callMethod("onchange", true);
}
function touchMove(e, ownerInstance) {
var instance = e.instance;
var state = instance.getState();
if (!state.canPullDown) {
return
}
var oldHeight = state.height;
var endY = e.touches[0].pageY || e.changedTouches[0].pageY;
var height = endY - state.touchStartY;
if (height > pullDown.maxHeight) {
return;
}
var refreshInstance = state.refreshInstance;
refreshInstance.setStyle({
'height': height + 'px'
});
height = height < pullDown.maxHeight ? height : pullDown.maxHeight;
state.height = height;
refreshInstance.callMethod(pullDown.callPullingDown, {
height: height
});
}
function touchEnd(e, ownerInstance) {
var state = e.instance.getState();
if (!state.canPullDown) {
return
}
state.refreshInstance.callMethod("onchange", false);
var refreshInstance = state.refreshInstance;
if (state.height > pullDown.threshold) {
refreshInstance.callMethod(pullDown.callRefresh);
return;
}
refreshInstance.setStyle({
'height': 0
});
}
function propObserver(newValue, oldValue, instance) {
pullDown = newValue;
}
module.exports = {
touchmove: touchMove,
touchstart: touchStart,
touchend: touchEnd,
propObserver: propObserver
}

View File

@@ -0,0 +1,228 @@
<template>
<view class="uni-navbar">
<view :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': shadow, 'uni-navbar--border': border }" :style="{ 'background-color': backgroundColor }" class="uni-navbar__content">
<uni-status-bar v-if="statusBar" />
<view :style="{ color: color,backgroundColor: backgroundColor }" class="uni-navbar__header uni-navbar__content_view">
<view @tap="onClickLeft" class="uni-navbar__header-btns uni-navbar__header-btns-left uni-navbar__content_view">
<view :class="{ 'uni-navbar-btn-icon-left': !leftIcon.length }" class="uni-navbar-btn-text uni-navbar__content_view" v-if="leftText.length">
<text :style="{ color: color, fontSize: '14px' }">{{ leftText }}</text>
</view>
<slot name="left" />
</view>
<view class="uni-navbar__header-container uni-navbar__content_view">
<view class="uni-navbar__header-container-inner uni-navbar__content_view" v-if="title.length">
<text class="uni-nav-bar-text" :style="{color: color }">{{ title }}</text>
</view>
<!-- 标题插槽 -->
<slot />
</view>
<view :class="title.length ? 'uni-navbar__header-btns-right' : ''" @tap="onClickRight" class="uni-navbar__header-btns uni-navbar__content_view">
<!-- 优先显示图标 -->
<view class="uni-navbar-btn-text uni-navbar__content_view" v-if="rightText.length && !rightIcon.length">
<text class="uni-nav-bar-right-text">{{ rightText }}</text>
</view>
<slot name="right" />
</view>
</view>
</view>
<view class="uni-navbar__placeholder" v-if="fixed">
<uni-status-bar v-if="statusBar" />
<view class="uni-navbar__placeholder-view" />
</view>
</view>
</template>
<script>
import uniStatusBar from "../uni-status-bar/uni-status-bar.vue";
/**
* NavBar 自定义导航栏
* @description 导航栏组件,主要用于头部导航
* @tutorial https://ext.dcloud.net.cn/plugin?id=52
* @property {String} title 标题文字
* @property {String} leftText 左侧按钮文本
* @property {String} rightText 右侧按钮文本
* @property {String} leftIcon 左侧按钮图标(图标类型参考 [Icon 图标](http://ext.dcloud.net.cn/plugin?id=28) type 属性)
* @property {String} rightIcon 右侧按钮图标(图标类型参考 [Icon 图标](http://ext.dcloud.net.cn/plugin?id=28) type 属性)
* @property {String} color 图标和文字颜色
* @property {String} backgroundColor 导航栏背景颜色
* @property {Boolean} fixed = [true|false] 是否固定顶部
* @property {Boolean} statusBar = [true|false] 是否包含状态栏
* @property {Boolean} shadow = [true|false] 导航栏下是否有阴影
* @event {Function} clickLeft 左侧按钮点击时触发
* @event {Function} clickRight 右侧按钮点击时触发
*/
export default {
name: "UniNavBar",
components: {
uniStatusBar
// uniIcons
},
props: {
title: {
type: String,
default: ""
},
leftText: {
type: String,
default: ""
},
rightText: {
type: String,
default: ""
},
leftIcon: {
type: String,
default: ""
},
rightIcon: {
type: String,
default: ""
},
fixed: {
type: [Boolean, String],
default: false
},
color: {
type: String,
default: "#fff"
},
backgroundColor: {
type: String,
default: ""
},
statusBar: {
type: [Boolean, String],
default: true
},
shadow: {
type: [Boolean, String],
default: false
},
border: {
type: [Boolean, String],
default: true
}
},
mounted() {
if (uni.report && this.title !== '') {
uni.report('title', this.title)
}
},
methods: {
onClickLeft() {
this.$emit("clickLeft");
},
onClickRight() {
this.$emit("clickRight");
}
}
};
</script>
<style scoped>
.uni-nav-bar-text {
/* #ifdef APP-PLUS */
font-size: 34rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 32rpx;
/* #endif */
}
.uni-nav-bar-right-text {
font-size: 28rpx;
}
.uni-navbar__content {
position: relative;
/* background-color: #ffffff; */
overflow: hidden;
}
.uni-navbar__content_view {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
align-items: center;
flex-direction: row;
/* background-color: #FFFFFF;
*/
}
.uni-navbar__header {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
height: 44px;
line-height: 44px;
font-size: 16px;
/* background-color: #ffffff;
*/
}
.uni-navbar__header-btns {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-wrap: nowrap;
width: 120rpx;
padding: 0 6px;
justify-content: center;
align-items: center;
}
.uni-navbar__header-btns-left {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
width: 150rpx;
justify-content: flex-start;
}
.uni-navbar__header-btns-right {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
width: 150rpx;
padding-right: 30rpx;
justify-content: flex-end;
}
.uni-navbar__header-container {
flex: 1;
}
.uni-navbar__header-container-inner {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.uni-navbar__placeholder-view {
height: 44px;
}
.uni-navbar--fixed {
position: fixed;
z-index: 998;
}
.uni-navbar--shadow {
/* #ifndef APP-NVUE */
box-shadow: 0 1px 6px #ccc;
/* #endif */
}
.uni-navbar--border {
border-bottom-width: 1rpx;
border-bottom-style: solid;
border-bottom-color: #e5e5e5;
}
</style>

View File

@@ -0,0 +1,22 @@
export default {
created() {
if (this.type === 'message') {
// 不显示遮罩
this.maskShow = false
// 获取子组件对象
this.childrenMsg = null
}
},
methods: {
customOpen() {
if (this.childrenMsg) {
this.childrenMsg.open()
}
},
customClose() {
if (this.childrenMsg) {
this.childrenMsg.close()
}
}
}
}

View File

@@ -0,0 +1,25 @@
import message from './message.js';
// 定义 type 类型:弹出类型top/bottom/center
const config = {
// 顶部弹出
top:'top',
// 底部弹出
bottom:'bottom',
// 居中弹出
center:'center',
// 消息提示
message:'top',
// 对话框
dialog:'center',
// 分享
share:'bottom',
}
export default {
data(){
return {
config:config
}
},
mixins: [message],
}

View File

@@ -0,0 +1,244 @@
<template>
<view class="uni-popup-dialog">
<view class="uni-dialog-title">
<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{title}}</text>
</view>
<view class="uni-dialog-content">
<text class="uni-dialog-content-text" v-if="mode === 'base'">{{content}}</text>
<input v-else class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholder" :focus="focus" >
</view>
<view class="uni-dialog-button-group">
<view class="uni-dialog-button" @click="close">
<text class="uni-dialog-button-text">取消</text>
</view>
<view class="uni-dialog-button uni-border-left" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">确定</text>
</view>
</view>
</view>
</template>
<script>
/**
* PopUp 弹出层-对话框样式
* @description 弹出层-对话框样式
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} value input 模式下的默认值
* @property {String} placeholder input 模式下输入提示
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
* @value info 消息
* @value error 错误
* @property {String} mode = [base|input] 模式、
* @value base 基础对话框
* @value input 可输入对话框
* @property {String} content 对话框内容
* @property {Boolean} beforeClose 是否拦截取消事件
* @event {Function} confirm 点击确认按钮触发
* @event {Function} close 点击取消按钮触发
*/
export default {
name: "uniPopupDialog",
props: {
value: {
type: [String, Number],
default: ''
},
placeholder: {
type: [String, Number],
default: '请输入内容'
},
/**
* 对话框主题 success/warning/info/error 默认 success
*/
type: {
type: String,
default: 'error'
},
/**
* 对话框模式 base/input
*/
mode: {
type: String,
default: 'base'
},
/**
* 对话框标题
*/
title: {
type: String,
default: '提示'
},
/**
* 对话框内容
*/
content: {
type: String,
default: ''
},
/**
* 拦截取消事件 如果拦截取消事件必须监听close事件执行 done()
*/
beforeClose: {
type: Boolean,
default: false
}
},
data() {
return {
dialogType: 'error',
focus: false,
val: ""
}
},
inject: ['popup'],
watch: {
type(val) {
this.dialogType = val
},
mode(val) {
if (val === 'input') {
this.dialogType = 'info'
}
},
value(val) {
this.val = val
}
},
created() {
// 对话框遮罩不可点击
this.popup.mkclick = false
if (this.mode === 'input') {
this.dialogType = 'info'
this.val = this.value
} else {
this.dialogType = this.type
}
},
mounted() {
this.focus = true
},
methods: {
/**
* 点击确认按钮
*/
onOk() {
this.$emit('confirm', () => {
this.popup.close()
if (this.mode === 'input') this.val = this.value
}, this.mode === 'input' ? this.val : '')
},
/**
* 点击取消按钮
*/
close() {
if (this.beforeClose) {
this.$emit('close', () => {
this.popup.close()
})
return
}
this.popup.close()
}
}
}
</script>
<style lang="scss" scoped>
.uni-popup-dialog {
width: 300px;
border-radius: 15px;
background-color: #fff;
z-index: 9999999;
}
.uni-dialog-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 15px;
padding-bottom: 5px;
}
.uni-dialog-title-text {
font-size: 16px;
font-weight: 500;
}
.uni-dialog-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
padding: 5px 15px 15px 15px;
}
.uni-dialog-content-text {
font-size: 14px;
color: #6e6e6e;
}
.uni-dialog-button-group {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
border-top-color: #f5f5f5;
border-top-style: solid;
border-top-width: 1px;
}
.uni-dialog-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 45px;
}
.uni-border-left {
border-left-color: #f0f0f0;
border-left-style: solid;
border-left-width: 1px;
}
.uni-dialog-button-text {
font-size: 14px;
}
.uni-button-color {
color: $uni-color-primary;
}
.uni-dialog-input {
flex: 1;
font-size: 14px;
}
.uni-popup__success {
color: $uni-color-success;
}
.uni-popup__warn {
color: $uni-color-warning;
}
.uni-popup__error {
color: $uni-color-error;
}
.uni-popup__info {
color: #909399;
}
</style>

View File

@@ -0,0 +1,117 @@
<template>
<view class="uni-popup-message" :class="'uni-popup__'+[type]">
<text class="uni-popup-message-text" :class="'uni-popup__'+[type]+'-text'">{{message}}</text>
</view>
</template>
<script>
/**
* PopUp 弹出层-消息提示
* @description 弹出层-消息提示
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
* @value info 消息
* @value error 错误
* @property {String} message 消息提示文字
* @property {String} duration 显示时间,设置为 0 则不会自动关闭
*/
export default {
name: 'UniPopupMessage',
props: {
/**
* 主题 success/warning/info/error 默认 success
*/
type: {
type: String,
default: 'success'
},
/**
* 消息文字
*/
message: {
type: String,
default: ''
},
/**
* 显示时间,设置为 0 则不会自动关闭
*/
duration: {
type: Number,
default: 3000
}
},
inject: ['popup'],
data() {
return {}
},
created() {
this.popup.childrenMsg = this
},
methods: {
open() {
if (this.duration === 0) return
clearTimeout(this.popuptimer)
this.popuptimer = setTimeout(() => {
this.popup.close()
}, this.duration)
},
close() {
clearTimeout(this.popuptimer)
}
}
}
</script>
<style lang="scss" scoped>
.uni-popup-message {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
background-color: #e1f3d8;
padding: 10px 15px;
border-color: #eee;
border-style: solid;
border-width: 1px;
z-index: 9999999;
}
.uni-popup-message-text {
font-size: 14px;
padding: 0;
}
.uni-popup__success {
background-color: #e1f3d8;
}
.uni-popup__success-text {
color: #67C23A;
}
.uni-popup__warn {
background-color: #faecd8;
}
.uni-popup__warn-text {
color: #E6A23C;
}
.uni-popup__error {
background-color: #fde2e2;
}
.uni-popup__error-text {
color: #F56C6C;
}
.uni-popup__info {
background-color: #F2F6FC;
}
.uni-popup__info-text {
color: #909399;
}
</style>

View File

@@ -0,0 +1,170 @@
<template>
<view class="uni-popup-share">
<view class="uni-share-title"><text class="uni-share-title-text">{{title}}</text></view>
<view class="uni-share-content">
<view class="uni-share-content-box">
<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
<button v-if="item.text == '群或好友'" class="share" open-type="share">
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
<view class="uni-share-text">{{item.text}}</view>
</button>
<view v-else>
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
<view class="uni-share-text">{{item.text}}</view>
</view>
</view>
</view>
</view>
<view class="uni-share-content">
<ad unit-id="adunit-f6387bd5404467fd" ad-type="video" ad-theme="white"></ad>
</view>
<view class="uni-share-button-box">
<button class="uni-share-button" @click="close">取消</button>
</view>
</view>
</template>
<script>
export default {
name: 'UniPopupShare',
props: {
title: {
type: String,
default: '分享到'
}
},
inject: ['popup'],
data() {
return {
bottomData: [{
text: '群或好友',
icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
name: 'wx'
},
{
text: '朋友圈',
icon: '/static/wxpengyou.png',
name: 'wx'
}
]
}
},
created() {},
methods: {
/**
* 选择内容
*/
select(item, index) {
this.$emit('select', {
item,
index
}, () => {
this.popup.close()
})
},
/**
* 关闭窗口
*/
close() {
this.popup.close()
}
}
}
</script>
<style lang="scss" scoped>
.uni-popup-share {
background-color: #fff;
z-index: 9999999;
}
.uni-share-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 40px;
}
.uni-share-title-text {
font-size: 14px;
color: #666;
}
.uni-share-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 10px;
}
.uni-share-content-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
width: 360px;
}
.uni-share-content-box>view{
text-align: center;
}
.uni-share-content-item {
width: 90px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
padding: 10px 0;
align-items: center;
}
.uni-share-content-item button{
padding: 0;
margin: 0;
border: 0;
line-height: 1;
background-color: transparent;
text-align: center;
display: inline-block;
}
.uni-share-content-item button::after{
display: none;
}
.uni-share-content-item:active {
background-color: #f5f5f5;
}
.uni-share-image {
width: 30px;
height: 30px;
margin: 0 auto;
}
.uni-share-text {
margin-top: 10px;
font-size: 14px;
color: #3B4144;
}
.uni-share-button-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 10px 15px;
}
.uni-share-button {
flex: 1;
border-radius: 50px;
color: #666;
font-size: 16px;
}
.uni-share-button::after {
border-radius: 50px;
}
</style>

View File

@@ -0,0 +1,295 @@
<template>
<view v-if="showPopup" class="uni-popup" :class="[popupstyle]" @touchmove.stop.prevent="clear">
<uni-transition v-if="maskShow" :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans"
@click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
</view>
</uni-transition>
</view>
</template>
<script>
import uniTransition from '../uni-transition/uni-transition.vue'
import popup from './popup.js'
/**
* PopUp 弹出层
* @description 弹出层组件,为了解决遮罩弹层的问题
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [top|center|bottom] 弹出方式
* @value top 顶部弹出
* @value center 中间弹出
* @value bottom 底部弹出
* @value message 消息提示
* @value dialog 对话框
* @value share 底部分享示例
* @property {Boolean} animation = [ture|false] 是否开启动画
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
* @event {Function} change 打开关闭弹窗触发e={show: false}
*/
export default {
name: 'UniPopup',
components: {
uniTransition
},
props: {
// 开启动画
animation: {
type: Boolean,
default: true
},
// 弹出层类型可选值top: 顶部弹出层bottom底部弹出层center全屏弹出层
// message: 消息提示 ; dialog : 对话框
type: {
type: String,
default: 'center'
},
// maskClick
maskClick: {
type: Boolean,
default: true
}
},
provide() {
return {
popup: this
}
},
mixins: [popup],
watch: {
/**
* 监听type类型
*/
type: {
handler: function(newVal) {
this[this.config[newVal]]()
},
immediate: true
},
/**
* 监听遮罩是否可点击
* @param {Object} val
*/
maskClick(val) {
this.mkclick = val
}
},
data() {
return {
duration: 300,
ani: [],
showPopup: false,
showTrans: false,
maskClass: {
'position': 'fixed',
'bottom': 0,
'top': 0,
'left': 0,
'right': 0,
'backgroundColor': 'rgba(0, 0, 0, 0.4)'
},
transClass: {
'position': 'fixed',
'left': 0,
'right': 0,
},
maskShow: true,
mkclick: true,
popupstyle: 'top'
}
},
created() {
this.mkclick = this.maskClick
if (this.animation) {
this.duration = 300
} else {
this.duration = 0
}
},
methods: {
clear(e) {
// TODO nvue 取消冒泡
e.stopPropagation()
},
open() {
this.showPopup = true
this.$nextTick(() => {
new Promise(resolve => {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.showTrans = true
// fixed by mehaotian 兼容 app 端
this.$nextTick(() => {
resolve();
})
}, 50);
}).then(res => {
// 自定义打开事件
clearTimeout(this.msgtimer)
this.msgtimer = setTimeout(() => {
this.customOpen && this.customOpen()
}, 100)
this.$emit('change', {
show: true,
type: this.type
})
})
})
},
close(type) {
this.showTrans = false
this.$nextTick(() => {
this.$emit('change', {
show: false,
type: this.type
})
clearTimeout(this.timer)
// 自定义关闭事件
this.customOpen && this.customClose()
this.timer = setTimeout(() => {
this.showPopup = false
}, 300)
})
},
onTap() {
if (!this.mkclick) return
this.close()
},
/**
* 顶部弹出样式处理
*/
top() {
this.popupstyle = 'top'
this.ani = ['slide-top']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
}
},
/**
* 底部弹出样式处理
*/
bottom() {
this.popupstyle = 'bottom'
this.ani = ['slide-bottom']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
'bottom': 0
}
},
/**
* 中间弹出样式处理
*/
center() {
this.popupstyle = 'center'
this.ani = ['zoom-out', 'fade']
this.transClass = {
'position': 'fixed',
/* #ifndef APP-NVUE */
'display': 'flex',
'flexDirection': 'column',
/* #endif */
'bottom': 0,
'left': 0,
'right': 0,
'top': 0,
'justifyContent': 'center',
'alignItems': 'center'
}
}
}
}
</script>
<style lang="scss" scoped>
.uni-popup {
position: fixed;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
z-index: 9999999;
}
.uni-popup__mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: $uni-bg-color-mask;
opacity: 0;
}
.mask-ani {
transition-property: opacity;
transition-duration: 0.2s;
}
.uni-top-mask {
opacity: 1;
}
.uni-bottom-mask {
opacity: 1;
}
.uni-center-mask {
opacity: 1;
}
.uni-popup__wrapper {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
}
.top {
/* #ifdef H5 */
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
}
.bottom {
bottom: 0;
}
.uni-popup__wrapper-box {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
/* iphonex 等安全区设置,底部安全区适配 */
/* #ifndef APP-NVUE */
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
/* #endif */
}
.content-ani {
// transition: transform 0.3s;
transition-property: transform, opacity;
transition-duration: 0.2s;
}
.uni-top-content {
transform: translateY(0);
}
.uni-bottom-content {
transform: translateY(0);
}
.uni-center-content {
transform: scale(1);
opacity: 1;
}
</style>

View File

@@ -0,0 +1,136 @@
<template>
<view class="uni-section" nvue>
<view v-if="type" class="uni-section__head">
<view :class="type" class="uni-section__head-tag" />
</view>
<view class="uni-section__content">
<text :class="{'distraction':!subTitle}" class="uni-section__content-title">{{ title }}</text>
<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text>
</view>
<slot />
</view>
</template>
<script>
/**
* Section 标题栏
* @description 标题栏
* @property {String} type = [line|circle] 标题装饰类型
* @value line 竖线
* @value circle 圆形
* @property {String} title 主标题
* @property {String} subTitle 副标题
*/
export default {
name: 'UniTitle',
props: {
type: {
type: String,
default: ''
},
title: {
type: String,
default: ''
},
subTitle: {
type: String,
default: ''
}
},
data() {
return {}
},
watch: {
title(newVal) {
if (uni.report && newVal !== '') {
uni.report('title', newVal)
}
}
},
methods: {
onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" scoped>
.uni-section {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
margin-top: 10px;
flex-direction: row;
align-items: center;
padding: 0 10px;
height: 50px;
background-color: $uni-bg-color-grey;
/* #ifdef APP-NVUE */
border-bottom-color: $uni-border-color;
border-bottom-style: solid;
border-bottom-width: 0.5px;
/* #endif */
font-weight: normal;
}
/* #ifndef APP-NVUE */
.uni-section:after {
position: absolute;
bottom: 0;
right: 0;
left: 0;
height: 1px;
content: '';
-webkit-transform: scaleY(.5);
transform: scaleY(.5);
background-color: $uni-border-color;
}
/* #endif */
.uni-section__head {
flex-direction: row;
justify-content: center;
align-items: center;
margin-right: 10px;
}
.line {
height: 15px;
background-color: $uni-text-color-disable;
border-radius: 5px;
width: 3px;
}
.circle {
width: 8px;
height: 8px;
border-top-right-radius: 50px;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
background-color: $uni-text-color-disable;
}
.uni-section__content {
flex-direction: column;
flex: 1;
color: $uni-text-color;
}
.uni-section__content-title {
font-size: $uni-font-size-base;
color: $uni-text-color;
}
.distraction {
flex-direction: row;
align-items: center;
}
.uni-section__content-sub {
font-size: $uni-font-size-sm;
color: $uni-text-color-grey;
}
</style>

View File

@@ -0,0 +1,26 @@
<template>
<view :style="{ height: statusBarHeight }" class="uni-status-bar">
<slot />
</view>
</template>
<script>
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
export default {
name: 'UniStatusBar',
data() {
return {
statusBarHeight: statusBarHeight
}
}
}
</script>
<style scoped>
.uni-status-bar {
width: 750rpx;
height: 20px;
/* height: var(--status-bar-height);
*/
}
</style>

View File

@@ -0,0 +1,279 @@
<template>
<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject"
@click="change">
<slot></slot>
</view>
</template>
<script>
// #ifdef APP-NVUE
const animation = uni.requireNativePlugin('animation');
// #endif
/**
* Transition 过渡动画
* @description 简单过渡动画组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=985
* @property {Boolean} show = [false|true] 控制组件显示或隐藏
* @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
* @value fade 渐隐渐出过渡
* @value slide-top 由上至下过渡
* @value slide-right 由右至左过渡
* @value slide-bottom 由下至上过渡
* @value slide-left 由左至右过渡
* @value zoom-in 由小到大过渡
* @value zoom-out 由大到小过渡
* @property {Number} duration 过渡动画持续时间
* @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
*/
export default {
name: 'uniTransition',
props: {
show: {
type: Boolean,
default: false
},
modeClass: {
type: Array,
default () {
return []
}
},
duration: {
type: Number,
default: 300
},
styles: {
type: Object,
default () {
return {}
}
}
},
data() {
return {
isShow: false,
transform: '',
ani: { in: '',
active: ''
}
};
},
watch: {
show: {
handler(newVal) {
if (newVal) {
this.open()
} else {
this.close()
}
},
immediate: true
}
},
computed: {
stylesObject() {
let styles = {
...this.styles,
'transition-duration': this.duration / 1000 + 's'
}
let transfrom = ''
for (let i in styles) {
let line = this.toLine(i)
transfrom += line + ':' + styles[i] + ';'
}
return transfrom
}
},
created() {
// this.timer = null
// this.nextTick = (time = 50) => new Promise(resolve => {
// clearTimeout(this.timer)
// this.timer = setTimeout(resolve, time)
// return this.timer
// });
},
methods: {
change() {
this.$emit('click', {
detail: this.isShow
})
},
open() {
clearTimeout(this.timer)
this.isShow = true
this.transform = ''
this.ani.in = ''
for (let i in this.getTranfrom(false)) {
if (i === 'opacity') {
this.ani.in = 'fade-in'
} else {
this.transform += `${this.getTranfrom(false)[i]} `
}
}
this.$nextTick(() => {
setTimeout(() => {
this._animation(true)
}, 50)
})
},
close(type) {
clearTimeout(this.timer)
this._animation(false)
},
_animation(type) {
let styles = this.getTranfrom(type)
// #ifdef APP-NVUE
if(!this.$refs['ani']) return
animation.transition(this.$refs['ani'].ref, {
styles,
duration: this.duration, //ms
timingFunction: 'ease',
needLayout: false,
delay: 0 //ms
}, () => {
if (!type) {
this.isShow = false
}
this.$emit('change', {
detail: this.isShow
})
})
// #endif
// #ifndef APP-NVUE
this.transform = ''
for (let i in styles) {
if (i === 'opacity') {
this.ani.in = `fade-${type?'out':'in'}`
} else {
this.transform += `${styles[i]} `
}
}
this.timer = setTimeout(() => {
if (!type) {
this.isShow = false
}
this.$emit('change', {
detail: this.isShow
})
}, this.duration)
// #endif
},
getTranfrom(type) {
let styles = {
transform: ''
}
this.modeClass.forEach((mode) => {
switch (mode) {
case 'fade':
styles.opacity = type ? 1 : 0
break;
case 'slide-top':
styles.transform += `translateY(${type?'0':'-100%'}) `
break;
case 'slide-right':
styles.transform += `translateX(${type?'0':'100%'}) `
break;
case 'slide-bottom':
styles.transform += `translateY(${type?'0':'100%'}) `
break;
case 'slide-left':
styles.transform += `translateX(${type?'0':'-100%'}) `
break;
case 'zoom-in':
styles.transform += `scale(${type?1:0.8}) `
break;
case 'zoom-out':
styles.transform += `scale(${type?1:1.2}) `
break;
}
})
return styles
},
_modeClassArr(type) {
let mode = this.modeClass
if (typeof(mode) !== "string") {
let modestr = ''
mode.forEach((item) => {
modestr += (item + '-' + type + ',')
})
return modestr.substr(0, modestr.length - 1)
} else {
return mode + '-' + type
}
},
// getEl(el) {
// console.log(el || el.ref || null);
// return el || el.ref || null
// },
toLine(name) {
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
}
}
}
</script>
<style>
.uni-transition {
transition-timing-function: ease;
transition-duration: 0.3s;
transition-property: transform, opacity;
}
.fade-in {
opacity: 0;
}
.fade-active {
opacity: 1;
}
.slide-top-in {
/* transition-property: transform, opacity; */
transform: translateY(-100%);
}
.slide-top-active {
transform: translateY(0);
/* opacity: 1; */
}
.slide-right-in {
transform: translateX(100%);
}
.slide-right-active {
transform: translateX(0);
}
.slide-bottom-in {
transform: translateY(100%);
}
.slide-bottom-active {
transform: translateY(0);
}
.slide-left-in {
transform: translateX(-100%);
}
.slide-left-active {
transform: translateX(0);
opacity: 1;
}
.zoom-in-in {
transform: scale(0.8);
}
.zoom-out-active {
transform: scale(1);
}
.zoom-out-in {
transform: scale(1.2);
}
</style>

76
main.js Normal file
View File

@@ -0,0 +1,76 @@
import Vue from 'vue'
import store from './store'
import App from './App'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.path = 'https://xyb.wlkjwl.cn/'
// Vue.prototype.path = 'http://192.168.0.156:8091'
Vue.prototype.$store = store;
//异步请求
Vue.prototype.request = function(options){
let userInfo = uni.getStorageSync('userInfo') || '';
let that = this
,token = userInfo.token
,success = options.success
,error = options.error;
//指定、绑定options中的参数
options.data = options.data || {};
options.headers = options.headers || {};
// options.headers["content-type"] = 'application/x-www-form-urlencoded'
//有token 自动传递参数
if(token){
let sendData = typeof options.data === 'string'
? JSON.parse(options.data)
: options.data;
//自动给参数传入默认 token
options.data["Access-Token"] = token in sendData
? options.data["Access-Token"]
: (token || '');
//自动给 Request Headers 传入 token
options.headers["Access-Token"] = token in options.headers
? options.headers["Access-Token"]
: (token || '');
}
//删除成功、失败具体业务具体写
delete options.success;
delete options.error;
//返回公共请求封装一个公共的弹窗组件code码异常错误时使用
return uni.request(Object.assign({
type: 'post'
,method:'get'
,dataType: 'json'
,header:options.headers
,success: function(res){
//这里可以用于一些状态判断,登录信息失效或者其他状态码异常判断
//只要 http 状态码正常,无论 response 的 code 是否正常都执行 success
typeof success === 'function' && success(res);
}
,error: function(e, code){
uni.showToast({
title: '错误提示!<br>携带参数:'+JSON.stringify(options.data),
duration: 2000,
icon: 'none'
});
//页面公共错误提示
typeof error === 'function' && error(res);
}
},options));
}
const app = new Vue({
...App
})
app.$mount()

85
manifest.json Normal file
View File

@@ -0,0 +1,85 @@
{
"name" : "明星权力榜投票",
"appid" : "__UNI__BE123EB",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxf6f9bd2dfb05c10c",
"setting" : {
"urlCheck" : false,
"postcss" : false
},
"plugins" : {
"contactPlugin" : {
"version" : "1.3.0",
"provider" : "wx104a1a20c3f81ec2"
}
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
}
}

86
pages.json Normal file
View File

@@ -0,0 +1,86 @@
{
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"enablePullDownRefresh": true
}
},
{
"path" : "pages/support/support",
"style" : {
"navigationBarTitleText":"",
"usingComponents": {
"cell": "plugin://contactPlugin/cell"
}
}
}
,
{
"path" : "pages/my/my",
"style" : {
"navigationStyle":"custom"
}
}
,
{
"path" : "pages/ad/ad",
"style" : {
"navigationStyle":"custom"
}
},
{
"path" : "pages/luckdraw/luckdraw",
"style" : {
// "navigationStyle":"custom"
"navigationBarTitleText":"幸运抽奖"
}
}
,{
"path" : "pages/help/help",
"style" : {}
},{
"path" : "pages/search/search",
"style" : {
"navigationBarTitleText":"搜索"
}
}
,{
"path" : "pages/addpiao/addpiao",
"style" : {
"navigationBarTitleText":"日常加票"
}
}
,{
"path" : "pages/card/card",
"style" : {}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "明星权力榜投票",
"navigationBarBackgroundColor": "#5680E6",
"backgroundColor": "#5680E6"
},
"tabBar": {
"color": "#999999",
"selectedColor": "#5680E6",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar/tab-home.png",
"selectedIconPath": "static/tabbar/tab-home-current.png",
"text": "榜单"
},
{
"pagePath": "pages/my/my",
"iconPath": "static/tabbar/tab-my.png",
"selectedIconPath": "static/tabbar/tab-my-current.png",
"text": "我的"
}
]
}
}

64
pages/ad/ad.vue Normal file
View File

@@ -0,0 +1,64 @@
<template>
<view class="ad-view"></view>
</template>
<script>
let rewardedVideoAd = null;
export default {
data() {
return {
title: 'createRewardedVideoAd'
};
},
onReady() {
// if (uni.createRewardedVideoAd) {
// rewardedVideoAd = uni.createRewardedVideoAd({ adUnitId: 'adunit-e69177f2b96ced8c' });
// rewardedVideoAd.onLoad(() => {
// console.log('onLoad event');
// rewardedVideoAd.show()
// .then(() => console.log('激励视频 广告显示'))
// });
// rewardedVideoAd.onError(err => {
// rewardedVideoAd.show()
// .catch(() => {
// rewardedVideoAd.load()
// .then(() => rewardedVideoAd.show())
// .catch(err => {
// console.log('激励视频 广告显示失败')
// })
// })
// });
// rewardedVideoAd.onClose(res => {
// if(!rewardedVideoAd) return
// rewardedVideoAd.offClose()
// console.log('=====')
// console.log(res)
// // 用户点击了【关闭广告】按钮
// if (res && res.isEnded) {
// // 正常播放结束
// } else {
// // 播放中途退出
// }
// })
// }
},
methods: {
isLoad(){
rewardedVideoAd.show()
.catch(() => {
rewardedVideoAd.load()
.then(() => rewardedVideoAd.show())
.catch(err => {
console.log('激励视频 广告显示失败')
})
})
}
}
};
</script>
<style scoped></style>

128
pages/addpiao/addpiao.vue Normal file
View File

@@ -0,0 +1,128 @@
<template>
<view class="content">
<!-- <view class="ad-view"><ad unit-id="adunit-edf130ab482cfb31"></ad></view> -->
<view class="wrap">
<image class="w_left" src="../../static/supprt/star.png" mode="aspectFit"></image>
<view class="w_center_l">
<view>打榜送出300票</view>
<view v-if="votes.giveVotes">已完成{{votes.giveVotes}}/300票</view>
<view v-else>已完成0/300票</view>
</view>
<view class="w_center_r"><image src="../../static/supprt/xin.png" mode="aspectFill"></image>+20</view>
<view @tap="giveVotesLink" class="w_right">{{text}}</view>
</view>
<view class="ad-view">
<ad unit-id="adunit-f9252fa1e8324ea1" ad-type="video" ad-theme="white"></ad>
</view>
</view>
</template>
<script>
export default {
data() {
return {
votes:'',
text:"去送票"
};
},
onLoad() {
this.getUserInfo();
},
methods:{
//获取用户信息
getUserInfo(){
this.request({
url:this.path+'/api/xyb/star/customerInfo',
success:(res)=>{
let d = res.data;
this.votes = d.data;
if(this.votes>299){
this.text = '领取加票'
}
}
})
},
giveVotesLink(){
if(this.votes.giveVotes > 299){
// uni.showToast({
// title:"添加客服微信,为您加票,更有专属加票渠道哦!",
// icon:"none"
// });
this.request({
url:this.path+'/api/xyb/star/getMuch',
data:{
typeId:4,
much:20
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showToast({
title:"奖励20票",
icon:"none"
})
}
}
})
}else{
uni.navigateBack();
}
}
}
}
</script>
<style lang="scss" scoped>
.content{
background-color: #1fc8db;
background-image: linear-gradient(#5680E6 0%,#1fc8db 51%,#2cb5e8 75%,#9fb8ad 100%);
width: 100vw;
height: 100vh;
overflow: hidden;
box-sizing: border-box;
.ad-view{
padding: 30rpx;
box-sizing: border-box;
}
.wrap{
background-color: #FFFFFF;
border-radius: 30rpx;
margin: 30rpx;
display: flex;
align-items: center;
justify-content: space-around;
padding: 30rpx;
.w_center_l{
view:nth-child(1){
font-size: 26rpx;
}
view:nth-child(2){
font-size: 22rpx;
color: grey;
}
}
.w_left{
width: 100rpx;
height: 100rpx;
}
.w_center_r{
display: flex;
align-items: center;
justify-content: center;
image{
width: 40rpx;
height: 40rpx;
}
}
.w_right{
width: 120rpx;
padding: 10rpx 15rpx;
border-radius: 30rpx;
color: #FFFFFF;
font-size: 24rpx;
text-align: center;
background-image: linear-gradient(141deg,#5680E6,#9fb8ad);
}
}
}
</style>

22
pages/card/card.vue Normal file
View File

@@ -0,0 +1,22 @@
<template>
<view class="content">
</view>
</template>
<script>
export default {
data() {
return {
};
},
onLoad() {
},
}
</script>
<style scoped lang="scss">
</style>

279
pages/help/help.vue Normal file
View File

@@ -0,0 +1,279 @@
<template>
<view class="content">
<view class="top-img"><image v-if="info" :src="'https://xyb.wlkjwl.cn/'+info.image" mode="aspectFill"></image></view>
<view class="top-title">{{info.title}}</view>
<view class="top-btn">
<view @tap="goAdd">完成看视频任务</view>
</view>
<view class="top-process">
<view class="bg-blue" :style="[{ width:true?percent:''}]">{{percent}}</view>
</view>
<view class="top-go" @tap="goBack">
前往榜单为偶像投票赢取冠军
</view>
<view class="top-guan">
<image src="../../static/guan.png" mode="aspectFit"></image>
<view>发起人{{info.manager}}</view>
</view>
<view class="top-text">资源介绍</view>
<view class="top-content">
<view>解锁要求参与人数达到目标人数并且每人一个月内至少签到{{info.targetDay}}即可解锁大屏资源</view>
<view>展示时长该资源投放时间=1</view>
<view>活动时间即日起{{info.endTime}}结束</view>
<view>参与条件由于资源珍贵为了长期能够供应更多更好的资源目前很遗憾普通用户只能参与一个资源解锁VIP用户可以参与所有资源解锁</view>
</view>
<view class="top-text">参与成员</view>
<view class="top-list">
<view class="top-list-item" v-for="(item,index) in dataList" :key="index">
<view>{{item.rankingNum}}</view>
<image :src="item.head" mode="aspectFill"></image>
<view class="right">
<view>{{item.nick}}</view>
<view>已完成{{item.much}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
let rewardedVideoAd = null;
export default {
data() {
return {
percent:'0%',
id:'',
starId:'',
info:'',
dataList:""
};
},
onLoad(option) {
console.log(option)
this.id = option.id;
this.starId = option.starId;
this.getActiveInfo(option.id,option.starId)
this.getTenLength(option.id,option.starId)
this.loadgoAdd();
// this.joinActive()
},
methods:{
getActiveInfo(id,starId){
this.request({
url:this.path+'/api/xyb/star/activeInfo',
data:{
id:id,
starId:starId
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
if(d.data.completeCount>d.data.targetDay-1){
this.percent = '100%'
}else{
this.percent = Math.floor(d.data.completeCount/d.data.targetDay*100)+'%';
}
this.info = d.data;
}
}
})
},
goBack(){
uni.navigateBack();
},
getTenLength(id,starId){
this.request({
url:this.path+'api/xyb/star/activeParticipateList',
data:{
id:id,
starId:starId,
pageNum:1,
pageSize:10
},
success:(res)=>{
let d = res.data;
this.dataList = d.rows;
console.log(d)
}
})
},
joinActive(){
this.request({
url:this.path+'/api/xyb/star/participateActive',
data:{
activeId:this.id,
starId:this.starId,
},
success:(res)=>{
let d = res.data;
console.log(d)
}
})
},
//展示激励视频
goAdd(){
let that = this;
rewardedVideoAd.show()
.then(() => console.log('激励视频 广告显示'))
},
loadgoAdd(){
let that = this;
if (uni.createRewardedVideoAd) {
rewardedVideoAd = uni.createRewardedVideoAd({ adUnitId: 'adunit-b391eb6b37e844fe' });
rewardedVideoAd.onLoad(() => {
console.log('激励视频 广告加载成功')
})
rewardedVideoAd.onError(err => {
console.log(err)
})
rewardedVideoAd.onClose(res => {
// 用户点击了【关闭广告】按钮
// 小于 2.1.0 的基础库版本res 是一个 undefined
rewardedVideoAd.offClose()
console.log(res)
if (res && res.isEnded || res === undefined) {
// 正常播放结束,可以下发游戏奖励
that.joinActive();
that.getActiveInfo(that.id,that.starId)
that.getTenLength(that.id,that.starId)
}
else {
// 播放中途退出,不下发游戏奖励
}
})
}
},
}
}
</script>
<style lang="scss">
page{
background-color: #5680E6;
// background-image: linear-gradient(#5680E6, #FEE08C);
}
.top-list{
padding: 30rpx;
.top-list-item{
display: flex;
justify-content: left;
align-items: center;
margin-bottom: 15rpx;
.right{
padding-left: 20rpx;
view:nth-child(2){
font-size: 24rpx;
color: grey;
}
}
view{
margin-right: 30rpx;
}
image{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
}
}
.top-content{
line-height: 1.5;
font-size: 26rpx;
view{
margin-bottom: 20rpx;
}
}
.top-text{
color: #10AEFF;
font-size: 24rpx;
margin-bottom: 20rpx;
}
.bg-blue{
background-color: #10AEFF;
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
}
.content{
padding: 20rpx;
margin: 30rpx;
border-radius: 10rpx;
background-color: #FFFFFF;
.top-guan{
display: flex;
justify-content: left;
align-items: center;
font-size: 24rpx;
margin: 20rpx 0;
view{
background-color: #F2F2F2;
display: flex;
justify-content: left;
align-items: center;
padding: 10rpx;
width: 300rpx;
border-radius: 30rpx;
padding-left: 10px;
font-size: 24rpx;
color: grey;
}
image{
width: 50rpx;
height: 50rpx;
border-radius: 50%;
margin-right: 10rpx;
}
}
.top-go{
height: 70rpx;
line-height: 70rpx;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
background-color: #4A67D6;
color: #FFFFFF;
border-radius: 8rpx;
}
.top-process{
.percent{
}
margin-bottom: 20rpx;
background-color: #F2F2F2;
color: #FFFFFF;
}
.top-title{
border-bottom: 1px solid #F2F2F2;
padding: 10rpx 0;
}
.top-img{
width: 100%;
height: 400rpx;
image{
width: 100%;
height: 400rpx;
}
}
.top-btn{
padding: 10rpx 0;
display: flex;
justify-content: center;
align-items: center;
margin: 20rpx 0;
view{
background-color: #4A67D6;
width: 300rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 26rpx;
text-align: center;
color: #FFFFFF;
border-radius: 50rpx;
}
}
}
</style>

821
pages/index/index.vue Normal file
View File

@@ -0,0 +1,821 @@
<template>
<view class="content">
<swiper class="swiper" :autoplay="true" :circular="true">
<swiper-item class="swiper-item" v-for="(item,index) in bannerList" :key="index">
<image :src="'https://xyb.wlkjwl.cn/'+item.imageUrl" mode="aspectFill"></image>
<view class="text" v-if="item.title">
<view class="title">{{item.title}}</view>
<view class="name">{{item.remark}}</view>
</view>
</swiper-item>
<!-- <swiper-item class="swiper-item">
<ad unit-id="adunit-edf130ab482cfb31"></ad>
</swiper-item> -->
</swiper>
<view class="input-wrap" @tap="goSearch">
<input type="text" placeholder="输入爱豆全名搜索">
<image src="../../static/r.png" mode="aspectFit"></image>
</view>
<view class="end-text">
{{endText}}结束还剩余<uni-countdown :showColon="false" :splitorColor="'#5680E6'" :color="'#5680E6'" :day="time.days" :hour="time.hours" :minute="time.minutes" :second="time.seconds"></uni-countdown>
</view>
<view class="ranking">
<view class="ranking-left-text">
<view @tap="init(index+1)" :key="index" v-for="(item,index) in rankingText" :class="index == rankingZero?'active':''" class="text-item">{{item}}</view>
</view>
<view class="ranking-right-text">
<view @tap="previewImage">{{endText}}规则</view>
</view>
<view class="ranking-top">
<view class="ranking-top-left" v-if="ranklist.length>0">
<image :src="'https://xyb.wlkjwl.cn/'+ranklist[1].head" mode="aspectFill"></image>
<image class="h2" src="../../static/h2.png" mode="aspectFit"></image>
<view class="bgv">{{ranklist[1].rankIngNum}}</view>
<view class="center-bottom">
<view class="tickname">{{ranklist[1].name}}</view>
<view class="ticket">{{ranklist[1].much}}</view>
<view @tap="goSupports(ranklist[1])" class="goSupport">去打榜</view>
</view>
</view>
<view class="ranking-top-center" v-if="ranklist.length>0">
<image :src="'https://xyb.wlkjwl.cn/'+ranklist[0].head" mode="aspectFill"></image>
<image class="h1" src="../../static/h1.png" mode="aspectFit"></image>
<view class="bgv">{{ranklist[0].rankIngNum}}</view>
<view class="center-bottom">
<view class="tickname">{{ranklist[0].name}}</view>
<view class="ticket">{{ranklist[0].much}}</view>
<view @tap="goSupports(ranklist[0])" class="goSupport">去打榜</view>
</view>
</view>
<view class="ranking-top-right" v-if="ranklist.length>0">
<image :src="'https://xyb.wlkjwl.cn/'+ranklist[2].head" mode="aspectFill"></image>
<image class="h3" src="../../static/h3.png" mode="aspectFit"></image>
<view class="bgv">{{ranklist[2].rankIngNum}}</view>
<view class="center-bottom">
<view class="tickname">{{ranklist[2].name}}</view>
<view class="ticket">{{ranklist[2].much}}</view>
<view @tap="goSupports(ranklist[2])" class="goSupport">去打榜</view>
</view>
</view>
</view>
<view class="ranking-list">
<view class="ranking-list-item" v-for="(item,index) in nRanklist" :key="index">
<view>{{(index+4)}}</view><!-- {{item.rankIngNum}} -->
<view><image :src="'https://xyb.wlkjwl.cn/'+item.head" mode="aspectFill"></image></view>
<view>{{item.name}}</view>
<view>{{item.much}}</view>
<view @tap="goSupports(item)">去打榜</view>
</view>
</view>
<!-- <button class="getUserInfo" open-type="getUserInfo" @getuserinfo="wxGetUserInfo" withCredentials="true">微信登录</button> -->
</view>
<view class="show-wrap" v-if="isLogin">
<view class="show-model">
<view class="title">未登录</view>
<view class="content">请允许微信授权登录</view>
<view class="btn-group">
<button @tap="hideIsLogin" class="button-default">取消</button>
<button class="button-default button-blue getUserInfo" open-type="getUserInfo" @getuserinfo="wxGetUserInfo" withCredentials="true">确认</button>
</view>
</view>
<view class="show-model-mask">
</view>
</view>
<view class="show-mask-last show-wrap" v-if="isShow">
<view class="mask-last-top">
<image :src="'https://xyb.wlkjwl.cn/'+isShowObj.image" mode="scaleToFill"></image>
<view class="text" v-if="isShowObj.remark">
{{isShowObj.remark}}
</view>
<view @tap="hideIsShow" class="btn-bottom"><image src="../../static/cha.png" mode="scaleToFill"></image></view>
</view>
<view @tap="hideIsShow" class="show-model-mask">
</view>
</view>
</view>
</template>
<script>
import { mapState,mapMutations } from 'vuex';
import uniCountdown from '@/components/uni-countdown/uni-countdown.vue'
export default {
components:{
uniCountdown
},
computed: {
...mapState(['hasLogin','userInfo']),
nRanklist(){
let list = this.ranklist;
return list.slice(3,list.length-1)
}
// newRankList(){
// let list = this.ranklist;
// return list.splice(3,list.length-1)
// }
},
data() {
return {
endText:"周榜",
rankingText:['周榜','月榜'],
rankingZero:0,
isLogin:false,
isShow:false,
isShowObj:'',
bannerList:'',//banner
time:'',//time
// maskUrl:'../../static/head.png',
rulesImgs:'',
page:1,
ranklist:[],
isLoad:true,
imgPath:'',
// nRanklist:[]
}
},
onLoad() {
this.imgPath = this.path;
this.getKeep();
let userInfo = uni.getStorageSync('userInfo') || '';
if (userInfo.token) {
this.getContent();
}
},
onShow() {
this.init(1);
},
onPullDownRefresh() {
console.log('refresh');
setTimeout(()=>{
this.init(this.rankingZero + 1)
uni.stopPullDownRefresh();
}, 1500);
},
onReachBottom(){
console.log('到底了')
if(this.isLoad){
this.getDataList(this.rankingZero + 1)
}
},
methods: {
...mapMutations(['login']),
getContent(){
uni.getClipboardData({
success: (res)=> {
console.log(res.data);
try{
let str = res.data.match(/邀请码(\S*)进入/)[1];
this.request({
url:this.path+'/api/xyb/banner/addChoujiangOrderByYqm',
data:{
yaoqingma:str
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showToast({
title:'奖励抽奖次数+1',
icon:"none"
})
this.request({
url:this.path + "/api/xyb/star/getMuch",
data:{
typeId: 5,
much: 20
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showModal({
title: '恭喜',
content: '领取到来自好友 赠送的20票',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
})
}
}
})
}catch(e){
//TODO handle the exception
}
}
});
},
init(type){
this.defaultDataList();
//周榜
if(type == 1){
this.rankingZero = 0;
this.getBanner(1);
this.getLeaveTime(1);
// this.getRulesImgs(1);
this.getDataList(1);
this.endText = this.rankingText[this.rankingZero];
this.getKeepWeekAndMoth(3)
}else{
//月榜
this.rankingZero = 1;
this.getBanner(2)
this.getLeaveTime(2);
// this.getRulesImgs(2)
this.getDataList(2);
this.endText = this.rankingText[this.rankingZero];
this.getKeepWeekAndMoth(4)
}
},
getKeepWeekAndMoth(id){
this.request({
url:this.path+'/api/xyb/banner/list',
data:{
typeId:id
},
success:(res)=>{
let d = res.data;
console.log(d)
if(d.code == 0){
let url = d.rows[0].imageUrl;
this.rulesImgs = 'https://xyb.wlkjwl.cn/'+url
}
}
});
},
defaultDataList(){
this.page = 1;
this.ranklist = [];
this.isLoad = true;
},
previewImage: function(e) {
var current = this.rulesImgs;
console.log(current)
uni.previewImage({
current: current,
urls: [this.rulesImgs]
})
},
getKeep(){
this.request({
url:this.path+'/api/xyb/banner/lockping',
success:(res)=>{
let d = res.data;
if(d.data && d.data.image){
this.isShow = true;
this.isShowObj = d.data;
}
}
})
},
getDataList(type){
//api/xyb/star/weekRankingList
if(!this.isLoad) return
let path = type == 1?this.path+'/api/xyb/banner/weekRankingList':this.path+'/api/xyb/banner/monthRankingList';
this.request({
url:path,
data:{
typeId:1,
pageNum:this.page,
pageSize:20
},
success:(res)=>{
let d = res.data;
if(d.rows.length>0){
this.page++;
this.ranklist = this.ranklist.concat(d.rows);
if(d.rows.length<20){
this.isLoad = false;
}
}else{
this.isLoad = false;
}
}
})
},
getLeaveTime(type){
this.request({
url:this.path+'/api/xyb/banner/timeLeave',
data:{
typeId:type
},
success:(res)=>{
let d = res.data;
let t = this.timeSaveChange(d.data/1000)
this.time = t;
}
})
},
getBanner(type){
this.request({
url:this.path+'/api/xyb/banner/list',
data:{
typeId:type
},
success:(res)=>{
let d = res.data;
this.bannerList = d.rows;
}
})
},
getRulesImgs(type){
if(type == 1){
this.rulesImgs = '/static/z.png'
}else{
this.rulesImgs = '/static/y.png'
}
},
timeSaveChange(shijiancha){
var days = Math.floor(shijiancha / 60 / 60 / 24);
var daysRound = Math.floor(days);
var hours = Math.floor(shijiancha / 60 / 60 - (24 * daysRound));
var hoursRound = Math.floor(hours);
var minutes = Math.floor(shijiancha /60 - (24 * 60 * daysRound) - (60 * hoursRound));
var minutesRound = Math.floor(minutes);
var seconds = Math.floor(shijiancha - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound));
return {
days:days,
hours:hours,
minutes:minutes,
seconds:seconds
}
},
wxGetUserInfo(){
//api/xyb/wechat/wxLogin
let that = this;
uni.showLoading({
title: '加载中'
});
uni.login({
provider: 'weixin',
success: loginRes => {//获取用户code
// if(!that.hasLogin){
//授权获取用户信息
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
console.log(infoRes)
that.request({
url: that.path + '/api/xyb/wechat/wxLogin',
data: {
code: loginRes.code,
sex:infoRes.userInfo.gender,
head:infoRes.userInfo.avatarUrl,
nick:infoRes.userInfo.nickName,
encryptedData:infoRes.encryptedData,
iv:infoRes.iv
},
success: function(res) {
let d = res.data;
if(d.code == 0){
uni.hideLoading()
infoRes.userInfo.token = d.data.openid;
that.login(infoRes.userInfo)
that.isLogin = false;
that.getContent();
}else{
uni.showToast({
title: '登录失败!服务器状态码'+d.code,
duration: 2000,
icon: 'none'
});
}
}
});
}
});
// }
}
});
},
hideIsShow(){
this.isShow = false;
},
hideIsLogin(){
this.isLogin = false;
},
goSupports(item){
if(!this.hasLogin){
this.isLogin = true;
}else{
uni.navigateTo({
url: '/pages/support/support?id='+item.id
});
}
},
goAdd(){
uni.navigateTo({
url: '/pages/ad/ad'
});
},
goSearch(){
uni.navigateTo({
url: '/pages/search/search'
});
}
}
}
</script>
<style lang="scss">
page,.content{
background-color: #F6F6F6;
}
.show-mask-last{
.mask-last-top{
z-index: 11;
position: fixed;
top: 7.5vh;
left: 10vw;
box-sizing: border-box;
background-color: #FFFFFF;
.text{
width: 50rpx;
margin: 0 10rpx;
font-size: 50rpx;
height: 100%;
position: absolute;
top: 0;
right: 0;
color: #FFFFFF;
font-family: "楷体";
display: flex;
align-items: center;
text-align: center;
}
.btn-bottom{
position: absolute;
bottom: -100rpx;
left: 50%;
width: 78rpx;
height: 78rpx;
background-color: #FFFFFF;
border-radius: 50%;
margin-left: -40rpx;
image{
width: 82rpx;
height: 82rpx;
margin: -1rpx;
}
}
&>image{
width: 80vw;
height: calc(85vh - 80rpx);
float: left;
}
}
}
.show-wrap{
border-radius: 10rpx;
.show-model-mask{
width: 100vw;
height: 100vh;
z-index: 10;
background-color: rgba(0,0,0,0.3);
position: fixed;
top: 0;
left: 0;
}
.show-model{
z-index: 11;
position: fixed;
top: 50%;
left: 50%;
width: 80vw;
height: auto;
margin:-150rpx -40vw ;
box-sizing: border-box;
background-color: #FFFFFF;
.title{
background-color: #4A67D6;
color: #FFFFFF;
text-align: center;
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
}
.content{
background-color: #FFFFFF;
font-size: 28rpx;
padding: 15rpx;
box-sizing: border-box;
text-align: center;
height: 100rpx;
line-height: 70rpx;
}
.btn-group{
display: flex;
align-items: center;
text-align: center;
box-shadow: 0 -4rpx 4rpx #F2F2F2;
padding: 0 30rpx;
.button-blue{
color: #4A67D6;
}
.button-default{
background-color: #FFFFFF;
height: 80rpx;
line-height: 80rpx;
text-align: center;
padding: 0 30rpx;
font-size: 28rpx;
flex: 1;
}
button{
width: auto;
height: auto;
border: none;
padding: 0;
margin: 0;
border-radius: 0;
line-height: inherit;
background-color: #FFFFFF;
display: inline-block;
}
button::after{display: none;}
button + button{
border-left: 1px solid #F2F2F2;
}
}
}
}
.content{
.ranking{
position: relative;
.ranking-right-text{
position: absolute;
right: 0;
top: -80rpx;
font-size: 30rpx;
padding: 0 30rpx;
color: #5680E6;
margin: 10rpx;
}
.ranking-left-text{
position: absolute;
left: 0;
top: -80rpx;
font-size: 30rpx;
color: grey;
display: flex;
padding: 0 30rpx;
.text-item{
margin: 10rpx;
padding-right: 20rpx;
}
.text-item:nth-child(1){
border-right: 1px solid grey;
}
.active{
color: #5680E6;
font-weight: 700;
}
}
.ranking-list{
background-color: #FFFFFF;
margin: 0 20rpx 30rpx;
box-shadow: 0 10rpx 10rpx #F1E2D5;
padding:50rpx 30rpx 15rpx;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
.ranking-list-item{
display: flex;
justify-content: space-around;
align-items: center;
margin-bottom: 20rpx;
view:nth-child(1){
font-size: 28rpx;
}
view:nth-child(2){
image{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
view:nth-child(3){
font-size: 28rpx;
width: 160rpx;
}
view:nth-child(4){
font-size: 30rpx;
color: #FF8802;
}
view:nth-child(5){
height: 50rpx;
line-height: 50rpx;
border-radius: 30rpx;
color: #FFFFFF;
font-size: 26rpx;
font-weight: 500;
width: 120rpx;
text-align: center;
background-color: #5680E6;
box-shadow: 0 5rpx 5rpx #9599B5;
}
}
}
.ranking-top{
background-color: #5680E6;
margin: 100rpx 30rpx 0;
padding: 50rpx 30rpx;
min-height: 430rpx;
border-top-left-radius: 18rpx;
border-top-right-radius: 18rpx;
display: flex;
justify-content: space-between;
box-sizing: border-box;
.ranking-top-right,.ranking-top-center,.ranking-top-left{
text-align: center;
position: relative;
box-sizing: border-box;
font-size: 26rpx;
margin-bottom: 100rpx;
flex: 1;
.center-bottom{
position: absolute;
bottom: -100rpx;
left: 0;
width: 100%;
}
.tickname{
font-size: 28rpx;
color: #FFFFFF;
margin-top: 20rpx;
}
.ticket{
color: #FFF100;
font-size: 28rpx;
margin: 10rpx 0;
}
.goSupport{
width: 120rpx;
height: 50rpx;
margin: 0 auto;
line-height: 50rpx;
border-radius: 30rpx;
border: 1px solid #8D6BE1;
color: #844B13;
background-color: #FFFFFF;
font-size: 22rpx;
box-shadow: 0 10rpx 10rpx #9599B5;
}
.h1,.h2,.h3{
position: absolute;
top: -18rpx;
right: 0;
width: 50rpx;
height: 50rpx;
border: 0;
transform:rotate(40deg);
}
.bgv{
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
border-radius: 50%;
font-size: 24rpx;
position: absolute;
color: #854B07;
}
image{
width: 160rpx;
height: 160rpx;
border-radius: 50%;
}
}
.ranking-top-left{
image{
border: 6rpx solid #CCFEFF;
}
.bgv{
top: 170rpx;
left: 50%;
background-color: #CCFEFF;
margin: -20rpx;
}
}
.ranking-top-center{
top: -120rpx;
border: 18rpx solid;
border-color: #5680E6;
background-color: #5680E6;
border-radius: 50%;
.center-bottom{
bottom: -160rpx;
}
.h1{
top: -22rpx;
right: 0;
}
image{
border: 6rpx solid #FFEB44;
width: 180rpx;
height: 180rpx;
}
.bgv{
top: 190rpx;
left: 50%;
margin:-20rpx;
background-color: #FFEB44;
}
}
.ranking-top-right{
image{
border: 6rpx solid #D7FFCC;
}
.bgv{
background-color: #D7FFCC;
top: 170rpx;
left: 50%;
background-color: #D7FFCC;
margin: -20rpx;
}
}
}
}
.swiper{
width: 100%;
height:340rpx;
.swiper-item{
position: relative;
ad{
height: 340rpx!important;
}
image{
width: 100%;
height: 340rpx;
}
.text{
position: absolute;
top: 30rpx;
left: 30rpx;
.title{
color: #FF558A;
font-size: 36rpx;
font-family: "楷体";
font-weight: 700;
margin-bottom: 20rpx;
}
.name{
color: #FFFFFF;
padding:8rpx 15rpx;
font-size: 32rpx;
font-weight: 700;
font-family: '楷体';
background-color: #5680E6;
text-align: center;
// border-radius: 30rpx;
}
}
}
}
.end-text{
display: flex;
font-size: 26rpx;
height: 50rpx;
line-height: 50rpx;
margin: 0 30rpx;
color: #5680E6;
}
.input-wrap{
font-size: 28rpx;
background: #fff;
border: 1px solid #5680E6;
border-radius: 30px;
position: relative;
display: flex;
padding: 10rpx 20rpx;
margin: 30rpx 30rpx 15rpx;
input{
height: 40rpx;
line-height: 40rpx;
flex: 1;
font-size: 28rpx;
}
image{
width: 40rpx;
height: 40rpx;
}
}
.input-wrap::after{
content:'';
position: absolute;
top: -2px; bottom: -2px;
left: -2px; right: -2px;
background: linear-gradient(135deg,#E7DCA1, #0AA6E0);
border-radius: 30px;
content: '';
z-index: -1;
}
}
</style>

708
pages/luckdraw/luckdraw.vue Normal file
View File

@@ -0,0 +1,708 @@
<template>
<view>
<view class="container">
<view class="tui-dot" :class="['tui-dot-'+(index+1)]" v-for="(item,index) in circleList" :key="index"></view>
<view class="tui-container-in">
<view class="tui-content-out" :class="['tui-award-'+(index+1),index==indexSelect?'tui-awardSelect':'']" v-for="(item,index) in awardList"
:key="index">
<image v-if="item.img" class="tui-award-image" :src="item.img"></image>
<text class="tui-award-text">{{item.name}}</text>
</view>
<view class="tui-btn-start" :class="[isRunning?'tui-ative':'']" @tap="startDrawing">立即抽奖</view>
</view>
</view>
<view class="cishu">
<ad unit-id="adunit-32d9f5191a24a83a"></ad>
<view class="head">
<view class="num">我的抽奖机会{{choice}}</view>
<view @tap="showModal" class="more">更多次数</view>
</view>
<view class="tit">抽奖规则</view>
<view class="text-item" v-for="(item,index) in dayList" :key="index">
{{(index+1)}}.{{item}}
</view>
</view>
<view class="show-wrap" v-if="isShow">
<view class="show-model">
<view class="title">未登录</view>
<view class="content">请允许微信授权登录</view>
<view class="btn-group">
<button @tap="hideIsLogin" class="button-default">取消</button>
<button class="button-default button-blue getUserInfo" open-type="getUserInfo" @getuserinfo="wxGetUserInfo" withCredentials="true">确认</button>
</view>
</view>
<view class="show-model-mask">
</view>
</view>
<view class="show-wrap" v-if="isLogin">
<view class="show-model">
<view class="title">更多抽奖次数</view>
<view class="content">
<view class="text-item" v-for="(item,index) in dayList" :key="index">
{{(index+1)}}.{{item}}
</view>
</view>
<view class="btn-group">
<button @tap.stop="close" class="button-default">取消</button>
<button open-type="share" class="button-default button-blue">确认</button>
</view>
</view>
<view class="show-model-mask" @tap.stop="close">
</view>
</view>
</view>
</template>
<script>
import { mapState,mapMutations } from 'vuex';
export default {
data() {
return {
circleList: 24, //圆点
awardList: [{
img: "",
name: "谢谢参与",
num:0
}, {
img: "/static/supprt/xin.png",
name: "5票",
num:5
}, {
img: "/static/supprt/xin.png",
name: "10票",
num:10
}, {
img: "/static/supprt/xin.png",
name: "20票",
num:20
}, {
img: "/static/supprt/xin.png",
name: "50票",
num:50
}, {
img: "/static/supprt/xin.png",
name: "66票",
num:66
}, {
img: "/static/supprt/xin.png",
name: "100票",
num:100
}, {
img: "/static/supprt/xin.png",
name: "188票",
num:188
}], //奖品数组
indexSelect: 0, //被选中的奖品index
isRunning: false ,//是否正在抽奖
dayList:['普通用户每日可有2次抽奖机会','每日零点刷新抽奖机会数量','抽奖次数不累计','每天可邀请4位好友助力助力成功一次可增加一次抽奖机会'],
isLogin:false,
choice:0,
isShow:false,
id:''
}
},
computed: {
...mapState(['hasLogin','userInfo'])
},
onLoad(option) {
this.id = option.id;
this.getUserInfo();
},
onShareAppMessage(){
if(this.id){
let userInfo = uni.getStorageSync('userInfo') || '';
return {
title:"助力抽奖",
path:"/pages/support/support?cid="+userInfo.token+'&id='+this.id,
imageUrl:"/static/nahan.jpg"
}
}
},
methods: {
getUserInfo(){
if(this.hasLogin){
this.request({
url:this.path+'/api/xyb/star/customerInfo',
success:(res)=>{
let d = res.data;
this.choice = d.data.chouNum;
console.log(d)
}
})
}else{
this.showIsShow();
}
},
wxGetUserInfo(){
//api/xyb/wechat/wxLogin
let that = this;
uni.login({
provider: 'weixin',
success: loginRes => {//获取用户code
// if(!that.hasLogin){
//授权获取用户信息
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
that.request({
url: that.path + '/api/xyb/wechat/wxLogin',
data: {
code: loginRes.code,
sex:infoRes.userInfo.gender,
head:infoRes.userInfo.avatarUrl,
nick:infoRes.userInfo.nickName,
},
success: function(res) {
let d = res.data;
infoRes.userInfo.token = d.data.openid;
that.login(infoRes.userInfo)
that.hideIsShow();
}
});
}
});
// }
}
});
},
hideIsShow(){
this.isShow = false;
},
showIsShow(){
this.isShow = true;
},
showModal(){
this.isLogin = true;
},
close(){
this.isLogin = false;
},
//获取随机数
getRandom: function(u) {
let rnd = Math.random() > 0.5 ? "2" : "1";
u = u || 3;
for (var i = 0; i < u; i++) {
rnd += Math.floor(Math.random() * 10);
}
return Number(rnd);
},
addPiao(num){
this.request({
url:this.path+'/api/xyb/star/getMuch',
data:{
typeId:1,
much:num
},
success:(res)=>{
let d = res.data;
console.log(d)
this.custChoice();
}
})
},
custChoice(){
this.request({
url:this.path+'/api/xyb/star/customerInfoUpdate',
data:{
type:0
},
success:(res)=>{
let d = res.data;
console.log("抽奖次数减一")
this.getUserInfo();
}
})
},
//开始抽奖
startDrawing: function() {
if(this.choice>0){
if (this.isRunning) return
this.isRunning = true;
let indexSelect = 0;
let i = 0;
let randomNum = this.getRandom(3);
let timer = setInterval(() => {
++indexSelect;
//这里用y=30*x+150函数做的处理.可根据自己的需求改变转盘速度
indexSelect = indexSelect % 8;
this.indexSelect = indexSelect;
i += 40;
if (i > randomNum) {
//去除循环
clearInterval(timer)
timer = null;
//获奖提示
uni.showModal({
title: '恭喜您',
content: '获得了【' + this.awardList[indexSelect].name + '】',
confirmColor: '#5677FC',
showCancel: false, //去掉取消按钮
success: (res) => {
if (res.confirm) {
this.isRunning = false
}
},
complete: () => {
let num = this.awardList[indexSelect].num;
this.addPiao(num)
}
})
}
}, (70 + i))
}else{
uni.showToast({
title:'抽奖次数不足',
icon:'none'
})
return;
}
}
}
}
</script>
<style scoped lang="scss">
page{
width: 100vw;
height: 100vh;
/* #ifdef H5 */
height: calc(100vh - 50px);
/* #endif */
overflow: hidden;
box-sizing: border-box;
background-color: #FCC8D0;
}
.show-wrap{
border-radius: 10rpx;
.show-model-mask{
width: 100vw;
height: 100vh;
z-index: 10;
background-color: rgba(0,0,0,0.3);
position: fixed;
top: 0;
left: 0;
}
.show-model{
z-index: 11;
position: fixed;
top: 50%;
left: 50%;
width: 80vw;
height: auto;
margin: -40vw;
box-sizing: border-box;
background-color: #FFFFFF;
.title{
background-color: #4A67D6;
color: #FFFFFF;
text-align: center;
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
}
.content{
background-color: #FFFFFF;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx;
box-sizing: border-box;
text-align: center;
.text-item{
margin-top: 10rpx;
text-align: left;
color: rgba(0,0,0,0.8);
}
}
.btn-group{
display: flex;
align-items: center;
text-align: center;
box-shadow: 0 -4rpx 4rpx #F2F2F2;
padding: 0 30rpx;
.button-blue{
color: #4A67D6;
}
.button-default{
background-color: #FFFFFF;
height: 80rpx;
line-height: 80rpx;
text-align: center;
padding: 0 30rpx;
font-size: 28rpx;
flex: 1;
}
button{
width: auto;
height: auto;
border: none;
padding: 0;
margin: 0;
border-radius: 0;
line-height: inherit;
background-color: #FFFFFF;
display: inline-block;
}
button::after{display: none;}
button + button{
border-left: 1px solid #F2F2F2;
}
}
}
}
.text-item{
margin-top: 15rpx;
font-size: 28rpx;
}
.head{
display: flex;
justify-content: space-between;
align-items: center;
}
.tit{
font-size: 30rpx;
font-weight: 700;
text-align: center;
display: flex;
color: #FE99CE;
justify-content: center;
margin: 15rpx auto;
}
.cishu{
width: 560rpx;
height: auto;
background-color: #FFFAEF;
padding: 30rpx;
margin: 10rpx auto 0;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
ad{margin-bottom: 20rpx;}
}
.num{
background-color: #FCC8D0;
padding: 10rpx 20rpx;
border-radius: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
flex: 4;
}
.more{
background-color: #DD524D;
color: #FFFAEF;
font-size: 28rpx;
border-radius: 30rpx;
padding: 10rpx 20rpx;
flex: 2;
margin-left: 30rpx;
text-align: center;
}
.container {
height: 600rpx;
width: 650rpx;
background-color: #fc4034;
/* margin: auto; */
border-radius: 40rpx;
box-shadow: 0 10px 0 #d80014;
position: relative;
margin: 100rpx auto 0;
}
.tui-container-in {
width: 580rpx;
height: 530rpx;
background-color: #d80014;
border-radius: 40rpx;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
/**小圆点 start*/
.tui-dot {
position: absolute;
display: block;
border-radius: 50%;
height: 20rpx;
width: 20rpx;
}
.tui-dot:nth-child(odd) {
background: #fff;
animation: 0.5s odd linear infinite;
}
.tui-dot:nth-child(even) {
background: #fcf400;
animation: 0.5s even linear infinite;
}
.tui-dot-1 {
left: 15rpx;
top: 15rpx;
}
.tui-dot-2 {
left: 117.5rpx;
top: 7.5rpx;
}
.tui-dot-3 {
left: 220rpx;
top: 7.5rpx;
}
.tui-dot-4 {
left: 322.5rpx;
top: 7.5rpx;
}
.tui-dot-5 {
left: 425rpx;
top: 7.5rpx;
}
.tui-dot-6 {
left: 527.5rpx;
top: 7.5rpx;
}
.tui-dot-7 {
left: 620rpx;
top: 15rpx;
}
.tui-dot-8 {
left: 622rpx;
top: 109rpx;
}
.tui-dot-9 {
left: 622rpx;
top: 203rpx;
}
.tui-dot-10 {
left: 622rpx;
top: 297rpx;
}
.tui-dot-11 {
left: 622rpx;
top: 391rpx;
}
.tui-dot-12 {
left: 622rpx;
top: 485rpx;
}
.tui-dot-13 {
left: 620rpx;
top: 565rpx;
}
.tui-dot-14 {
left: 517.5rpx;
top: 572rpx;
}
.tui-dot-15 {
left: 415rpx;
top: 572rpx;
}
.tui-dot-16 {
left: 312.5rpx;
top: 572rpx;
}
.tui-dot-17 {
left: 210rpx;
top: 572rpx;
}
.tui-dot-18 {
left: 107.5rpx;
top: 572rpx;
}
.tui-dot-19 {
left: 15rpx;
top: 565rpx;
}
.tui-dot-20 {
left: 7.5rpx;
top: 471rpx;
}
.tui-dot-21 {
left: 7.5rpx;
top: 377rpx;
}
.tui-dot-22 {
left: 7.5rpx;
top: 283rpx;
}
.tui-dot-23 {
left: 7.5rpx;
top: 189rpx;
}
.tui-dot-24 {
left: 7.5rpx;
top: 95rpx;
}
@-webkit-keyframes odd {
0% {
background: #fff;
}
100% {
background: #fcf400;
}
}
@keyframes odd {
0% {
background: #fff;
}
100% {
background: #fcf400;
}
}
@-webkit-keyframes even {
0% {
background: #fcf400;
}
100% {
background: #fff;
}
}
@keyframes even {
0% {
background: #fcf400;
}
100% {
background: #fff;
}
}
/**小圆点 end*/
.tui-content-out {
position: absolute;
height: 150rpx;
width: 168rpx;
background-color: #fcecec;
border-radius: 15rpx;
box-shadow: 0 4px 0 #fcc8d0;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}
/* 580 530 */
.tui-award-1 {
left: 24rpx;
top: 24rpx;
}
.tui-award-2 {
left: 206rpx;
top: 24rpx;
}
.tui-award-3 {
left: 388rpx;
top: 24rpx;
}
.tui-award-4 {
left: 388rpx;
top: 188rpx;
}
.tui-award-5 {
left: 388rpx;
top: 352rpx;
}
.tui-award-6 {
left: 206rpx;
top: 352rpx;
}
.tui-award-7 {
left: 24rpx;
top: 352rpx;
}
.tui-award-8 {
left: 24rpx;
top: 188rpx;
}
/**居中 加粗*/
.tui-btn-start {
position: absolute;
top: 188rpx;
left: 206rpx;
border-radius: 15rpx;
height: 150rpx;
width: 168rpx;
background-color: #fc4034;
box-shadow: 0 4px 0 #fcc8d0;
color: #fcf400;
text-align: center;
font-size: 32rpx;
font-weight: bold;
line-height: 150rpx;
}
.tui-ative {
opacity: 0.6 !important;
}
.tui-award-image {
/* position: absolute;
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0; */
height: 60rpx;
width: 60rpx;
}
.tui-award-text{
font-size: 28rpx;
color: #000;
}
.tui-awardSelect {
background-color: #fcf400 !important;
box-shadow: 0 4px 0 rgb(240, 208, 12) !important;
}
</style>

421
pages/my/my.vue Normal file
View File

@@ -0,0 +1,421 @@
<template>
<view class="content">
<view class="center-bg">
<uni-nav-bar class="nav-bar" :border="false" backgroundColor="transparent" bcolor="transparent" color="#FFF" :title="title" />
<image src="../../static/center.jpg" mode="aspectFill"></image>
<view class="wrap">
<view class="center-portrait" v-if="info">
<image :src="info.head" mode="aspectFill"></image>
<view class="name"><text>{{info.nick}}</text></view>
<view class="center-bottom">
<view><image src="../../static/de.png" mode="aspectFit"></image><text v-if="info.isVip">VIP</text><text v-else>平民</text></view>
<view><image src="../../static/xin.png" mode="aspectFit"></image>{{info.much}}</view>
<view><image src="../../static/id.png" mode="aspectFit"></image>{{info.id}}</view>
</view>
</view>
<view class="center-portrait" v-else>
<image @tap="log" src="../../static/user.png" mode="aspectFill"></image>
<view class="name"><text>我是一颗小爱豆</text></view>
<view class="center-bottom">
<view><image src="../../static/de.png" mode="aspectFit"></image><text>平民</text></view>
<view><image src="../../static/xin.png" mode="aspectFit"></image>0</view>
<view><image src="../../static/id.png" mode="aspectFit"></image>123456</view>
</view>
</view>
</view>
<uni-list>
<button class="handleContact" open-type="contact" bindcontact="handleContact">
<uniListItem class="my-bottom" title="问题解答服务" thumb="/static/ke.png" />
</button>
</uni-list>
</view>
<view class="center-bottom" v-if="dataList && dataList.length>0">
<view class="my-diot">我的偶像长按删除</view>
<view class="my-diot-list">
<view @longtap="longtap(item)" class="my-list-item" v-for="(item,index) in dataList" :key="index">
<text>{{index+1}}</text>
<image class="image" :src="'https://xyb.wlkjwl.cn/'+item.star.head" mode="aspectFill"></image>
<view class="list-width">
<view class="title">{{item.star.name}}</view>
<view class="text">总获得{{item.totalMuch}}票支持</view>
<view class="blue">我支持了{{item.myMuch}}</view>
</view>
<view @tap="navToSup(item)" class="jixu">继续支持</view>
</view>
</view>
</view>
<view class="ad-view">
<ad unit-id="adunit-9a9de4ea95a7f799" ad-type="video" ad-theme="white"></ad>
<view class="text">由未来空间网络公司开发 联系微信:zkm0210</view>
</view>
<view class="show-wrap" v-if="isLogin">
<view class="show-model">
<view class="title">未登录</view>
<view class="content">请允许微信授权登录</view>
<view class="btn-group">
<button @tap="hideIsLogin" class="button-default">取消</button>
<button class="button-default button-blue getUserInfo" open-type="getUserInfo" @getuserinfo="wxGetUserInfo" withCredentials="true">确认</button>
</view>
</view>
<view @tap="hideIsLogin" class="show-model-mask">
</view>
</view>
</view>
</template>
<script>
import { mapState,mapMutations } from 'vuex';
import uniList from '@/components/uni-list/uni-list.vue'
import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
export default {
components: {
uniList,
uniListItem
},
computed: {
...mapState(['hasLogin','userInfo']),
},
data() {
return {
title:"我的偶像",
info:'',
dataList:'',
isLogin:false,
};
},
onLoad() {
this.getUserInfo();
},
onShow(){
this.getMyXiang();
},
methods:{
...mapMutations(['login']),
log(){
this.isLogin = true;
},
longtap(item){
this.request({
url:this.path+'/api/xyb/star/myouxiangDelete',
data:{
starId:item.starId
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showToast({
title:"删除成功!",
icon:"none"
})
this.getMyXiang();
}
}
})
},
wxGetUserInfo(){
//api/xyb/wechat/wxLogin
let that = this;
uni.login({
provider: 'weixin',
success: loginRes => {//获取用户code
// if(!that.hasLogin){
//授权获取用户信息
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
that.request({
url: that.path + '/api/xyb/wechat/wxLogin',
data: {
code: loginRes.code,
sex:infoRes.userInfo.gender,
head:infoRes.userInfo.avatarUrl,
nick:infoRes.userInfo.nickName,
encryptedData:infoRes.encryptedData,
iv:infoRes.iv
},
success: function(res) {
let d = res.data;
infoRes.userInfo.token = d.data.openid;
that.login(infoRes.userInfo)
that.isLogin = false;
that.getMyXiang();
that.getUserInfo();
}
});
}
});
// }
}
});
},
handleContact(e){
console.log(e.detail.path)
console.log(e.detail.query)
},
hideIsLogin(){
this.isLogin = false;
},
getMyXiang(){
this.request({
url:this.path+'/api/xyb/star/myouxiang',
success:(res)=>{
let d = res.data;
this.dataList = d.rows;
console.log(this.dataList)
}
})
},
getUserInfo(){
this.request({
url:this.path+'/api/xyb/star/customerInfo',
success:(res)=>{
let d = res.data;
this.info = d.data;
console.log(this.info)
}
})
},
navToSup(item){
uni.navigateTo({
url: '/pages/support/support?id='+item.starId
});
}
}
};
</script>
<style lang="scss" scoped>
.ad-view{
width: 100%;
padding:20rpx 0 0;
box-sizing: border-box;
.text{
text-align: center;
color: grey;
font-size: 26rpx;
padding: 10rpx 0;
}
}
page{
background-color: #f6f6f6;
}
.show-wrap{
border-radius: 10rpx;
z-index: 9999;
.show-model-mask{
width: 100vw;
height: 100vh;
z-index: 9998;
background-color: rgba(0,0,0,0.3);
position: fixed;
top: 0;
left: 0;
}
.show-model{
z-index: 11;
position: fixed;
top: 50%;
left: 50%;
width: 80vw;
height: auto;
margin:-150rpx -40vw ;
box-sizing: border-box;
background-color: #FFFFFF;
z-index: 9999;
.title{
background-color: #4A67D6;
color: #FFFFFF;
text-align: center;
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
}
.content{
background-color: #FFFFFF;
font-size: 28rpx;
padding: 15rpx;
box-sizing: border-box;
text-align: center;
height: 100rpx;
line-height: 70rpx;
}
.btn-group{
display: flex;
align-items: center;
text-align: center;
box-shadow: 0 -4rpx 4rpx #F2F2F2;
padding: 0 30rpx;
.button-blue{
color: #4A67D6;
}
.button-default{
background-color: #FFFFFF;
height: 80rpx;
line-height: 80rpx;
text-align: center;
padding: 0 30rpx;
font-size: 28rpx;
flex: 1;
}
button{
width: auto;
height: auto;
border: none;
padding: 0;
margin: 0;
border-radius: 0;
line-height: inherit;
background-color: #FFFFFF;
display: inline-block;
}
button::after{display: none;}
button + button{
border-left: 1px solid #F2F2F2;
}
}
}
}
.handleContact{
background-color: transparent;
padding: 0;
margin: 0;
border: 0;
line-height: initial;
text-align: left;
}
.handleContact::after{
display: none;
}
.content{
background-color: #f6f6f6;
.center-bottom{
margin-top: 30rpx;
padding: 30rpx;
background-color: #FFFFFF;
.my-diot{
font-size: 32rpx;
padding-bottom: 30rpx;
margin-bottom: 30rpx;
border-bottom: 1px solid #F2F2F2;
}
.my-diot-list{
.my-list-item{
display: flex;
align-items: center;
font-size: 28rpx;
overflow: hidden;
justify-content: space-between;
padding-bottom: 10rpx;
margin-bottom: 10rpx;
.list-width{
width:250rpx;
text-align: center;
white-space: nowrap;
}
text{
font-weight: 700;
font-size: 30rpx;
}
.jixu{
background-color: rgb(86, 128, 230);
color: #FFFFFF;
font-size: 24rpx;
padding:10rpx 20rpx;
border-radius: 50rpx;
}
.title{
font-weight: 600;
}
.text{
font-size: 26rpx;
}
.blue{
color: #4CD964;
font-size: 26rpx;
}
.image{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
}
}
.center-bg{
width: 100%;
position: relative;
padding-top: 150rpx;
background-color: #FFFFFF;
.wrap{
min-height: 400rpx;
}
.nav-bar{
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
.bottom-portrait{
display: flex;
}
.center-portrait{
position: relative;
text-align: center;
margin-bottom: 60rpx;
.center-bottom{
display: flex;
background-color: #FFFFFF;
width: 80%;
margin: 0 auto;
padding: 30rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 700;
border-radius: 20rpx;
box-shadow: 0 0 20rpx #FFFFFF;
view{
flex: 1;
display: flex;
text-align: center;
justify-content: center;
align-items: center;
image{
width: 50rpx;
height: 50rpx;
margin-right: 10rpx;
}
color: #08A5E0;
}
}
.name{
text-align: center;
font-size: 30rpx;
margin: 20rpx 0 30rpx;
font-weight: 700;
color: #FFFFFF;
}
&>image{
margin: 0 auto;
border: 10rpx solid #FFFFFF;
width: 180rpx;
height: 180rpx;
border-radius: 50%;
}
}
&>image{
width: 100%;
height: 600rpx;
position: absolute;
top:0;
left: 0;
border-bottom-left-radius:50rpx;
border-bottom-right-radius:50rpx;
}
}
}
</style>

192
pages/search/search.vue Normal file
View File

@@ -0,0 +1,192 @@
<template>
<view class="container">
<view class="tui-searchbox">
<view class="tui-search-input">
<input @confirm="searchResult" confirm-type="search" :placeholder="'大家都在搜:'" :focus="true" auto-focus placeholder-class="tui-input-plholder"
class="tui-input" v-model.trim="key" />
<icon type="clear" :size='16' color='#6D6D6D' @tap="cleanKey" v-show="key"></icon>
</view>
<view class="tui-cancle" @tap="searchResult">确定</view>
</view>
<view class="search_list">
<view class="s-list-item" v-for="(item,index) in dataList" :key="index">
<view class="item-left">
<image :src="'https://xyb.wlkjwl.cn/'+item.head" mode="aspectFill"></image>
<view>
<view class="name">{{item.name}}</view>
<view class="text">{{item.much}}</view>
</view>
</view>
<view @tap="navToMeth(item)" class="support">去支持</view>
</view>
</view>
</view>
</template>
<script>
import tuiIcon from "@/components/icon/icon"
export default {
components: {
tuiIcon
},
data() {
return {
key: "",
dataList:''
}
},
onLoad:function(){
},
methods: {
searchResult(){
this.getSearchList()
},
getSearchList(){
this.request({
url:this.path+'/api/xyb/banner/monthRankingList',
data:{
name:this.key,
typeId:1
},
success:(res)=>{
let d = res.data;
console.log(d)
this.dataList = d.rows;
}
})
},
cleanKey: function() {
this.key = ''
},
navToMeth(item){
uni.navigateTo({
url: '/pages/support/support?id='+item.id
});
}
}
}
</script>
<style>
page {
color: #333;
background: #fff;
}
.container {
padding: 0 30upx 30upx 30upx;
box-sizing: border-box;
}
.search_list{
padding: 30rpx;
}
.s-list-item{
display: flex;
align-items: center;
justify-content:space-between;
padding: 10rpx 0;
}
.s-list-item:not(:last-child){
border-bottom: 1px solid #F2F2F2;
}
.item-left{
display: flex;
font-size: 30rpx;
align-items: center;
}
.support{
padding: 10rpx 15rpx;
background-color: #4A67D6;
color: #FFFFFF;
font-size: 28rpx;
width: 100rpx;
text-align: center;
border-radius: 8rpx;
}
.name{
font-size: 36rpx;
font-weight: 700;
font-family: "宋体";
}
.text{
font-size: 30rpx;
color: grey;
}
.s-list-item image{
width: 90rpx;
height: 90rpx;
border-radius: 50%;
margin-right: 30rpx;
}
.tui-searchbox {
padding: 30upx 0;
box-sizing: border-box;
display: flex;
align-items: center;
}
.tui-search-input {
width: 100%;
height: 66upx;
border-radius: 35upx;
padding: 0 30upx;
box-sizing: border-box;
background: #f2f2f2;
display: flex;
align-items: center;
flex-wrap: nowrap;
}
.tui-input {
flex: 1;
color: #333;
padding: 0 16upx;
font-size: 28upx;
}
.tui-input-plholder {
font-size: 28upx;
color: #b2b2b2;
}
.tui-cancle {
color: #888;
font-size: 28upx;
padding-left: 30upx;
flex-shrink: 0;
}
.tui-history-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30upx 0;
}
.tui-icon-delete {
padding: 10upx;
}
.tui-search-title {
font-size: 28upx;
font-weight: bold;
}
.tui-hot-header {
padding: 30upx 0;
}
.tui-tag-class {
display: inline-block;
margin-bottom: 20upx;
margin-right: 20upx;
font-size: 26upx !important;
}
</style>

1127
pages/support/support.vue Normal file

File diff suppressed because it is too large Load Diff

BIN
static/ai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/bo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
static/card_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
static/center.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

BIN
static/cha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
static/de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/doki.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/dou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/guan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/h1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/h2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/h3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

132
static/icons.js Normal file
View File

@@ -0,0 +1,132 @@
export default {
"pulldown": "\ue588",
"refreshempty": "\ue461",
"back": "\ue471",
"forward": "\ue470",
"more": "\ue507",
"more-filled": "\ue537",
"scan": "\ue612",
"qq": "\ue264",
"weibo": "\ue260",
"weixin": "\ue261",
"pengyouquan": "\ue262",
"loop": "\ue565",
"refresh": "\ue407",
"refresh-filled": "\ue437",
"arrowthindown": "\ue585",
"arrowthinleft": "\ue586",
"arrowthinright": "\ue587",
"arrowthinup": "\ue584",
"undo-filled": "\ue7d6",
"undo": "\ue406",
"redo": "\ue405",
"redo-filled": "\ue7d9",
"bars": "\ue563",
"chatboxes": "\ue203",
"camera": "\ue301",
"chatboxes-filled": "\ue233",
"camera-filled": "\ue7ef",
"cart-filled": "\ue7f4",
"cart": "\ue7f5",
"checkbox-filled": "\ue442",
"checkbox": "\ue7fa",
"arrowleft": "\ue582",
"arrowdown": "\ue581",
"arrowright": "\ue583",
"smallcircle-filled": "\ue801",
"arrowup": "\ue580",
"circle": "\ue411",
"eye-filled": "\ue568",
"eye-slash-filled": "\ue822",
"eye-slash": "\ue823",
"eye": "\ue824",
"flag-filled": "\ue825",
"flag": "\ue508",
"gear-filled": "\ue532",
"reload": "\ue462",
"gear": "\ue502",
"hand-thumbsdown-filled": "\ue83b",
"hand-thumbsdown": "\ue83c",
"hand-thumbsup-filled": "\ue83d",
"heart-filled": "\ue83e",
"hand-thumbsup": "\ue83f",
"heart": "\ue840",
"home": "\ue500",
"info": "\ue504",
"home-filled": "\ue530",
"info-filled": "\ue534",
"circle-filled": "\ue441",
"chat-filled": "\ue847",
"chat": "\ue263",
"mail-open-filled": "\ue84d",
"email-filled": "\ue231",
"mail-open": "\ue84e",
"email": "\ue201",
"checkmarkempty": "\ue472",
"list": "\ue562",
"locked-filled": "\ue856",
"locked": "\ue506",
"map-filled": "\ue85c",
"map-pin": "\ue85e",
"map-pin-ellipse": "\ue864",
"map": "\ue364",
"minus-filled": "\ue440",
"mic-filled": "\ue332",
"minus": "\ue410",
"micoff": "\ue360",
"mic": "\ue302",
"clear": "\ue434",
"smallcircle": "\ue868",
"close": "\ue404",
"closeempty": "\ue460",
"paperclip": "\ue567",
"paperplane": "\ue503",
"paperplane-filled": "\ue86e",
"person-filled": "\ue131",
"contact-filled": "\ue130",
"person": "\ue101",
"contact": "\ue100",
"images-filled": "\ue87a",
"phone": "\ue200",
"images": "\ue87b",
"image": "\ue363",
"image-filled": "\ue877",
"location-filled": "\ue333",
"location": "\ue303",
"plus-filled": "\ue439",
"plus": "\ue409",
"plusempty": "\ue468",
"help-filled": "\ue535",
"help": "\ue505",
"navigate-filled": "\ue884",
"navigate": "\ue501",
"mic-slash-filled": "\ue892",
"search": "\ue466",
"settings": "\ue560",
"sound": "\ue590",
"sound-filled": "\ue8a1",
"spinner-cycle": "\ue465",
"download-filled": "\ue8a4",
"personadd-filled": "\ue132",
"videocam-filled": "\ue8af",
"personadd": "\ue102",
"upload": "\ue402",
"upload-filled": "\ue8b1",
"starhalf": "\ue463",
"star-filled": "\ue438",
"star": "\ue408",
"trash": "\ue401",
"phone-filled": "\ue230",
"compose": "\ue400",
"videocam": "\ue300",
"trash-filled": "\ue8dc",
"download": "\ue403",
"chatbubble-filled": "\ue232",
"chatbubble": "\ue202",
"cloud-download": "\ue8e4",
"cloud-upload-filled": "\ue8e5",
"cloud-upload": "\ue8e6",
"cloud-download-filled": "\ue8e9",
"headphones":"\ue8bf",
"shop":"\ue609"
}

BIN
static/id.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

BIN
static/ke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/nahan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

BIN
static/r.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

BIN
static/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
static/supprt/chou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/supprt/fen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/supprt/kan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/supprt/lian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/supprt/qian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/supprt/ri.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/supprt/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/supprt/xin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
static/tabbar/tab-home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/tabbar/tab-my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
static/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
static/wxpengyou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/xin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

33
store/index.js Normal file
View File

@@ -0,0 +1,33 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
hasLogin: false,
userInfo: {},
},
mutations: {
login(state,provider) {
state.hasLogin = true;
state.userInfo = provider;
uni.setStorage({//缓存用户登陆状态
key: 'userInfo',
data: provider
})
},
logout(state) {
state.hasLogin = false;
state.userInfo = {};
uni.removeStorage({
key: 'userInfo'
})
}
},
actions: {
}
})
export default store

76
uni.scss Normal file
View File

@@ -0,0 +1,76 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24rpx;
$uni-font-size-base:28rpx;
$uni-font-size-lg:32rpx;
/* 图片尺寸 */
$uni-img-size-sm:40rpx;
$uni-img-size-base:52rpx;
$uni-img-size-lg:80rpx;
/* Border Radius */
$uni-border-radius-sm: 4rpx;
$uni-border-radius-base: 6rpx;
$uni-border-radius-lg: 12rpx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20rpx;
$uni-spacing-row-lg: 30rpx;
/* 垂直间距 */
$uni-spacing-col-sm: 8rpx;
$uni-spacing-col-base: 16rpx;
$uni-spacing-col-lg: 24rpx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40rpx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30rpx;

4
unpackage/dist/build/mp-weixin/app.js vendored Normal file
View File

@@ -0,0 +1,4 @@
require('./common/runtime.js')
require('./common/vendor.js')
require('./common/main.js')

48
unpackage/dist/build/mp-weixin/app.json vendored Normal file
View File

@@ -0,0 +1,48 @@
{
"pages": [
"pages/index/index",
"pages/support/support",
"pages/my/my",
"pages/ad/ad",
"pages/luckdraw/luckdraw",
"pages/help/help",
"pages/search/search",
"pages/addpiao/addpiao",
"pages/card/card"
],
"subPackages": [],
"window": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "明星权力榜投票",
"navigationBarBackgroundColor": "#5680E6",
"backgroundColor": "#5680E6"
},
"tabBar": {
"color": "#999999",
"selectedColor": "#5680E6",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar/tab-home.png",
"selectedIconPath": "static/tabbar/tab-home-current.png",
"text": "榜单"
},
{
"pagePath": "pages/my/my",
"iconPath": "static/tabbar/tab-my.png",
"selectedIconPath": "static/tabbar/tab-my-current.png",
"text": "我的"
}
]
},
"plugins": {
"contactPlugin": {
"version": "1.3.0",
"provider": "wx104a1a20c3f81ec2"
}
},
"usingComponents": {},
"sitemapLocation": "sitemap.json"
}

View File

@@ -0,0 +1 @@
@import './common/main.wxss';

View File

@@ -0,0 +1 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/main"],{"0560":function(e,t,n){"use strict";n.r(t);var r=n("fc56");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("1259");var c,a,u,i,f=n("f0c5"),s=Object(f["a"])(r["default"],c,a,!1,null,null,null,!1,u,i);t["default"]=s.exports},1259:function(e,t,n){"use strict";var r=n("d928"),o=n.n(r);o.a},1858:function(e,t,n){"use strict";(function(e,t){n("9f3b");var r=a(n("66fd")),o=a(n("de67")),c=a(n("0560"));function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}r.default.config.productionTip=!1,c.default.mpType="app",r.default.prototype.path="https://xyb.wlkjwl.cn/",r.default.prototype.$store=o.default,r.default.prototype.request=function(t){var n=e.getStorageSync("userInfo")||"",r=n.token,o=t.success,c=t.error;if(t.data=t.data||{},t.headers=t.headers||{},r){var a="string"===typeof t.data?JSON.parse(t.data):t.data;t.data["Access-Token"]=r in a?t.data["Access-Token"]:r||"",t.headers["Access-Token"]=r in t.headers?t.headers["Access-Token"]:r||""}return delete t.success,delete t.error,e.request(Object.assign({type:"post",method:"get",dataType:"json",header:t.headers,success:function(e){"function"===typeof o&&o(e)},error:function(n,r){e.showToast({title:"错误提示!<br>携带参数:"+JSON.stringify(t.data),duration:2e3,icon:"none"}),"function"===typeof c&&c(res)}},t))};var s=new r.default(i({},c.default));t(s).$mount()}).call(this,n("543d")["default"],n("543d")["createApp"])},8529:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("2f62");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={methods:c({},(0,r.mapMutations)(["login","logout"])),onLaunch:function(){console.log("App Launch");var t=e.getStorageSync("userInfo")||"";t.token&&(console.log(t.token),this.login(t))},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};t.default=u}).call(this,n("543d")["default"])},d928:function(e,t,n){},fc56:function(e,t,n){"use strict";n.r(t);var r=n("8529"),o=n.n(r);for(var c in r)"default"!==c&&function(e){n.d(t,e,(function(){return r[e]}))}(c);t["default"]=o.a}},[["1858","common/runtime","common/vendor"]]]);

View File

@@ -0,0 +1 @@
page::after{position:fixed;content:'';left:-1000px;top:-1000px;-webkit-animation:shadow-preload .1s;-webkit-animation-delay:3s;animation:shadow-preload .1s;animation-delay:3s}@-webkit-keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}@keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}

View File

@@ -0,0 +1,4 @@
!function(){try{var a=Function("return this")();a&&!a.Math&&(Object.assign(a,{isFinite:isFinite,Array:Array,Date:Date,Error:Error,Function:Function,Math:Math,Object:Object,RegExp:RegExp,String:String,TypeError:TypeError,setTimeout:setTimeout,clearTimeout:clearTimeout,setInterval:setInterval,clearInterval:clearInterval}),"undefined"!=typeof Reflect&&(a.Reflect=Reflect))}catch(a){}}();
(function(n){function e(e){for(var o,u,p=e[0],s=e[1],a=e[2],c=0,l=[];c<p.length;c++)u=p[c],i[u]&&l.push(i[u][0]),i[u]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(n[o]=s[o]);m&&m(e);while(l.length)l.shift()();return r.push.apply(r,a||[]),t()}function t(){for(var n,e=0;e<r.length;e++){for(var t=r[e],o=!0,u=1;u<t.length;u++){var p=t[u];0!==i[p]&&(o=!1)}o&&(r.splice(e--,1),n=s(s.s=t[0]))}return n}var o={},u={"common/runtime":0},i={"common/runtime":0},r=[];function p(n){return s.p+""+n+".js"}function s(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(n){var e=[],t={"components/uni-countdown/uni-countdown":1,"components/uni-popup/uni-popup":1,"components/uni-list-item/uni-list-item":1,"components/uni-list/uni-list":1,"components/uni-popup/uni-popup-dialog":1,"components/uni-popup/uni-popup-message":1,"components/uni-popup/uni-popup-share":1,"components/uni-nav-bar/uni-nav-bar":1,"components/icon/icon":1,"components/uni-transition/uni-transition":1,"components/uni-badge/uni-badge":1,"components/uni-status-bar/uni-status-bar":1};u[n]?e.push(u[n]):0!==u[n]&&t[n]&&e.push(u[n]=new Promise((function(e,t){for(var o=({"components/uni-countdown/uni-countdown":"components/uni-countdown/uni-countdown","components/uni-popup/uni-popup":"components/uni-popup/uni-popup","components/uni-list-item/uni-list-item":"components/uni-list-item/uni-list-item","components/uni-list/uni-list":"components/uni-list/uni-list","components/uni-popup/uni-popup-dialog":"components/uni-popup/uni-popup-dialog","components/uni-popup/uni-popup-message":"components/uni-popup/uni-popup-message","components/uni-popup/uni-popup-share":"components/uni-popup/uni-popup-share","components/uni-nav-bar/uni-nav-bar":"components/uni-nav-bar/uni-nav-bar","components/icon/icon":"components/icon/icon","components/uni-transition/uni-transition":"components/uni-transition/uni-transition","components/uni-badge/uni-badge":"components/uni-badge/uni-badge","components/uni-status-bar/uni-status-bar":"components/uni-status-bar/uni-status-bar"}[n]||n)+".wxss",i=s.p+o,r=document.getElementsByTagName("link"),p=0;p<r.length;p++){var a=r[p],c=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(c===o||c===i))return e()}var l=document.getElementsByTagName("style");for(p=0;p<l.length;p++){a=l[p],c=a.getAttribute("data-href");if(c===o||c===i)return e()}var m=document.createElement("link");m.rel="stylesheet",m.type="text/css",m.onload=e,m.onerror=function(e){var o=e&&e.target&&e.target.src||i,r=new Error("Loading CSS chunk "+n+" failed.\n("+o+")");r.code="CSS_CHUNK_LOAD_FAILED",r.request=o,delete u[n],m.parentNode.removeChild(m),t(r)},m.href=i;var d=document.getElementsByTagName("head")[0];d.appendChild(m)})).then((function(){u[n]=0})));var o=i[n];if(0!==o)if(o)e.push(o[2]);else{var r=new Promise((function(e,t){o=i[n]=[e,t]}));e.push(o[2]=r);var a,c=document.createElement("script");c.charset="utf-8",c.timeout=120,s.nc&&c.setAttribute("nonce",s.nc),c.src=p(n),a=function(e){c.onerror=c.onload=null,clearTimeout(l);var t=i[n];if(0!==t){if(t){var o=e&&("load"===e.type?"missing":e.type),u=e&&e.target&&e.target.src,r=new Error("Loading chunk "+n+" failed.\n("+o+": "+u+")");r.type=o,r.request=u,t[1](r)}i[n]=void 0}};var l=setTimeout((function(){a({type:"timeout",target:c})}),12e4);c.onerror=c.onload=a,document.head.appendChild(c)}return Promise.all(e)},s.m=n,s.c=o,s.d=function(n,e,t){s.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},s.r=function(n){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},s.t=function(n,e){if(1&e&&(n=s(n)),8&e)return n;if(4&e&&"object"===typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(s.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)s.d(t,o,function(e){return n[e]}.bind(null,o));return t},s.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return s.d(e,"a",e),e},s.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},s.p="/",s.oe=function(n){throw console.error(n),n};var a=global["webpackJsonp"]=global["webpackJsonp"]||[],c=a.push.bind(a);a.push=e,a=a.slice();for(var l=0;l<a.length;l++)e(a[l]);var m=c;t()})([]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/icon/icon"],{"168d":function(e,t,n){"use strict";var u,c=function(){var e=this,t=e.$createElement;e._self._c},a=[];n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return u}))},4342:function(e,t,n){"use strict";n.r(t);var u=n("ce00"),c=n.n(u);for(var a in u)"default"!==a&&function(e){n.d(t,e,(function(){return u[e]}))}(a);t["default"]=c.a},acd7:function(e,t,n){},ce00:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u={name:"tuiIcon",props:{name:{type:String,default:""},size:{type:Number,default:32},color:{type:String,default:""},bold:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},index:{type:Number,default:0}},methods:{handleClick:function(e){this.$emit("click",{index:e})}}};t.default=u},df0d:function(e,t,n){"use strict";var u=n("acd7"),c=n.n(u);c.a},fe9e:function(e,t,n){"use strict";n.r(t);var u=n("168d"),c=n("4342");for(var a in c)"default"!==a&&function(e){n.d(t,e,(function(){return c[e]}))}(a);n("df0d");var i,o=n("f0c5"),r=Object(o["a"])(c["default"],u["b"],u["c"],!1,null,null,null,!1,u["a"],i);t["default"]=r.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/icon/icon-create-component',
{
'components/icon/icon-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("fe9e"))
})
},
[['components/icon/icon-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<view data-event-opts="{{[['tap',[['handleClick',['$0'],['index']]]]]}}" class="{{['tui-icon-class tui-icon','tui-icon-'+name]}}" style="{{'color:'+(color)+';'+('font-size:'+(size+'px')+';')+('font-weight:'+(bold?'bold':'normal')+';')}}" bindtap="__e"></view>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-badge/uni-badge"],{"69f6":function(t,e,n){"use strict";var u,a=function(){var t=this,e=t.$createElement;t._self._c},i=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return u}))},"7ab1":function(t,e,n){"use strict";n.r(e);var u=n("caf0"),a=n.n(u);for(var i in u)"default"!==i&&function(t){n.d(e,t,(function(){return u[t]}))}(i);e["default"]=a.a},8074:function(t,e,n){},"83e4":function(t,e,n){"use strict";n.r(e);var u=n("69f6"),a=n("7ab1");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("91a0");var c,r=n("f0c5"),f=Object(r["a"])(a["default"],u["b"],u["c"],!1,null,"173b5142",null,!1,u["a"],c);e["default"]=f.exports},"91a0":function(t,e,n){"use strict";var u=n("8074"),a=n.n(u);a.a},caf0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u={name:"UniBadge",props:{type:{type:String,default:"default"},inverted:{type:Boolean,default:!1},text:{type:[String,Number],default:""},size:{type:String,default:"normal"}},data:function(){return{badgeStyle:""}},watch:{text:function(){this.setStyle()}},mounted:function(){this.setStyle()},methods:{setStyle:function(){this.badgeStyle="width: ".concat(8*String(this.text).length+12,"px")},onClick:function(){this.$emit("click")}}};e.default=u}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-badge/uni-badge-create-component',
{
'components/uni-badge/uni-badge-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("83e4"))
})
},
[['components/uni-badge/uni-badge-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<block wx:if="{{text}}"><text data-event-opts="{{[['tap',[['onClick']]]]}}" class="{{['uni-badge data-v-173b5142',inverted?'uni-badge--'+type+' uni-badge--'+size+' uni-badge--'+type+'-inverted':'uni-badge--'+type+' uni-badge--'+size]}}" style="{{(badgeStyle)}}" bindtap="__e">{{text}}</text></block>

View File

@@ -0,0 +1 @@
.uni-badge.data-v-173b5142{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;height:20px;line-height:20px;color:#333;border-radius:100px;background-color:#f1f1f1;background-color:initial;text-align:center;font-family:Helvetica Neue,Helvetica,sans-serif;font-size:12px;padding:0 6px}.uni-badge--inverted.data-v-173b5142{padding:0 5px 0 0;color:#f1f1f1}.uni-badge--default.data-v-173b5142{color:#333;background-color:#f1f1f1}.uni-badge--default-inverted.data-v-173b5142{color:#999;background-color:initial}.uni-badge--primary.data-v-173b5142{color:#fff;background-color:#007aff}.uni-badge--primary-inverted.data-v-173b5142{color:#007aff;background-color:initial}.uni-badge--success.data-v-173b5142{color:#fff;background-color:#4cd964}.uni-badge--success-inverted.data-v-173b5142{color:#4cd964;background-color:initial}.uni-badge--warning.data-v-173b5142{color:#fff;background-color:#f0ad4e}.uni-badge--warning-inverted.data-v-173b5142{color:#f0ad4e;background-color:initial}.uni-badge--error.data-v-173b5142{color:#fff;background-color:#dd524d}.uni-badge--error-inverted.data-v-173b5142{color:#dd524d;background-color:initial}.uni-badge--small.data-v-173b5142{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:center center;transform-origin:center center}

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-countdown/uni-countdown"],{"0658":function(t,n,e){},"3aae":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o={name:"UniCountdown",props:{showDay:{type:Boolean,default:!0},showColon:{type:Boolean,default:!0},backgroundColor:{type:String,default:""},borderColor:{type:String,default:"#f2f2f2"},color:{type:String,default:"#f2f2f2"},splitorColor:{type:String,default:"#f2f2f2"},day:{type:Number,default:0},hour:{type:Number,default:0},minute:{type:Number,default:0},second:{type:Number,default:0}},data:function(){return{timer:null,syncFlag:!1,d:"00",h:"00",i:"00",s:"00",leftTime:0,seconds:0}},watch:{day:function(t){this.changeFlag()},hour:function(t){this.changeFlag()},minute:function(t){this.changeFlag()},second:function(t){this.changeFlag()}},created:function(t){this.startData()},beforeDestroy:function(){clearInterval(this.timer)},methods:{toSeconds:function(t,n,e,o){return 60*t*60*24+60*n*60+60*e+o},timeUp:function(){clearInterval(this.timer),this.$emit("timeup")},countDown:function(){var t=this.seconds,n=0,e=0,o=0,a=0;t>0?(n=Math.floor(t/86400),e=Math.floor(t/3600)-24*n,o=Math.floor(t/60)-24*n*60-60*e,a=Math.floor(t)-24*n*60*60-60*e*60-60*o):this.timeUp(),n<10&&(n="0"+n),e<10&&(e="0"+e),o<10&&(o="0"+o),a<10&&(a="0"+a),this.d=n,this.h=e,this.i=o,this.s=a},startData:function(){var t=this;this.seconds=this.toSeconds(this.day,this.hour,this.minute,this.second),this.seconds<=0||(this.countDown(),this.timer=setInterval((function(){t.seconds--,t.seconds<0?t.timeUp():t.countDown()}),1e3))},changeFlag:function(){clearInterval(this.timer),this.startData()}}};n.default=o},"4c15":function(t,n,e){"use strict";var o,a=function(){var t=this,n=t.$createElement;t._self._c},i=[];e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return o}))},"4c96":function(t,n,e){"use strict";var o=e("0658"),a=e.n(o);a.a},"617c":function(t,n,e){"use strict";e.r(n);var o=e("4c15"),a=e("fca0");for(var i in a)"default"!==i&&function(t){e.d(n,t,(function(){return a[t]}))}(i);e("4c96");var u,c=e("f0c5"),r=Object(c["a"])(a["default"],o["b"],o["c"],!1,null,"a6ec359c",null,!1,o["a"],u);n["default"]=r.exports},fca0:function(t,n,e){"use strict";e.r(n);var o=e("3aae"),a=e.n(o);for(var i in o)"default"!==i&&function(t){e.d(n,t,(function(){return o[t]}))}(i);n["default"]=a.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-countdown/uni-countdown-create-component',
{
'components/uni-countdown/uni-countdown-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("617c"))
})
},
[['components/uni-countdown/uni-countdown-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<view class="uni-countdown data-v-a6ec359c"><block wx:if="{{showDay}}"><text class="uni-countdown__number data-v-a6ec359c" style="{{'border-color:'+(borderColor)+';'+('color:'+(color)+';')+('background-color:'+(backgroundColor)+';')}}">{{d}}</text></block><block wx:if="{{showDay}}"><text class="uni-countdown__splitor data-v-a6ec359c" style="{{'color:'+(splitorColor)+';'}}">天</text></block><text class="uni-countdown__number data-v-a6ec359c" style="{{'border-color:'+(borderColor)+';'+('color:'+(color)+';')+('background-color:'+(backgroundColor)+';')}}">{{h}}</text><text class="uni-countdown__splitor data-v-a6ec359c" style="{{'color:'+(splitorColor)+';'}}">{{showColon?':':'时'}}</text><text class="uni-countdown__number data-v-a6ec359c" style="{{'border-color:'+(borderColor)+';'+('color:'+(color)+';')+('background-color:'+(backgroundColor)+';')}}">{{i}}</text><text class="uni-countdown__splitor data-v-a6ec359c" style="{{'color:'+(splitorColor)+';'}}">{{showColon?':':'分'}}</text><text class="uni-countdown__number data-v-a6ec359c" style="{{'border-color:'+(borderColor)+';'+('color:'+(color)+';')+('background-color:'+(backgroundColor)+';')}}">{{s}}</text><block wx:if="{{!showColon}}"><text class="uni-countdown__splitor data-v-a6ec359c" style="{{'color:'+(splitorColor)+';'}}">秒</text></block></view>

View File

@@ -0,0 +1 @@
.uni-countdown.data-v-a6ec359c{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;padding:2rpx 0;color:#ff00a0}.uni-countdown__splitor.data-v-a6ec359c{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:48rpx;line-height:48rpx;font-size:24rpx;color:#ff00a0}.uni-countdown__number.data-v-a6ec359c{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;height:48rpx;line-height:48rpx;text-align:center;font-size:24rpx;color:#ff00a0}

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-list-item/uni-list-item"],{"0aa3":function(t,e,n){},"27a0":function(t,e,n){"use strict";var i={uniBadge:function(){return n.e("components/uni-badge/uni-badge").then(n.bind(null,"83e4"))}},a=function(){var t=this,e=t.$createElement;t._self._c},u=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}))},"57b6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){n.e("components/uni-badge/uni-badge").then(function(){return resolve(n("83e4"))}.bind(null,n)).catch(n.oe)},a={name:"UniListItem",components:{uniBadge:i},props:{isabled:{type:Boolean,default:!1},title:{type:String,default:""},note:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},showArrow:{type:[Boolean,String],default:!0},showBadge:{type:[Boolean,String],default:!1},showSwitch:{type:[Boolean,String],default:!1},switchChecked:{type:[Boolean,String],default:!1},badgeText:{type:String,default:""},badgeType:{type:String,default:"success"},rightText:{type:String,default:""},thumb:{type:String,default:""},showExtraIcon:{type:[Boolean,String],default:!1},extraIcon:{type:Object,default:function(){return{type:"contact",color:"#000000",size:20}}}},inject:["list"],data:function(){return{isFirstChild:!1}},mounted:function(){},methods:{onClick:function(){this.$emit("click")},onSwitchChange:function(t){this.$emit("switchChange",t.detail)}}};e.default=a},"621f":function(t,e,n){"use strict";n.r(e);var i=n("27a0"),a=n("ccd3");for(var u in a)"default"!==u&&function(t){n.d(e,t,(function(){return a[t]}))}(u);n("fc33");var o,c=n("f0c5"),r=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"860b066c",null,!1,i["a"],o);e["default"]=r.exports},ccd3:function(t,e,n){"use strict";n.r(e);var i=n("57b6"),a=n.n(i);for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=a.a},fc33:function(t,e,n){"use strict";var i=n("0aa3"),a=n.n(i);a.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-list-item/uni-list-item-create-component',
{
'components/uni-list-item/uni-list-item-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("621f"))
})
},
[['components/uni-list-item/uni-list-item-create-component']]
]);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-badge": "/components/uni-badge/uni-badge"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['uni-list-item data-v-860b066c',disabled?'uni-list-item--disabled':'']}}" hover-class="{{disabled||showSwitch?'':'uni-list-item--hover'}}" data-event-opts="{{[['tap',[['onClick',['$event']]]]]}}" bindtap="__e"><view class="{{['uni-list-item__container data-v-860b066c',(isFirstChild)?'uni-list-item--first':'']}}"><block wx:if="{{thumb}}"><view class="uni-list-item__icon data-v-860b066c"><image class="uni-list-item__icon-img data-v-860b066c" mode="aspectFit" src="{{thumb}}"></image></view></block><view class="uni-list-item__content data-v-860b066c"><slot></slot><text class="uni-list-item__content-title data-v-860b066c">{{title}}</text><block wx:if="{{note}}"><text class="uni-list-item__content-note data-v-860b066c">{{note}}</text></block></view><view class="uni-list-item__extra data-v-860b066c"><block wx:if="{{rightText}}"><text class="{{['uni-list-item__extra-text data-v-860b066c',isabled?'active':'']}}">{{rightText}}</text></block><block wx:if="{{showBadge}}"><uni-badge vue-id="01e39c76-1" type="{{badgeType}}" text="{{badgeText}}" class="data-v-860b066c" bind:__l="__l"></uni-badge></block><block wx:if="{{showSwitch}}"><switch disabled="{{disabled}}" checked="{{switchChecked}}" data-event-opts="{{[['change',[['onSwitchChange',['$event']]]]]}}" bindchange="__e" class="data-v-860b066c"></switch></block><slot name="right"></slot><block wx:if="{{showArrow}}"><image class="right data-v-860b066c" src="/static/right.png" mode="aspectFit"></image></block></view></view></view>

View File

@@ -0,0 +1 @@
.uni-list-item.data-v-860b066c{font-size:32rpx;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;padding-left:30rpx;padding-right:30rpx}.uni-list-item--disabled.data-v-860b066c{opacity:.3}.uni-list-item--hover.data-v-860b066c{background-color:#f1f1f1}.uni-list-item__container.data-v-860b066c{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;padding:16rpx 30rpx;padding-left:0;-webkit-box-flex:1;-webkit-flex:1;flex:1;position:relative;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;border-bottom:1px solid #f2f2f2}.uni-list-item--first.data-v-860b066c{border-top-width:0}.uni-list-item__container.data-v-860b066c:after{position:absolute;top:0;right:0;left:0;height:1px;content:"";-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#e5e5e5;display:none}.uni-list-item--first.data-v-860b066c:after{height:0}.uni-list-item__content.data-v-860b066c{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:hidden;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;color:#3b4144}.uni-list-item__content-title.data-v-860b066c{font-size:28rpx;color:#3b4144;overflow:hidden}.uni-list-item__content-note.data-v-860b066c{margin-top:6rpx;color:#999;font-size:24rpx;overflow:hidden}.right.data-v-860b066c{width:40rpx;height:40rpx}.uni-list-item__extra.data-v-860b066c{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.active.data-v-860b066c{background-color:grey!important;color:#fff!important}.uni-list-item__icon.data-v-860b066c{margin-right:18rpx;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.uni-list-item__icon-img.data-v-860b066c{height:52rpx;width:52rpx}.uni-list-item__extra-text.data-v-860b066c{color:#999;font-size:24rpx;display:inline-block;width:120rpx;height:48rpx;line-height:48rpx;border-radius:10rpx;text-align:center;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;background-color:#5680e6;color:#fff}

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-list/uni-list"],{5750:function(t,n,e){"use strict";var i=e("5c6a"),o=e.n(i);o.a},"5c6a":function(t,n,e){},6361:function(t,n,e){"use strict";e.r(n);var i=e("7e1d"),o=e.n(i);for(var u in i)"default"!==u&&function(t){e.d(n,t,(function(){return i[t]}))}(u);n["default"]=o.a},7424:function(t,n,e){"use strict";var i,o=function(){var t=this,n=t.$createElement;t._self._c},u=[];e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return u})),e.d(n,"a",(function(){return i}))},"7e1d":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={name:"UniList","mp-weixin":{options:{multipleSlots:!1}},props:{enableBackToTop:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1}},provide:function(){return{list:this}},created:function(){this.firstChildAppend=!1},methods:{loadMore:function(t){this.$emit("scrolltolower")}}};n.default=i},"9e63":function(t,n,e){"use strict";e.r(n);var i=e("7424"),o=e("6361");for(var u in o)"default"!==u&&function(t){e.d(n,t,(function(){return o[t]}))}(u);e("5750");var r,a=e("f0c5"),c=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"7a2822dc",null,!1,i["a"],r);n["default"]=c.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-list/uni-list-create-component',
{
'components/uni-list/uni-list-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("9e63"))
})
},
[['components/uni-list/uni-list-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<view class="uni-list data-v-7a2822dc"><slot></slot></view>

View File

@@ -0,0 +1 @@
.uni-list.data-v-7a2822dc{display:-webkit-box;display:-webkit-flex;display:flex;background-color:#fff;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.uni-list.data-v-7a2822dc:before{height:0}.uni-list.data-v-7a2822dc:after{height:0}

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-nav-bar/uni-nav-bar"],{3368:function(t,n,e){"use strict";var u=e("9135"),i=e.n(u);i.a},"6f87":function(t,n,e){"use strict";var u={uniStatusBar:function(){return e.e("components/uni-status-bar/uni-status-bar").then(e.bind(null,"abc6"))}},i=function(){var t=this,n=t.$createElement;t._self._c},a=[];e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return u}))},9135:function(t,n,e){},c36d:function(t,n,e){"use strict";e.r(n);var u=e("d716"),i=e.n(u);for(var a in u)"default"!==a&&function(t){e.d(n,t,(function(){return u[t]}))}(a);n["default"]=i.a},d2e4:function(t,n,e){"use strict";e.r(n);var u=e("6f87"),i=e("c36d");for(var a in i)"default"!==a&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("3368");var r,o=e("f0c5"),c=Object(o["a"])(i["default"],u["b"],u["c"],!1,null,"628b9330",null,!1,u["a"],r);n["default"]=c.exports},d716:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=function(){e.e("components/uni-status-bar/uni-status-bar").then(function(){return resolve(e("abc6"))}.bind(null,e)).catch(e.oe)},i={name:"UniNavBar",components:{uniStatusBar:u},props:{title:{type:String,default:""},leftText:{type:String,default:""},rightText:{type:String,default:""},leftIcon:{type:String,default:""},rightIcon:{type:String,default:""},fixed:{type:[Boolean,String],default:!1},color:{type:String,default:"#fff"},backgroundColor:{type:String,default:""},statusBar:{type:[Boolean,String],default:!0},shadow:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!0}},mounted:function(){t.report&&""!==this.title&&t.report("title",this.title)},methods:{onClickLeft:function(){this.$emit("clickLeft")},onClickRight:function(){this.$emit("clickRight")}}};n.default=i}).call(this,e("543d")["default"])}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-nav-bar/uni-nav-bar-create-component',
{
'components/uni-nav-bar/uni-nav-bar-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("d2e4"))
})
},
[['components/uni-nav-bar/uni-nav-bar-create-component']]
]);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-status-bar": "/components/uni-status-bar/uni-status-bar"
}
}

View File

@@ -0,0 +1 @@
<view class="uni-navbar data-v-628b9330"><view class="{{['uni-navbar__content data-v-628b9330',(fixed)?'uni-navbar--fixed':'',(shadow)?'uni-navbar--shadow':'',(border)?'uni-navbar--border':'']}}" style="{{'background-color:'+(backgroundColor)+';'}}"><block wx:if="{{statusBar}}"><uni-status-bar vue-id="14d68f28-1" class="data-v-628b9330" bind:__l="__l"></uni-status-bar></block><view class="uni-navbar__header uni-navbar__content_view data-v-628b9330" style="{{'color:'+(color)+';'+('background-color:'+(backgroundColor)+';')}}"><view data-event-opts="{{[['tap',[['onClickLeft',['$event']]]]]}}" class="uni-navbar__header-btns uni-navbar__header-btns-left uni-navbar__content_view data-v-628b9330" bindtap="__e"><block wx:if="{{leftText.length}}"><view class="{{['uni-navbar-btn-text uni-navbar__content_view data-v-628b9330',(!leftIcon.length)?'uni-navbar-btn-icon-left':'']}}"><text style="{{'color:'+(color)+';'+('font-size:'+('14px')+';')}}" class="data-v-628b9330">{{leftText}}</text></view></block><slot name="left"></slot></view><view class="uni-navbar__header-container uni-navbar__content_view data-v-628b9330"><block wx:if="{{title.length}}"><view class="uni-navbar__header-container-inner uni-navbar__content_view data-v-628b9330"><text class="uni-nav-bar-text data-v-628b9330" style="{{'color:'+(color)+';'}}">{{title}}</text></view></block><slot></slot></view><view data-event-opts="{{[['tap',[['onClickRight',['$event']]]]]}}" class="{{['uni-navbar__header-btns uni-navbar__content_view data-v-628b9330',title.length?'uni-navbar__header-btns-right':'']}}" bindtap="__e"><block wx:if="{{rightText.length&&!rightIcon.length}}"><view class="uni-navbar-btn-text uni-navbar__content_view data-v-628b9330"><text class="uni-nav-bar-right-text data-v-628b9330">{{rightText}}</text></view></block><slot name="right"></slot></view></view></view><block wx:if="{{fixed}}"><view class="uni-navbar__placeholder data-v-628b9330"><block wx:if="{{statusBar}}"><uni-status-bar vue-id="14d68f28-2" class="data-v-628b9330" bind:__l="__l"></uni-status-bar></block><view class="uni-navbar__placeholder-view data-v-628b9330"></view></view></block></view>

View File

@@ -0,0 +1 @@
.uni-nav-bar-text.data-v-628b9330{font-size:32rpx}.uni-nav-bar-right-text.data-v-628b9330{font-size:28rpx}.uni-navbar__content.data-v-628b9330{position:relative;overflow:hidden}.uni-navbar__content_view.data-v-628b9330{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}.uni-navbar__header.data-v-628b9330{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;height:44px;line-height:44px;font-size:16px}.uni-navbar__header-btns.data-v-628b9330{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;width:120rpx;padding:0 6px;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.uni-navbar__header-btns-left.data-v-628b9330{display:-webkit-box;display:-webkit-flex;display:flex;width:150rpx;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.uni-navbar__header-btns-right.data-v-628b9330{display:-webkit-box;display:-webkit-flex;display:flex;width:150rpx;padding-right:30rpx;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.uni-navbar__header-container.data-v-628b9330{-webkit-box-flex:1;-webkit-flex:1;flex:1}.uni-navbar__header-container-inner.data-v-628b9330{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;font-size:28rpx}.uni-navbar__placeholder-view.data-v-628b9330{height:44px}.uni-navbar--fixed.data-v-628b9330{position:fixed;z-index:998}.uni-navbar--shadow.data-v-628b9330{box-shadow:0 1px 6px #ccc}.uni-navbar--border.data-v-628b9330{border-bottom-width:1rpx;border-bottom-style:solid;border-bottom-color:#e5e5e5}

Some files were not shown because too many files have changed in this diff Show More