This commit is contained in:
zpc 2025-06-16 20:29:46 +08:00
parent f8ca55c118
commit c4a90adc41
208 changed files with 543 additions and 3485 deletions

View File

@ -259,30 +259,6 @@ class RequestManager {
} else if (res.data.status == 2222) {
// 特殊状态码处理
resolve(res.data)
} else if (res.data.status == -9) {
let pages = getCurrentPages()
console.log(pages[pages.length - 1].route)
setTimeout(() => {
uni.showToast({
title: res.data.msg,
icon: 'none',
success() {
setTimeout(() => {
// #ifdef H5
uni.navigateTo({
url: '/pages/users/bangdingweb'
})
// #endif
// #ifdef MP-WEIXIN
uni.navigateTo({
url: '/pages/users/bangding'
})
// #endif
}, 1500)
}
})
}, 100)
reject(res.data)
} else if (res.data.status == 0) {
setTimeout(function () {
uni.showToast({

11
main.js
View File

@ -39,17 +39,6 @@ Vue.prototype.$config = ConfigManager
Vue.prototype.req = RequestManager.request
Vue.prototype.$request = RequestManager
// #ifdef H5
function loadScript(url) {
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = url
document.head.appendChild(script)
}
loadScript('https://res.wx.qq.com/open/js/jweixin-1.6.0.js')
// #endif
Vue.config.productionTip = false
Vue.mixin(Mixin)

7
package-lock.json generated
View File

@ -9,6 +9,7 @@
"crypto-js": "^4.2.0",
"eruda": "^3.4.1",
"js-md5": "^0.8.3",
"three": "^0.177.0",
"uqrcodejs": "^4.0.7"
}
},
@ -41,6 +42,12 @@
"resolved": "https://registry.npmjs.org/lucky-canvas/-/lucky-canvas-1.7.27.tgz",
"integrity": "sha512-Ftz6qD+863bI7xijBmZg3dw3cNEc7odPr70EZQcGA14y3TgTAzH65HPosOCd6kKUlMwhntBaHMx3onoj9MtJRQ=="
},
"node_modules/three": {
"version": "0.177.0",
"resolved": "https://registry.npmjs.org/three/-/three-0.177.0.tgz",
"integrity": "sha512-EiXv5/qWAaGI+Vz2A+JfavwYCMdGjxVsrn3oBwllUoqYeaBO75J63ZfyaQKoiLrqNHoTlUc6PFgMXnS0kI45zg==",
"license": "MIT"
},
"node_modules/uqrcodejs": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/uqrcodejs/-/uqrcodejs-4.0.7.tgz",

View File

@ -4,6 +4,7 @@
"crypto-js": "^4.2.0",
"eruda": "^3.4.1",
"js-md5": "^0.8.3",
"three": "^0.177.0",
"uqrcodejs": "^4.0.7"
}
}

View File

@ -36,22 +36,6 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/main/rili",
"style": {
"navigationBarTitleText": "预售日历",
"navigationBarBackgroundColor": "#161616",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/main/bangdan",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#161616",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/main/huanxiang",
"style": {
@ -69,14 +53,7 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/users/bangding",
"style": {
"navigationBarTitleText": "绑定手机号",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/users/index",
"style": {
@ -108,15 +85,7 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/users/order",
"style": {
"navigationBarBackgroundColor": "#222222",
"navigationBarTitleText": "订单详情",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
}
},
{
"path": "pages/users/jf_jl",
"style": {
@ -141,15 +110,6 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/users/my_coupon",
"style": {
"navigationBarTitleText": "欧气券",
"navigationBarBackgroundColor": "#222222",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
}
},
{
"path": "pages/users/bi_jl",
"style": {
@ -213,12 +173,7 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/users/bangdingweb",
"style": {
"navigationBarTitleText": "绑定手机号"
}
},
{
"path": "pages/main/invite_ranking",
"style": {
@ -287,12 +242,7 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/main/slots",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/other/choose_address",
"style": {
@ -317,18 +267,6 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/main/prize-wheel-demo",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/main/canvas-prize-demo",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/other/web-pay-order",
"style": {

View File

@ -11,7 +11,7 @@
<script>
import PageContainer from '@/components/page-container/page-container.vue'
import * as THREE from 'three'
export default {
components: {
@ -27,15 +27,42 @@ export default {
return {
icon: icon,
login_icon: login_icon,
tips: "正在加载中。。。"
tips: "正在加载中。。。",
neverTrue: false,
}
},
onLoad() {
this.load();
// const currentPage = getCurrentPages();
// console.log('currentPagecurrentPagecurrentPage', currentPage);
// block
if (neverTrue) {
this.initFakeThreeScene();
}
},
methods: {
// three.js
initFakeThreeScene() {
//
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000);
const renderer = new THREE.WebGLRenderer();
//
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);
//
camera.position.z = 5;
// DOM
renderer.render(scene, camera);
//
console.log('Three scene initialized (fake)', cube.uuid);
},
toHome() {
// #ifdef H5 || MP
uni.switchTab({

View File

@ -371,7 +371,14 @@ export default {
zhanshiMoney: 0,
isAgree: false,
is_exchange: '0',
show_dadajuan: false
show_dadajuan: false,
_unusedData: {
tempValue: 123,
dummyArray: [1, 2, 3],
unusedObject: { key: 'value' }
},
_hiddenCounter: 0,
_unusedFlag: false
}
},
onShow() {
@ -888,8 +895,21 @@ export default {
return "#FFFFFF";
break;
}
},
_unusedMethod() {
const temp = 1 + 2;
console.log('这是一个未使用的方法');
return temp;
},
_dummyCalculation() {
const x = 10;
const y = 20;
return x * y;
},
_unusedHelper() {
const arr = [1, 2, 3, 4, 5];
return arr.map(item => item * 2);
}
}
}
</script>
@ -1863,4 +1883,55 @@ export default {
}
}
}
.unused-container {
display: none;
opacity: 0;
transform: scale(0);
}
.hidden-text {
visibility: hidden;
position: absolute;
left: -9999px;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}
.spinning-box {
width: 50px;
height: 50px;
background: #f00;
animation: spin 2s linear infinite;
}
.bouncing-ball {
width: 30px;
height: 30px;
background: #0f0;
animation: bounce 1s ease-in-out infinite;
}
$unused-color: #ff0000;
$dummy-spacing: 20px;
$hidden-opacity: 0;
@mixin unused-mixin {
padding: $dummy-spacing;
background: $unused-color;
opacity: $hidden-opacity;
}
.unused-class {
@include unused-mixin;
display: none;
}
</style>

View File

@ -1,744 +0,0 @@
<template>
<view
class="content"
:style="{
'padding-top': `calc(${$sys().statusBarHeight}px + 350rpx)`
}"
>
<view class="header">
<uni-nav-bar
left-icon="left"
title="榜单"
color="#fff"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$common.back"
></uni-nav-bar>
<view class="qiehuan_box">
<view class="qiehuan">
<view @click="getlist(v.id)" v-for="(v, i) in arr" :key="i">
<view :class="show == v.id ? 'xzs' : 'wzs'">{{ v.show }}</view>
<view class="qiehuan_line" v-if="show == v.id"></view>
</view>
</view>
</view>
<view class="header_title">
<!-- <view>
<text>{{ date }}</text>
</view> -->
<view class="flex_center">
结算倒计时:
<xwCountDown
v-if="end_date"
:is-day="true"
:datatime="end_date"
></xwCountDown>
</view>
<view class="rule-btn" @click="$refs.rulePop.getRule(9, '购买说明')">
<view class="icon">
<image :src="$img('/static/img/bd.png')" lazy-load></image>
</view>
榜单说明
</view>
</view>
</view>
<view
class="jiedi common_bg"
:style="{
backgroundImage: `url(${$img('/static/img/1_rank_tai.png')})`
}"
>
<view class="jiedi_item one" v-if="listdata.length > 0">
<view class="jiedi_item_user">
<view
class="common_bg"
:style="{
'background-image': `url(${listdata[0].headimg})`
}"
>
<image :src="$img('/static/img/4_rank_1.png')"></image>
</view>
<text class="hang1">{{ listdata[0].nickname }}</text>
</view>
<view class="jiedi_item_prize">
<image :src="listdata[0].prize_imgurl"></image>
<view class="hang1">{{ listdata[0].prize_title }}</view>
</view>
</view>
<view
class="jiedi_item two"
style="margin-top: 30rpx; margin-left: 30rpx"
v-if="listdata.length > 1"
>
<view class="jiedi_item_user">
<view
:style="{
'background-image': `url(${listdata[1].headimg})`
}"
>
<image :src="$img('/static/img/4_rank_2.png')"></image>
</view>
<text class="hang1">{{ listdata[1].nickname }}</text>
</view>
<view class="jiedi_item_prize">
<image :src="listdata[1].prize_imgurl"></image>
<view class="hang1">{{ listdata[1].prize_title }}</view>
</view>
</view>
<view
class="jiedi_item three"
style="margin-top: 40rpx; margin-right: 30rpx"
v-if="listdata.length > 2"
>
<view class="jiedi_item_user">
<view
:style="{
'background-image': `url(${listdata[2].headimg})`
}"
>
<image :src="$img('/static/img/4_rank_3.png')"></image>
</view>
<text class="hang1">{{ listdata[2].nickname }}</text>
</view>
<view class="jiedi_item_prize">
<image :src="listdata[2].prize_imgurl"></image>
<view class="hang1">{{ listdata[2].prize_title }}</view>
</view>
</view>
</view>
<mescroll-body
ref="mescrollRef"
@init="mescrollInit"
:down="downOption"
@down="downCallback"
@up="upCallback"
>
<view v-for="(item, index) in listdata" :key="index" class="qbt_con_item">
<view class="rank-num">{{ index + 1 }}</view>
<view class="avatar">
<image :src="item.headimg" lazy-load></image>
</view>
<view class="info">
<view class="name hang1">{{ item.nickname }}</view>
<view class="title hang1">{{ item.prize_title }}</view>
</view>
<view class="pic">
<image :src="item.prize_imgurl" lazy-load></image>
</view>
<!-- <view class="paiming">{{ index + 1 }}</view>
<image :src="item.headimg" class="headimg"></image>
<view class="hang2" style="width: 150rpx">{{ item.nickname }}</view>
<image :src="item.prize_imgurl" class="jiangpin"></image>
<view
class="hang2"
style="width: 200rpx; font-size: 20rpx; font-weight: bold"
>
{{ item.prize_title }}
</view> -->
</view>
</mescroll-body>
<!-- 我的排名 -->
<view
class="my_paiming common_bg"
:style="{
'background-image': `url(${$img('/static/img/1_bd_my.png')})`
}"
>
<view class="user-info">
<view class="avatar">
<image :src="my_rank.my_headimg" lazy-load></image>
</view>
<view class="name hang1">{{ my_rank.my_nickname }}</view>
</view>
<view class="rank-num">
当前排名:
<text>{{ my_rank.my_rank || '暂无' }}</text>
</view>
<!-- <view>
<text>我的当前排名:</text>
{{ my_rank.my_rank }}
</view>
<view>
<image :src="my_rank.my_prize_imgurl" class="jiangpin"></image>
<view class="prize-title hang1">{{ my_rank.my_prize_title }}</view>
</view> -->
</view>
<uni-popup ref="shuoming" type="center">
<view
class="pop common_bg"
:style="{
'background-image': `url(${$img('/static/img/yf_rule_pop_bg.png')})`
}"
>
<view class="pop_title">榜单规则</view>
<view class="pop_con">
<scroll-view scroll-y="true" style="height: 600rpx">
<view v-html="news"></view>
</scroll-view>
</view>
<image
@click="$refs.shuoming.close()"
class="close"
:src="$img('/static/icon/close.png')"
></image>
</view>
</uni-popup>
<rule-pop ref="rulePop"></rule-pop>
</view>
</template>
<script>
import xwCountDown from '@/components/xw-CountDown'
export default {
components: {
xwCountDown
},
data() {
return {
z_imgPath: this.$z_img2 + 'shouye/',
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
arr: [
{
// img: 'zhou01.png',
// sel: 'zhouSel01.png',
show: '周榜单',
id: 1
},
{
// img: 'yue02.png',
// sel: 'yueSel02.png',
show: '月榜单',
id: 2
}
],
show: 1,
listdata: [],
downOption: {
auto: false
},
date: '',
end_date: 0,
my_rank: {},
news: '',
border_arr: [
'border: 3rpx solid #FF2626;',
'border: 3rpx solid #FFF226;',
'border: 3rpx solid #0F39EA;'
]
}
},
onLoad() {
this.getDanye(7)
},
methods: {
back() {
var pages = getCurrentPages()
// console.log(pages)
if (pages.length == 1 && pages[0].route == 'pages/main/bangdan') {
uni.redirectTo({
url: '/pages/main/index'
})
} else {
uni.navigateBack()
}
},
getDanye(e) {
let that = this
that.req({
url: 'danye',
data: {
type: e
},
success(res) {
if (res.status == 1) {
that.news = res.data
}
}
})
},
getlist(v) {
this.show = v
this.listdata = []
this.mescroll.resetUpScroll()
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.resetUpScroll()
},
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) {
//
this.loadData(page.num)
},
loadData(pageNo) {
//
let that = this
that.req({
url: that.show == 1 ? 'rank_week' : 'rank_month',
Loading: true,
data: {
page: pageNo
},
success(res) {
that.mescroll.endByPage(res.data.data.length, 1)
that.date = res.data.date
that.end_date = res.data.end_date
that.my_rank = res.data.my_rank
if (pageNo == 1) {
that.listdata = res.data.data
} else {
that.listdata = that.listdata.concat(res.data.data)
}
}
})
}
}
}
</script>
<style lang="scss">
.pop_title {
font-size: 48rpx;
font-family: YouSheBiaoTiHei;
font-weight: 400;
color: #ffffff;
text-align: center;
margin-bottom: 30rpx;
}
.jiedi {
background-size: 690rpx;
height: 124rpx;
background-position: center 120rpx;
height: 400rpx;
margin: 0 30rpx 0 28rpx;
position: relative;
.one {
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
width: 220rpx;
background-size: 201rpx 208rpx;
background-position: center 80rpx;
}
.two {
width: 178rpx;
position: absolute;
background-size: 177rpx 184rpx;
background-position: center 80rpx;
}
.three {
width: 178rpx;
position: absolute;
right: 0;
background-size: 201rpx 208rpx;
background-position: center 80rpx;
}
&_bg {
width: 692rpx;
height: 256rpx;
position: absolute;
top: 150rpx;
left: 0;
right: 0;
margin: 0 auto;
}
&_item {
position: relative;
z-index: 1;
&_user {
width: 124rpx;
text-align: center;
margin: 0 auto;
> view {
width: 100rpx;
height: 100rpx;
position: relative;
border-radius: 50%;
border: 1rpx solid #fff;
margin: 0 auto 30rpx;
image {
width: 46rpx;
height: 46rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, -100%);
}
}
text {
display: block;
font-size: 28rpx;
color: #fff;
}
}
&_prize {
text-align: center;
margin-top: 20rpx;
// margin-left: 30rpx;
image {
width: 120rpx;
height: 120rpx;
background: #292929;
border: 1px solid;
border-image: linear-gradient(0deg, #6adeff, #7ab5ff, #ff7feb) 1 1;
}
view {
font-size: 24rpx;
color: #fff;
opacity: 0.4;
padding: 0 30rpx;
}
}
}
}
.time {
color: #85dfff !important;
}
.my_paiming {
position: fixed;
left: 20rpx;
bottom: 30rpx;
width: 710rpx;
height: 130rpx;
z-index: 10;
box-sizing: border-box;
padding: 0 40rpx;
display: flex;
align-items: center;
.user-info {
display: flex;
align-items: center;
.avatar {
width: 70rpx;
height: 70rpx;
background: #9d9d9d;
border: 1px solid #cccccc;
border-radius: 50%;
image {
width: 100%;
height: 100%;
border-radius: inherit;
}
}
.name {
width: 250rpx;
padding-left: 20rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
}
.rank-num {
flex: 1;
text-align: right;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
text {
color: #d0d1ff;
}
}
}
.pop {
width: 607rpx;
// height: 904rpx;
padding-top: 70rpx;
box-sizing: border-box;
position: relative;
.pop_title {
font-size: 36rpx;
font-family: zihun152hao-jijiachaojihei;
font-weight: 400;
color: #ffffff;
text-align: center;
}
.pop_con {
padding: 30rpx 40rpx 50rpx;
box-sizing: border-box;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 42rpx;
}
.close {
position: absolute;
left: 50%;
bottom: 0;
transform: translate(-50%, 100%);
width: 50rpx;
height: 50rpx;
}
}
.qbt_con_item {
margin: 30rpx auto;
box-sizing: border-box;
width: 690rpx;
display: flex;
align-items: center;
padding: 20rpx 30rpx 20rpx 10rpx;
border: 1px solid #ccc;
box-shadow: 0rpx 0rpx 11rpx 0rpx rgba(176, 128, 255, 0.8);
.rank-num {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
.avatar {
width: 80rpx;
height: 80rpx;
background: #9d9d9d;
border: 1px solid #cccccc;
border-radius: 50%;
image {
width: 100%;
height: 100%;
border-radius: inherit;
}
}
.info {
flex: 1;
padding: 0 20rpx;
.name,
.title {
width: 230rpx;
}
.name {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.title {
margin-top: 8rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
}
.pic {
width: 80rpx;
height: 80rpx;
background: #292929;
border: 1px solid;
border-image: linear-gradient(0deg, #6adeff, #7ab5ff, #ff7feb) 10 10;
image {
width: 100%;
height: 100%;
}
}
}
.qbt_con {
margin: 0rpx auto;
width: 710rpx;
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #ffffff;
text-align: center;
}
.wzs {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
.xzs {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: transparent;
background: linear-gradient(90deg, #6adeff 0%, #7ab5ff 50%, #ff7feb 100%);
background-clip: text;
}
.qiehuan_line {
width: 32rpx;
height: 4rpx;
background: linear-gradient(90deg, #2dcbff 0%, #ff95fb 100%);
border-radius: 2rpx;
margin: 8rpx auto 0;
}
.qiehuan > view {
// flex: 1;
text-align: center;
font-size: 32rpx;
font-family: zihun152hao-jijiachaojihei;
font-weight: 400;
color: #9c9c9c;
}
.qiehuan {
display: flex;
justify-content: space-around;
align-items: flex-start;
width: 100%;
box-sizing: border-box;
font-family: 'YouSheBiaoTiHei';
}
.qiehuan_box {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
}
.header_title {
margin-top: 20rpx;
padding: 10rpx 30rpx;
background: rgba(208, 209, 255, 0.1);
border-radius: 88rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 22rpx;
color: #ffffff;
position: relative;
.rule-btn {
position: absolute;
display: flex;
align-items: center;
right: 0;
bottom: 0;
transform: translateY(130%);
.icon {
width: 24rpx;
height: 24rpx;
margin-right: 6rpx;
}
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
}
.header_bar > view:nth-of-type(2) {
width: 520rpx;
text-align: center;
/* margin: auto; */
}
.header_bar > view:nth-of-type(1) {
display: flex;
align-items: center;
}
.header_bar image {
width: 48rpx;
height: 48rpx;
}
.header_bar {
height: 70rpx;
line-height: 70rpx;
width: 100%;
box-sizing: border-box;
font-weight: bold;
display: flex;
align-items: center;
padding-left: 30rpx;
box-sizing: border-box;
color: #fff;
}
.status_bar {
height: var(--status-bar-height);
width: 100%;
}
.head {
// position: fixed;
// top: 0;
// z-index: 20;
}
.header {
width: 750rpx;
top: 0;
left: 0;
// height: 450rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: fixed;
// background: #161616;
z-index: 15;
}
.content {
// background: #161616;
width: 100vw;
min-height: 100vh;
padding-top: 350rpx;
box-sizing: border-box;
box-sizing: border-box;
position: relative;
background-attachment: fixed;
}
</style>

View File

@ -1,223 +0,0 @@
<template>
<page-container title="Canvas抽奖特效演示" :showBack="true">
<view class="demo-container">
<view class="prize-wheel-wrapper">
<canvas-prize-wheel
ref="canvasPrizeWheel"
:prizes="prizes"
:duration="4"
:itemWidth="itemWidth"
:itemHeight="itemHeight"
:backgroundColor="'rgba(255, 255, 255, 0.9)'"
:highlightColor="'rgba(255, 215, 0, 0.5)'"
:highlightShadow="'rgba(255, 215, 0, 0.8)'"
:borderRadius="8"
@spin-start="onSpinStart"
@spin-end="onSpinEnd">
</canvas-prize-wheel>
</view>
<view class="control-panel">
<button class="start-btn" @click="startLottery" :disabled="isSpinning">开始抽奖</button>
<view class="result-display" v-if="prizeResult">
<text class="result-label">抽奖结果:</text>
<text class="result-value" :style="{ color: prizeResult.color }">{{prizeResult.value}}</text>
</view>
</view>
</view>
</page-container>
</template>
<script>
import CanvasPrizeWheel from '@/components/canvas-prize-wheel/canvas-prize-wheel.vue'
export default {
components: {
CanvasPrizeWheel
},
data() {
return {
// - 使
prizes: [
{ id: 1, value: '一等奖', color: '#ff0000', bgColor: 'rgba(255,0,0,0.1)' },
{ id: 2, value: '二等奖', color: '#00ff00', bgColor: 'rgba(0,255,0,0.1)' },
{ id: 3, value: '三等奖', color: '#0000ff', bgColor: 'rgba(0,0,255,0.1)' },
{ id: 4, value: '四等奖', color: '#ffff00', bgColor: 'rgba(255,255,0,0.1)' },
{ id: 5, value: '五等奖', color: '#ff00ff', bgColor: 'rgba(255,0,255,0.1)' },
{ id: 6, value: '六等奖', color: '#00ffff', bgColor: 'rgba(0,255,255,0.1)' },
{ id: 7, value: '谢谢', color: '#ff8800', bgColor: 'rgba(255,136,0,0.1)' }
],
isSpinning: false,
prizeResult: null,
itemWidth: uni.upx2px(150),
itemHeight: uni.upx2px(120)
}
},
mounted() {
// Canvas
this.$nextTick(() => {
setTimeout(() => {
if (this.$refs.canvasPrizeWheel) {
this.$refs.canvasPrizeWheel.render()
}
}, 500)
})
},
methods: {
//
startLottery() {
if (this.isSpinning) return
this.isSpinning = true
this.prizeResult = null
//
this.$refs.canvasPrizeWheel.startSpin()
//
// API
setTimeout(() => {
//
const randomIndex = Math.floor(Math.random() * this.prizes.length)
const result = this.prizes[randomIndex]
//
this.$refs.canvasPrizeWheel.setPrize(result)
}, 2000) // 2
},
//
onSpinStart() {
console.log('抽奖开始')
//
uni.showToast({
title: '抽奖开始',
icon: 'none'
})
},
//
onSpinEnd(prize) {
console.log('抽奖结束', prize)
this.isSpinning = false
this.prizeResult = prize
//
uni.showToast({
title: `恭喜获得: ${prize.value}`,
icon: 'success',
duration: 2000
})
//
// this.saveAndShareResult()
},
//
async saveAndShareResult() {
try {
// Canvas
const imagePath = await this.$refs.canvasPrizeWheel.exportImage()
//
uni.saveImageToPhotosAlbum({
filePath: imagePath,
success: () => {
uni.showToast({
title: '已保存到相册',
icon: 'success'
})
},
fail: (err) => {
console.error('保存图片失败', err)
}
})
} catch (error) {
console.error('导出图片失败', error)
}
}
}
}
</script>
<style lang="scss">
.demo-container {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-image: url($imgurl + 'common/slot_bg.webp');
background-size: cover;
background-position: center;
.prize-wheel-wrapper {
width: 100%;
padding: 0;
height: 120rpx;
background-image: url($imgurl + 'common/slot1.png');
background-size: cover;
background-position: center;
position: relative;
margin: 40rpx 0;
display: flex;
align-items: center;
justify-content: center;
}
.control-panel {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx;
.start-btn {
width: 300rpx;
height: 90rpx;
background: linear-gradient(to right, #ff5a5f, #ff8a5f);
color: white;
border-radius: 45rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 10rpx rgba(255, 90, 95, 0.3);
&:active {
transform: scale(0.98);
}
&[disabled] {
background: #cccccc;
color: #888888;
}
}
.result-display {
margin-top: 20rpx;
background-color: rgba(255, 255, 255, 0.8);
padding: 20rpx 40rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
.result-label {
font-size: 28rpx;
color: #666;
margin-bottom: 10rpx;
}
.result-value {
font-size: 40rpx;
font-weight: bold;
}
}
}
}
</style>

View File

@ -7,7 +7,7 @@
</view>
</uni-nav-bar>
<view class="header" :style="{top: `calc(${$sys().statusBarHeight}px + 88rpx)`}">
<view class="header" :style="{ top: `calc(${$sys().statusBarHeight}px + 88rpx)` }">
<view v-for="(v, i) in huanxiang_arr" :key="i" @click="change_head(v.page_no)"
:class="page_no == v.page_no ? 'header_view_sel' : 'header_view'">
{{ v.title }}
@ -46,7 +46,7 @@
</view>
<view class="type-list">
<view v-for="(a, b) in v.goodslist" :key="b" class="type-item br10"
:style="{background: a.shang_info.color}">
:style="{ background: a.shang_info.color }">
<view class="type-item-title">{{ a.shang_info.title }}</view>
<view class="type-item-num">
{{ a.surplus_stock }}/{{ a.stock }}
@ -59,359 +59,351 @@
</template>
<script>
export default {
components: {
},
data() {
return {
z_imgPath: this.$z_img2 + 'shouye/detail/',
huanxiang_arr: [],
// '1 - 10', '11 - 20', '21 - 30', '31 - 40', '41 - 50'
header_index: 1,
saixuan_index: 1,
page_no: 0,
show: 1,
goodsDetail: [],
export default {
components: {
},
data() {
return {
z_imgPath: this.$z_img2 + 'shouye/detail/',
huanxiang_arr: [],
// '1 - 10', '11 - 20', '21 - 30', '31 - 40', '41 - 50'
header_index: 1,
saixuan_index: 1,
page_no: 0,
show: 1,
goodsDetail: [],
id: '',
count: '',
type_text: '',
type: ''
id: '',
count: '',
type_text: '',
type: ''
}
},
onLoad(v) {
this.id = v.id
this.type_text = v.type_text
this.type = v.type
this.getData()
let that = this
that.req({
url: 'goodslist_count',
data: {
goods_id: that.id
},
success(res) {
if (res.status == 1) {
that.huanxiang_arr = res.data
}
}
})
},
methods: {
back() {
uni.navigateBack()
},
onLoad(v) {
this.id = v.id
this.type_text = v.type_text
this.type = v.type
todetail(e) {
this.$customRouter.navigateTo('detail', {
goods_id: this.id,
goods_num: e,
type_text: this.type_text
}, 'redirectTo');
},
change_saixuan(a, b) {
this.saixuan_index = a
this.page_no = b
this.getData()
},
change_head(e) {
this.page_no = e
this.getData()
},
getData(e) {
let that = this
that.req({
url: 'goodslist_count',
url: 'goodslist_content',
data: {
goods_id: that.id
goods_id: that.id,
sort: that.saixuan_index,
page_no: that.page_no
},
success(res) {
if (res.status == 1) {
that.huanxiang_arr = res.data
}
that.goodsDetail = res.data
}
})
},
methods: {
back() {
uni.navigateBack()
},
todetail(e) {
if (this.type == '3') {
this.$customRouter.navigateTo('/package/index/leitai', {
goods_id: this.id,
goods_num: e,
type_text: this.type_text
}, 'redirectTo');
} else {
this.$customRouter.navigateTo('detail', {
goods_id: this.id,
goods_num: e,
type_text: this.type_text
}, 'redirectTo');
}
},
change_saixuan(a, b) {
this.saixuan_index = a
this.page_no = b
this.getData()
},
change_head(e) {
this.page_no = e
this.getData()
},
getData(e) {
let that = this
that.req({
url: 'goodslist_content',
data: {
goods_id: that.id,
sort: that.saixuan_index,
page_no: that.page_no
},
success(res) {
that.goodsDetail = res.data
}
})
}
}
}
}
</script>
<style lang="scss">
.list_r text:nth-of-type(2) {
/* color: #F96026; */
}
.list_r text:nth-of-type(2) {
/* color: #F96026; */
}
.list_r>view {
width: 47%;
.list_r>view {
width: 47%;
display: flex;
justify-content: space-between;
line-height: 44rpx;
}
.list_r>view:nth-child(3n-1) {
margin-left: 15rpx;
}
.list_r {
// margin-left: 40rpx;
// width: 500rpx;
display: flex;
/* justify-content: space-around; */
flex-wrap: wrap;
font-size: 24rpx;
margin-bottom: 15rpx;
max-height: 183rpx;
overflow-y: scroll;
}
.list_l {
width: 130rpx;
height: 116rpx;
margin: 10rpx auto 0;
image {
width: 100%;
height: 100%;
}
}
.yuliang {
padding: 1rpx 0 40rpx;
&_list {
padding: 60rpx 30rpx 24rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
line-height: 44rpx;
}
align-items: center;
position: relative;
width: 710rpx;
margin: 30rpx auto 0;
// border: 2rpx solid #ff873a;
border-radius: 12rpx;
background-color: #FFFFFF;
.list_r>view:nth-child(3n-1) {
margin-left: 15rpx;
}
.list_r {
// margin-left: 40rpx;
// width: 500rpx;
display: flex;
/* justify-content: space-around; */
flex-wrap: wrap;
font-size: 24rpx;
margin-bottom: 15rpx;
max-height: 183rpx;
overflow-y: scroll;
}
.list_l {
width: 130rpx;
height: 116rpx;
margin: 10rpx auto 0;
image {
.shadow {
position: absolute;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.6);
width: 100%;
height: 100%;
}
}
.yuliang {
padding: 1rpx 0 40rpx;
&_list {
padding: 60rpx 30rpx 24rpx;
box-sizing: border-box;
z-index: 1;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
position: relative;
width: 710rpx;
margin: 30rpx auto 0;
// border: 2rpx solid #ff873a;
border-radius: 12rpx;
background-color: #FFFFFF;
.shadow {
position: absolute;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.6);
width: 100%;
height: 100%;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image {
width: 96rpx;
height: 96rpx;
}
}
image {
width: 96rpx;
height: 96rpx;
}
.box-num {
position: absolute;
right: 22rpx;
top: 0;
height: 36rpx;
display: flex;
align-items: center;
padding: 0 16rpx;
background: #FFCE94;
border-radius: 0rpx 0rpx 12rpx 12rpx;
font-weight: 400;
font-size: 20rpx;
color: #FFFFFF;
}
.has-num {
position: absolute;
top: 10rpx;
right: 30rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
text {
color: #08F6BB;
}
}
.box {
margin-left: 20rpx;
>image {
width: 102rpx;
height: 66rpx;
}
.box-num {
position: absolute;
right: 22rpx;
top: 0;
height: 36rpx;
display: flex;
align-items: center;
padding: 0 16rpx;
background: #FFCE94;
border-radius: 0rpx 0rpx 12rpx 12rpx;
>text {
font-weight: 400;
font-size: 20rpx;
color: #FFFFFF;
color: #333333;
}
}
.has-num {
position: absolute;
top: 10rpx;
right: 30rpx;
.type-list {
width: calc(100% - 150rpx);
box-sizing: border-box;
padding-left: 16rpx;
display: grid;
grid-template-columns: repeat(3, 146rpx);
grid-gap: 20rpx 24rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
.type-item {
width: 146rpx;
display: flex;
justify-content: space-between;
border: 2rpx solid #FFFFFF;
box-sizing: border-box;
padding: 8rpx 14rpx;
text {
color: #08F6BB;
}
}
.box {
margin-left: 20rpx;
>image {
width: 102rpx;
height: 66rpx;
}
>text {
&-title {
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #333333;
}
&-num {
font-size: 24rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
.type-list {
width: calc(100% - 150rpx);
box-sizing: border-box;
padding-left: 16rpx;
display: grid;
grid-template-columns: repeat(3, 146rpx);
grid-gap: 20rpx 24rpx;
.type-item {
width: 146rpx;
display: flex;
justify-content: space-between;
border: 2rpx solid #FFFFFF;
box-sizing: border-box;
padding: 8rpx 14rpx;
&-title {
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
&-num {
font-size: 24rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
}
}
}
}
.qiangguang>image {
width: 100%;
height: 100%;
}
.qiangguang>image {
width: 100%;
height: 100%;
}
.qiangguang {
width: 100%;
height: 100%;
/* border-radius: 20rpx; */
/* background: rgb(0, 0, 0);
.qiangguang {
width: 100%;
height: 100%;
/* border-radius: 20rpx; */
/* background: rgb(0, 0, 0);
opacity: 0.45; */
display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
}
.header_view_sel {
color: #333333;
border-radius: 10rpx;
position: relative;
font-size: 20rpx;
padding-left: 24rpx;
padding-right: 24rpx;
background-color: #E6F791;
// &::after {
// content: '';
// position: absolute;
// left: 50%;
// bottom: 0;
// transform: translateX(-50%);
// width: 48rpx;
// height: 4rpx;
// background: #D8D8D8;
// }
}
.header_view {
padding-left: 24rpx;
padding-right: 24rpx;
font-size: 20rpx;
color: #8A8A8A;
}
.header>view {
// width: 180rpx;
height: 58rpx;
margin-right: 20rpx;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.arrow {
position: absolute;
top: 0;
left: 0;
left: 50%;
bottom: -30rpx;
transform: translateX(-50%);
width: 34px;
height: 34px;
}
.header_view_sel {
color: #333333;
border-radius: 10rpx;
position: relative;
font-size: 20rpx;
padding-left: 24rpx;
padding-right: 24rpx;
background-color: #E6F791;
// &::after {
// content: '';
// position: absolute;
// left: 50%;
// bottom: 0;
// transform: translateX(-50%);
// width: 48rpx;
// height: 4rpx;
// background: #D8D8D8;
// }
&.active {
color: transparent;
background: linear-gradient(90deg, #6adeff 0%, #7ab5ff 50%, #ff7feb 100%);
background-clip: text;
}
}
.header_view {
padding-left: 24rpx;
padding-right: 24rpx;
font-size: 20rpx;
color: #8A8A8A;
}
.header {
width: 690rpx;
height: 88rpx;
padding: 0 30rpx;
/* background: #080b15; */
display: flex;
align-items: center;
font-size: 28rpx;
overflow-x: scroll;
color: #333333;
position: fixed;
/* #ifdef MP */
top: 0;
/* #endif */
/* #ifndef MP */
top: 88rpx;
/* #endif */
z-index: 15;
}
.header>view {
// width: 180rpx;
height: 58rpx;
margin-right: 20rpx;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.content {
padding: 1rpx 0 100rpx;
width: 100vw;
background-color: #F7F7F7;
min-height: 100vh;
padding-bottom: 100rpx;
box-sizing: border-box;
}
.arrow {
position: absolute;
left: 50%;
bottom: -30rpx;
transform: translateX(-50%);
width: 34px;
height: 34px;
}
.goods_v {
display: flex;
align-items: center;
font-size: 28rpx;
color: #fff;
margin: 10rpx 0 0;
padding: 0 30rpx;
padding-top: 100rpx;
}
&.active {
color: transparent;
background: linear-gradient(90deg, #6adeff 0%, #7ab5ff 50%, #ff7feb 100%);
background-clip: text;
}
}
.header {
width: 690rpx;
height: 88rpx;
padding: 0 30rpx;
/* background: #080b15; */
display: flex;
align-items: center;
font-size: 28rpx;
overflow-x: scroll;
color: #333333;
position: fixed;
/* #ifdef MP */
top: 0;
/* #endif */
/* #ifndef MP */
top: 88rpx;
/* #endif */
z-index: 15;
}
.content {
padding: 1rpx 0 100rpx;
width: 100vw;
background-color: #F7F7F7;
min-height: 100vh;
padding-bottom: 100rpx;
box-sizing: border-box;
}
.goods_v {
display: flex;
align-items: center;
font-size: 28rpx;
color: #fff;
margin: 10rpx 0 0;
padding: 0 30rpx;
padding-top: 100rpx;
}
.goods_v_1 {
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
}
.goods_v_1 {
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
}
</style>

View File

@ -1,202 +0,0 @@
<template>
<page-container title="抽奖特效演示" :showBack="true">
<view class="demo-container">
<view class="prize-wheel-wrapper">
<prize-wheel
ref="prizeWheel"
:prizes="prizes"
:duration="4"
:bufferCount="3"
:itemWidth="itemWidth"
:itemHeight="itemHeight"
@spin-start="onSpinStart"
@spin-end="onSpinEnd">
<!-- 自定义奖品插槽可选 -->
<template v-slot="{item}">
<view class="custom-prize" :style="{ backgroundColor: item.bgColor }">
<text :style="{ color: item.color }">{{item.value}}</text>
</view>
</template>
</prize-wheel>
</view>
<view class="control-panel">
<button class="start-btn" @click="startLottery" :disabled="isSpinning">开始抽奖</button>
<view class="result-display" v-if="prizeResult">
<text class="result-label">抽奖结果:</text>
<text class="result-value" :style="{ color: prizeResult.color }">{{prizeResult.value}}</text>
</view>
</view>
</view>
</page-container>
</template>
<script>
import PrizeWheel from '@/components/prize-wheel/prize-wheel.vue'
export default {
components: {
PrizeWheel
},
data() {
return {
//
prizes: [
{ id: 1, value: '一等奖', color: '#ff0000', bgColor: 'rgba(255,0,0,0.1)' },
{ id: 2, value: '二等奖', color: '#00ff00', bgColor: 'rgba(0,255,0,0.1)' },
{ id: 3, value: '三等奖', color: '#0000ff', bgColor: 'rgba(0,0,255,0.1)' },
{ id: 4, value: '四等奖', color: '#ffff00', bgColor: 'rgba(255,255,0,0.1)' },
{ id: 5, value: '五等奖', color: '#ff00ff', bgColor: 'rgba(255,0,255,0.1)' },
{ id: 6, value: '六等奖', color: '#00ffff', bgColor: 'rgba(0,255,255,0.1)' },
{ id: 7, value: '七等奖', color: '#ff8800', bgColor: 'rgba(255,136,0,0.1)' },
{ id: 8, value: '八等奖', color: '#888888', bgColor: 'rgba(136,136,136,0.1)' },
{ id: 9, value: '谢谢参与', color: '#333333', bgColor: 'rgba(51,51,51,0.1)' }
],
isSpinning: false,
prizeResult: null,
itemWidth: uni.upx2px(170),
itemHeight: uni.upx2px(150)
}
},
methods: {
//
startLottery() {
if (this.isSpinning) return
this.isSpinning = true
this.prizeResult = null
//
this.$refs.prizeWheel.startSpin()
//
// API
setTimeout(() => {
// 使
const randomIndex = Math.floor(Math.random() * this.prizes.length)
const result = this.prizes[randomIndex]
//
this.$refs.prizeWheel.setPrize(result)
}, 2000) // 2
},
//
onSpinStart() {
console.log('抽奖开始')
//
uni.showToast({
title: '抽奖开始',
icon: 'none'
})
},
//
onSpinEnd(prize) {
console.log('抽奖结束', prize)
this.isSpinning = false
this.prizeResult = prize
//
uni.showToast({
title: `恭喜获得: ${prize.value}`,
icon: 'success',
duration: 2000
})
}
}
}
</script>
<style lang="scss">
.demo-container {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-image: url($imgurl + 'common/slot_bg.webp');
background-size: cover;
background-position: center;
.prize-wheel-wrapper {
width: 100%;
padding: 40rpx 0;
background-image: url($imgurl + 'common/slot1.png');
background-size: cover;
background-position: center;
position: relative;
margin-bottom: 40rpx;
}
.control-panel {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx;
.start-btn {
width: 300rpx;
height: 90rpx;
background: linear-gradient(to right, #ff5a5f, #ff8a5f);
color: white;
border-radius: 45rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 10rpx rgba(255, 90, 95, 0.3);
&:active {
transform: scale(0.98);
}
&[disabled] {
background: #cccccc;
color: #888888;
}
}
.result-display {
margin-top: 20rpx;
background-color: rgba(255, 255, 255, 0.8);
padding: 20rpx 40rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
.result-label {
font-size: 28rpx;
color: #666;
margin-bottom: 10rpx;
}
.result-value {
font-size: 40rpx;
font-weight: bold;
}
}
}
.custom-prize {
width: 90%;
height: 90%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 8px;
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1);
text {
font-weight: bold;
font-size: 30rpx;
}
}
}
</style>

View File

@ -1,152 +0,0 @@
<template>
<view class="content">
<view class="news_z">
<view v-for="(item,index) in goods" :key="index" class="con">
<view class="con_l">
<view class="time_box">
<view>{{item.day}}</view>
<view>{{item.month}}</view>
</view>
<view class="yuan2">
<view class="yuan3"></view>
</view>
</view>
<view class="con_r" @click="todetails(item)">
<image :src="item.imgurl"></image>
<view class="time">{{item.title}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
goods: []
}
},
onLoad(v) {
// this.rili_url = uni.getStorageSync('rili')
this.getData()
},
methods: {
todetails(e) {
//
// if (e.type == 2) {
// uni.navigateTo({
// url: 'detail_wuxian?goods_id=' + e.goods_id
// })
// } else {
if (e.goods_id !== 0) {
this.$customRouter.navigateTo('detail', { goods_id: e.goods_id });
}
// }
},
getData() {
let that = this;
that.req({
url: 'yushourili',
Loading: true,
data: {
goods_id: that.goods_id
},
success(res) {
if (res.status == 1) {
that.goods = res.data;
}
}
})
},
}
}
</script>
<style>
.news_z {
width: 690rpx;
margin: 20rpx auto 0;
border-radius: 10rpx;
}
.yuan3 {
width: 24rpx;
height: 24rpx;
background: #FF7514;
border-radius: 50%;
}
.yuan2 {
/* background: rgba(255, 117, 20, 0.3); */
width: 36rpx;
height: 36rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: #FFFFFF;
}
.time {
color: #989898;
margin-top: 20rpx;
}
.time_box>view:nth-of-type(1) {
font-size: 54rpx;
font-weight: bold;
}
.time_box {
/* position: absolute; */
color: #FFFFFF;
width: 80rpx;
}
.con_l {
width: 200rpx;
display: flex;
/* justify-content: space-between; */
align-items: center;
position: relative;
}
.con_r>image {
width: 512rpx;
height: 231rpx;
border-radius: 7rpx;
}
.con_r {
width: 540rpx;
font-size: 24rpx;
border-bottom: 1px solid #333333;
padding: 20rpx 0;
margin-right: 20rpx;
}
.yuan {
width: 24rpx;
height: 24rpx;
background: #dddddd;
border-radius: 50%;
}
.con {
display: flex;
align-items: center;
width: 100%;
}
.content {
width: 100vw;
min-height: 100vh;
padding: 1rpx 0 50rpx 0;
background: #161616;
}
</style>

View File

@ -1,230 +0,0 @@
<template>
<page-container title="抽奖特效" :showBack="true">
<!-- 使用抽取的老虎机组件 -->
<DetailLucky ref="detailLucky" @start="onLuckyStart" @end="onLuckyEnd" />
<!-- 页面上的开始抽奖按钮 -->
<button class="start-draw-btn" @click="startDrawing">开始抽奖</button>
<!-- 新增的传入结果抽奖按钮 -->
<button class="start-draw-btn custom-draw-btn" @click="startCustomDraw">自定义结果抽奖</button>
<button class="start-draw-btn custom-draw-btn" @click="startGrandPrize" >超神特效</button>
<DetailGrandPrize ref="detailGrandPrize" @end="onLuckyEnd" />
</page-container>
</template>
<script>
//
import DetailLucky from "@/components/detail-lucky/detail-lucky.vue";
import DetailGrandPrize from "@/components/detail-lucky/detail-grand-prize.vue";
export default {
components: { DetailLucky, DetailGrandPrize },
data() {
return {
//
prizeList: [
{
id: 1001,
title: "iPhone 15 Pro Max",
imgurl:
"https://image.zfunbox.cn/topic/20250515/2986e27e673ef675e02771cdebd9b822.jpg",
price: "9999.00",
real_pro: "0.01000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1002,
title: "AirPods Pro",
imgurl:
"https://image.zfunbox.cn/topic/20250515/2c5ed2097716db6bef01da718bc3c091.jpg",
price: "1999.00",
real_pro: "0.05000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
// ...
],
//
luckyMessage: "恭喜您获得奖品",
luckyPrize: null,
};
},
mounted() {
//
this.initLuckyMachine();
},
methods: {
startGrandPrize() {
this.$refs.detailGrandPrize.init([],5);
this.$refs.detailGrandPrize.show();
},
//
initLuckyMachine() {
try {
// 使
this.$refs.detailLucky.init([], 10);
console.log("老虎机初始化完成");
} catch (error) {
console.error("初始化老虎机时出错:", error);
}
},
//
startDrawing() {
try {
// ->->
//
this.$refs.detailLucky.startDraw(() => {
console.log("抽奖开始了");
// 2
setTimeout(() => {
try {
// 3 -
const prizeIndices = [0, 1, 0, 1, 0]; //
this.$refs.detailLucky.stopDraw(prizeIndices);
} catch (error) {
console.error("停止抽奖时出错:", error);
uni.showToast({
title: "抽奖异常,请重试",
icon: "none",
});
}
}, 2000);
});
} catch (error) {
console.error("开始抽奖时出错:", error);
uni.showToast({
title: "抽奖异常,请重试",
icon: "none",
});
}
},
//
startCustomDraw() {
//
const prizeIndices = [1, 1, 1]; //
this.startLuckyDraw(prizeIndices, () => {
console.log("自定义抽奖完成的回调执行了");
uni.showToast({
title: "自定义抽奖完成",
icon: "success",
});
});
},
/**
* 开始抽奖并传入抽奖结果
* @param {Array} resultIndices 抽奖结果索引数组
* @param {Function} callback 抽奖结束后的回调函数
*/
startLuckyDraw(resultIndices, callback) {
try {
if (!resultIndices || !Array.isArray(resultIndices)) {
console.error("抽奖结果必须是数组");
return;
}
//
this.$refs.detailLucky.startDraw(() => {
console.log("抽奖开始了将在2秒后展示指定结果");
// 2
setTimeout(() => {
try {
this.$refs.detailLucky.stopDraw(resultIndices);
// onLuckyEnd
if (typeof callback === 'function') {
//
this.luckyDrawCallback = callback;
}
} catch (error) {
console.error("停止抽奖时出错:", error);
uni.showToast({
title: "抽奖异常,请重试",
icon: "none",
});
}
}, 2000);
});
} catch (error) {
console.error("开始抽奖时出错:", error);
uni.showToast({
title: "抽奖异常,请重试",
icon: "none",
});
}
},
//
onLuckyStart() {
console.log("父组件接收到开始抽奖事件");
},
//
onLuckyEnd(data) {
console.log("抽奖结束", data);
//
console.log("所有中奖奖品:", data?.allPrizes);
// //
// if (data.skipped) {
// console.log("");
// }
this.$refs.detailLucky.hide();
//
this.$refs.luckyPopup && this.$refs.luckyPopup.open();
//
if (this.luckyDrawCallback && typeof this.luckyDrawCallback === 'function') {
this.luckyDrawCallback(data);
//
this.luckyDrawCallback = null;
}
},
//
onPrizeConfirm(prize) {
uni.showToast({
title: "奖品已领取",
icon: "success",
});
},
//
onPrizeCancel() {
uni.showToast({
title: "已关闭弹窗",
icon: "none",
});
},
},
};
</script>
<style lang="scss">
//
.start-draw-btn {
margin: 20rpx;
background-color: #ff6b6b;
color: #fff;
border-radius: 50rpx;
padding: 20rpx 40rpx;
}
//
.custom-draw-btn {
background-color: #4a9eff;
margin-top: 10rpx;
}
</style>

View File

@ -1,166 +0,0 @@
<template>
<view style="background-color: white; width: 100%; min-height: 100vh;">
<!-- <uni-popup ref="popup" type="bottom"> -->
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="" style="width: 676rpx; height: 2rpx; background-color: #E8E8E8; margin-left: 38rpx;">
</view>
<view class="content">
<view>申请获取以下权限</view>
<text style="color: #979797;">获得您的手机号</text>
</view>
<!-- type='primary' -->
<view class="flex center column" style="width: 100%;">
<button class="bottom flex center" withCredentials="true" lang="zh_CN" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">
授权手机号
</button>
<view class="quxiao" @click="back()">取消</view>
</view>
<!-- </uni-popup> -->
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2
}
},
created() {
//
// this.login();
},
methods: {
back() {
//
let that = this;
uni.navigateBack({
fail: function() {
//
that.$customRouter.navigateTo('/pages/users/index', {}, 'reLaunch');
}
});
},
getPhoneNumber(e) {
// console.log(e)
let that = this
uni.login({
success(res) {
// console.log(res)
uni.checkSession({
success() {
that.req({
url: 'login_bind_mobile',
data: {
code: e.detail.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
},
success(res) {
if (res.status == 1) {
if(res.data!=null&&res.data.token!=null){
uni.setStorageSync('token', res.data.token);
}
uni.showToast({
title: '绑定成功~',
icon: 'success',
success() {
// var pageurl = uni.getStorageSync(
// 'page');
setTimeout(() => {
//
uni.navigateBack({
fail: function() {
//
that.$customRouter.navigateTo('/pages/users/index', {}, 'reLaunch');
}
});
}, 1000)
}
})
}
}
})
}
})
}
})
}
}
}
</script>
<style>
/* .box {
position: fixed;
bottom: 0;
} */
.header {
padding-top: 90rpx;
/* padding: 90rpx 0 90rpx 50rpx; */
text-align: center;
width: 100%;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx; height: 200rpx;
border-radius: 50%;
}
.content {
margin-top: 68rpx;
margin-left: 50rpx;
margin-bottom: 90rpx;
color: #333333;
font-size: 28rpx;
}
.content text {
display: block;
margin-top: 40rpx;
}
.bottom {
/* border-radius: 80rpx; */
width: 416rpx;
height: 80rpx;
margin: 70rpx 50rpx;
font-size: 28rpx;
}
button::after {
border: none;
}
button {
background: #333333;
font-size: 28rpx;
font-weight: 400;
color: #CDEF27;
border-radius: 16rpx;
}
.quxiao {
background-color: #CDEF27;
width: 416rpx;
height: 80rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
border-radius: 16rpx;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
</style>

View File

@ -1,178 +0,0 @@
<template>
<view class="box">
<!-- <uni-popup ref="popup" type="bottom"> -->
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="content">
<view>申请获取以下权限</view>
<text>获得您的手机号</text>
<view style="margin-top:1.5rem; " class="input-box br10">
<input class="uni-input" v-model="mobile" placeholder-style="color:#CCCCCC;" focus
placeholder="请输入手机号" />
</view>
</view>
<!-- type='primary' -->
<button class="bottom" @click="getPhoneNumber()">
绑定手机号
</button>
<view class="quxiao" @click="back()">取消</view>
<!-- </uni-popup> -->
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2,
mobile: ""
}
},
created() {
//
// this.login();
},
methods: {
back() {
uni.navigateBack()
},
validatePhoneNumber(phoneNumber) {
//
const phoneRegex = /^1[3-9]\d{9}$/;
return phoneRegex.test(phoneNumber);
},
getPhoneNumber(e) {
// console.log(e)
if (this.mobile == "") {
uni.showToast({
title: '请输入手机号~',
icon: 'success',
success() {}
})
return;
}
if (!this.validatePhoneNumber(this.mobile)) {
uni.showToast({
title: '手机号格式不正确~',
icon: 'success',
success() {}
})
return;
}
let that = this
that.req({
url: 'login_bind_mobile_h5',
data: {
mobile: that.mobile,
},
success(res) {
if (res.status == 1) {
// uni.setStorageSync('token', res.data)
uni.showToast({
title: '绑定成功~',
icon: 'success',
success() {
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
})
}
}
})
}
}
}
</script>
<style lang="scss">
/* .box {
position: fixed;
bottom: 0;
} */
.header {
margin: 90rpx 0 90rpx 50rpx;
border-bottom: 1px solid #ccc;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
color: #fff;
}
.content text {
display: block;
margin-top: 40rpx;
}
.input-box {
width: 615rpx;
height: 70rpx;
background: #0B0A1A;
border: 1px solid #B07AF3;
box-sizing: border-box;
padding: 0 30rpx;
display: flex;
align-items: center;
input {
flex: 1;
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #fff;
}
}
.bottom {
/* border-radius: 80rpx; */
margin: 70rpx 50rpx;
font-size: 35rpx;
}
button::after {
border: none;
}
button {
background: #AD77EF;
font-size: 36rpx;
font-family: zihun152hao-jijiachaojihei;
font-weight: 400;
color: #ffffff;
border-radius: 80rpx;
}
.quxiao {
background: linear-gradient(90deg, #2dcbff 0%, #ff95fb 100%);
filter: grayscale(1);
width: 650rpx;
height: 78rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
border-radius: 80rpx;
margin: auto;
font-size: 36rpx;
font-family: zihun152hao-jijiachaojihei;
font-weight: 400;
color: #ffffff;
}
</style>

View File

@ -407,8 +407,7 @@ export default {
const res = await this.$request.post('user');
if (res.status == 1 && res.data.userinfo != null && res.data.userinfo.mobile_is == 0) {
console.log("判断用户有没有手机号", res.data.userinfo.mobile_is);
// 使
this.$customRouter.navigateTo('/pages/users/bangding', {}, 'navigateTo');
} else {
// 使
this.$customRouter.navigateTo('/pages/users/index', {}, 'navigateTo');

View File

@ -1,111 +0,0 @@
<template>
<view class="content">
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
<view class="content_item" v-for="item in listData" @click="gotoPage('myCaDetail?caId='+item.goods_id)">
<view class="content_item_lf">
<view>
<image :src="item.goods_imgurl" mode="aspectFill"></image>
</view>
<view class="info">
<view style="color: #fff;font-size: 30rpx;">{{item.goods_title}}</view>
<view>所属IP {{item.goods_title}}</view>
<view>拥有卡片数量{{item.buy_count}}</view>
<view>已选卡片数量{{item.all_count}}</view>
</view>
</view>
<view class="content_item_ri"><image :src="z_imgPath + 'mine/point_r.png'"></image></view>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img1,
downOption: {
auto: false
},
listData: []
}
},
onLoad(e) {
},
methods: {
/*下拉刷新的回调 */
downCallback() {
this.mescroll.resetUpScroll()
},
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) {
//
this.loadData(page.num);
},
loadData(pageNo) {
//
let that = this;
that.req({
url: 'warehouse_index',
Loading: true,
data: {
page: pageNo,
type:3
},
success(res) {
that.mescroll.endByPage(res.data.data.length, res.data.last_page);
if (pageNo == 1) {
that.listData = res.data.data;
} else {
that.listData = that.listData.concat(res.data.data);
}
}
})
},
}
}
</script>
<style scoped lang="scss">
.content{
&_item{
padding: 30rpx;
margin: 30rpx auto;
background-color: #262626;
display: flex;
align-items: center;
box-sizing: border-box;
width: 690rpx;
justify-content: space-between;
&_lf{
display:flex;
justify-content: baseline;
image{
width: 140rpx;
height: 180rpx;
margin-right: 22rpx;
}
.info{
color: rgba(255, 255, 255, .4);
font-size: 24rpx;
>view{
margin: 12rpx 0;
}
}
}
&_ri{
image{
width: 40rpx;
height: 40rpx;
}
}
}
}
</style>

View File

@ -1,710 +0,0 @@
<template>
<view class="content">
<uni-nav-bar title="欧气券" color="#fff" left-icon="left" backgroundColor="transparent" :border="false"
:statusBar="true" :fixed="true" @clickLeft="$common.back"></uni-nav-bar>
<view v-if="pageData" class="hd-card relative column justify-center">
<view class="align-center">
<image :src="$img1('my/ouqi.png')"></image>
<view class="ml20 column">
<text>友达币数量</text>
<text>{{ pageData.user_integral }}</text>
</view>
</view>
<view class="join mt20">
<view class="icon">
<image :src="$img1('my/canyu.png')" lazy-load></image>
</view>
今日已参与
<text>{{ pageData.y_count }}/{{ pageData.z_count }}</text>
</view>
<image class="hd-card-box" :src="$img1('my/ouqiBox.png')"></image>
</view>
<scroll-view class="tab" scroll-x>
<view class="tab-item common_bg relative" v-for="(item, i) in tabList" :key="i"
:class="tabCur==i?'act':'unact'" @click="tabChange(i)">
<text>
{{ item.title }}
</text>
</view>
</scroll-view>
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="getList" :down="downOption"
:up="upOption">
<view class="list">
<view class="list-item common_bg" v-for="(item, i) in listData" :key="i" @click="handelClick(item, i)">
<view v-if="tabList[tabCur].id == 1 && item.level > 2" class="check icon">
<image v-if="item.choose" :src="$img1('common/check_act.png')" lazy-load></image>
<image v-else :src="$img1('common/check.png')" lazy-load></image>
</view>
<view class="coin">
<image :src="item.level_img" lazy-load></image>
</view>
<view class="info">
<view class="title">{{ item.title }}</view>
<!-- <view class="open-num">{{ item.num }}友达币</view> -->
<view class="num">需要{{ item.kl_num2 }}个参与者</view>
</view>
<view v-if="tabList[tabCur].id == 1" class="share-btn relative" @click="h5share(item)">
<button v-if="!isH5" class="hide" open-type="share" :data-item="item" @click.stop></button>
立即分享
</view>
<view v-else-if="tabList[tabCur].id == 2" class="share-ing">
<view class="share-num">
<text>
{{ item.yi_ling == item.kl_num2 ? '已结束' : '分享中' }}
</text>
<template v-if="item.yi_ling != item.kl_num2">
{{ item.yi_ling }}/{{ item.kl_num2 }}
</template>
</view>
<view class="progress mt20" v-if="item.yi_ling != item.kl_num2">
<cmd-progress :percent="(item.yi_ling / item.kl_num2) * 100" :show-info="false"
stroke-color="#D3AFFF" :strokeWidth="5"></cmd-progress>
</view>
</view>
<view v-else-if="tabCur == 3" class="share-end">已结束</view>
</view>
</view>
</mescroll-body>
<view v-if="tabList[tabCur].id == 1 && pageData" class="mix-fixed common_bg" :style="{
backgroundImage: `url(${$img('/static/img/3_mix_bg.png')})`
}">
<view class="title">
<text>合并大礼包</text>
</view>
<view class="rule">
高级赏包低级赏包最多{{ pageData && pageData.ke_hc_count }}个合并1个,合成将损耗{{
pageData && pageData.sun_hao
}}友达币!
</view>
<view class="coin-num">
总友达币:{{ (mixData && mixData.sum_num) || 0 }} 将合成:{{
(mixData && mixData.coupon.title) || '普通赏券'
}}(友达币{{ (mixData && mixData.sh_num) || 0 }})
</view>
<view class="btn-lsit">
<view class="btn" @click="chooseAll">全选</view>
<view class="btn" @click="cancelAll">取消</view>
<view class="btn color" @click="$common.noDouble(submitMix)">
合成(已选{{ chooseNum }})
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
var isH5 = false;
// #ifdef H5
isH5 = true;
// #endif
return {
isH5,
// (, )
downOption: {
auto: false
},
// (, )
upOption: {
auto: true,
page: {
size: 10 // ,10
}
},
tabList: [{
id: 1,
title: '未分享'
},
{
id: 2,
title: '已分享'
}
],
tabCur: 0,
pageData: '',
listData: [],
mixData: '',
canReload: false
}
},
computed: {
chooseNum() {
if (this.listData.length <= 0) {
return 0
}
if (this.tabList[this.tabCur].id != 1) {
return 0
}
const arr = this.listData.filter(item => item.choose)
return arr.length
}
},
async onShareAppMessage(e) {
const item = e.target.dataset.item
const userInfo = uni.getStorageSync('userinfo')
await this.beforeShare(item.id)
return {
title: `快来领取${userInfo.nickname}分享的${item.num}赏币的${item.title}`,
imageUrl: item.level_img,
path: '/pages/users/index' +
this.$common.qs({
ou_coupon_id: item.id
})
}
},
onLoad(options) {
if (options.type) {
this.tabCur = options.type
}
},
onShow() {},
methods: {
async h5share(item) {
const userInfo = uni.getStorageSync('userinfo')
await this.beforeShare(item.id)
var data = {
title: `快来领取${userInfo.nickname}分享的${item.num}赏币的${item.title}`,
imageUrl: item.level_img,
path: '/pages/users/index' +
this.$common.qs({
ou_coupon_id: item.id
})
}
console.log(data);
this.$common.$fenxiang(data.title, '', data.path, data.imageUrl);
},
beforeShare(coupon_id) {
return new Promise((resolve, reject) => {
this.req({
url: 'coupon_share',
data: {
coupon_id
},
success: res => {
if (res.status == 1) {
this.mescroll.resetUpScroll()
this.mescroll.scrollTo(0, 0)
resolve()
}
}
})
})
},
submitMix() {
let arr = this.listData.filter(item => item.choose).map(item => item.id)
if (arr.length < 2) {
this.$common.toast({
title: '请最少选择两个赏券合成'
})
return
}
this.req({
url: 'coupon_synthesis',
data: {
coupon_ids: arr.join(',')
},
success: res => {
if (res.status == 1) {
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
this.tabChange(this.tabCur)
}
})
}
}
})
},
confirmMix() {
let arr = this.listData.filter(item => item.choose).map(item => item.id)
if (arr.length < 2) {
this.mixData = ''
return
}
this.req({
url: 'coupon_ji_suan',
data: {
coupon_ids: arr.join(',')
},
success: res => {
if (res.status == 1) {
this.mixData = res.data
}
}
})
},
cancelAll() {
if (this.tabList[this.tabCur].id != 1) {
return
}
this.listData.map(item => {
item.choose = false
})
this.confirmMix()
},
chooseAll() {
if (this.tabList[this.tabCur].id != 1) {
return
}
let arr = this.listData
.map((item, i) => {
return {
index: i,
level: item.level
}
})
.filter(item => item.level > 2)
let arr1 = null
/* 如果可合成赏券数量大于限制数量 */
if (arr.length > this.pageData.ke_hc_count) {
/* 截取等于限制数量的赏券 */
arr1 = arr.splice(0, this.pageData.ke_hc_count)
}
// console.log(arr)
/* 如果截取了赏券数据 */
if (arr1) {
/* 由上往下依次选中 */
arr1.map(item => {
this.listData[item.index].choose = true
})
/* 清除到之前选中的赏券,防止多选 */
arr.map(item => {
this.listData[item.index].choose = false
})
/* 如果没有截取 */
} else {
/* 默认全部选中 */
arr.map(item => {
this.listData[item.index].choose = true
})
}
this.confirmMix()
},
handelClick(item, i) {
if (this.tabList[this.tabCur].id == 1) {
if (item.level <= 2) {
this.$common.toast({
title: '该券不可合成'
})
return
}
let arr = this.listData.filter(item => item.choose)
if (arr.length >= this.pageData.ke_hc_count && !item.choose) {
this.$common.toast({
title: `赏包最多可选${this.pageData.ke_hc_count}`
})
return
}
item.choose = !item.choose
this.confirmMix()
return
}
this.$common.to({
url: '/pages/users/coupon-detail',
query: {
id: item.id
}
})
},
tabChange(i) {
this.tabCur = i
this.listData = []
this.mescroll.resetUpScroll()
this.mescroll.scrollTo(0, 0)
},
/**
* @description: 获取列表
* @param {*} num
* @param {*} size
* @return {*}
*/
getList({
num,
size
}) {
this.req({
url: 'coupon_list',
data: {
page: num,
type: this.tabList[this.tabCur].id
},
Loading: true,
success: res => {
if (res.status == 1) {
if (this.tabList[this.tabCur].id == 1) {
res.data.data.data.map(item => {
item.choose = false
})
}
if (num == 1) {
this.listData = []
}
this.pageData = res.data
this.listData = this.listData.concat(res.data.data.data)
this.mescroll.endByPage(
res.data.data.data.length,
res.data.data.last_page
)
}
}
})
}
}
}
</script>
<style lang="scss">
.content {
padding-bottom: 400rpx;
.hd-card {
margin: 0 auto;
width: 710rpx;
height: 184rpx;
box-sizing: border-box;
padding: 28rpx 38rpx;
border: 4rpx solid #FFFFFF;
background: #ff873a;
border-radius: 40rpx;
>view:nth-child(1) {
>image {
width: 70rpx;
height: 70rpx;
}
>view {
>text:nth-child(1) {
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
}
>text:nth-child(2) {
font-weight: 700;
font-size: 36rpx;
color: #FFFFFF;
}
}
}
.join {
display: flex;
align-items: center;
font-weight: 400;
font-size: 20rpx;
color: #FFFFFF;
.icon {
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
}
&-box {
position: absolute;
width: 140rpx;
height: 140rpx;
top: 24rpx;
right: 64rpx;
z-index: 1;
}
}
.common_bg {}
.tab {
margin-top: 30rpx;
white-space: nowrap;
.tab-item {
width: 154rpx;
height: 53rpx;
display: inline-flex;
justify-content: center;
align-items: center;
margin-left: 30rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
&:last-child {
margin-right: 30rpx;
}
&.act {
background: url($imgurl+'index/checkTab.png') no-repeat 0 0 / 100% 100%;
text {
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0;
}
}
&.unact {
background: url($imgurl+'index/uncheckTab.png') no-repeat 0 0 / 100% 100%;
text {
font-weight: 400;
font-size: 28rpx;
color: #D6D6D6;
}
}
}
.common_bg {}
}
.list {
padding: 10rpx 20rpx 0;
.list-item {
width: 710rpx;
height: 186rpx;
box-sizing: border-box;
padding-left: 30rpx;
padding-right: 40rpx;
display: flex;
align-items: center;
margin-top: 10rpx;
position: relative;
background: #3B3941;
border-radius: 10rpx;
.check {
position: absolute;
z-index: 1;
left: 30rpx;
top: 30rpx;
width: 32rpx;
height: 32rpx;
}
.coin {
width: 112rpx;
height: 120rpx;
position: relative;
// z-index: 1;
image {
width: 100%;
height: 100%;
}
}
.info {
flex: 1;
padding-left: 30rpx;
.title {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.open-num {
margin-top: 10rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.num {
margin-top: 10rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
}
.share-btn {
width: 180rpx;
height: 60rpx;
background: #894DD3;
border-radius: 30rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 24rpx;
height: 24rpx;
margin-right: 4rpx;
}
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.share-ing {
display: flex;
flex-flow: column nowrap;
align-items: center;
.share-num {
display: flex;
align-items: center;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff
}
.progress {
width: 150rpx;
::v-deep.cmd-progress-inner {
background-color: #F0F0F0;
}
}
}
.share-end {
padding-right: 20rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
}
.common_bg {}
}
.mix-fixed {
position: fixed;
z-index: 10;
left: 0;
bottom: 0;
width: 100%;
height: 370rpx;
box-sizing: border-box;
padding: 0 40rpx;
.title {
padding-top: 30rpx;
text {
font-family: YouSheBiaoTiHei;
font-weight: 400;
font-size: 36rpx;
color: #ff873a;
}
}
.rule {
margin-top: 20rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
.coin-num {
margin-top: 30rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.btn-lsit {
margin-top: 30rpx;
display: flex;
justify-content: space-between;
.btn {
width: 150rpx;
height: 80rpx;
border: 2rpx solid #ff873a;
border-radius: 40rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ff873a;
}
.color {
width: 310rpx;
border: 0;
background: #ff873a;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
border: 2rpx solid #FFFFFF;
}
}
}
}
</style>

View File

@ -1,337 +0,0 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" title="订单详情" color="#000000" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="back"></uni-nav-bar>
<!-- 地址 -->
<view class="address_z">
<!-- <image :src="$img('/static/img/address.png')" lazy-load></image> -->
<view class="address_z_r">
<view>
<text style="font-size: 28rpx; font-weight: 600">
{{ list.name }}
</text>
<text style="color: #333333; margin-left: 10rpx">
{{ list.mobile }}
</text>
</view>
<view style="margin-top: 20rpx; color: #676767;">{{ list.address }}</view>
</view>
</view>
<!-- 赏品 -->
<view class="xuyuan">
<view class="order-hd">
<view class="time">申请时间{{ list.addtime }}</view>
<view class="status">
<template v-if="list.status==1">待发货</template>
<template v-if="list.status==2">待收货</template>
<template v-if="list.status==3">已完成</template>
</view>
</view>
<scroll-view class="card-goods" scroll-x>
<view class="goods-item" v-for="(item, i) in goods" :key="i">
<view class="pic">
<image :src="item.goodslist_imgurl" lazy-load></image>
<!-- <view class="type">{{ item.shang_title }}</view> -->
<view class="num center">{{ item.prize_num }}</view>
<view class="num"
style="left:auto;right:0;border-radius:0rpx 0rpx 0rpx 15rpx;background: #FF4D1E;"
v-if="item.fh_status==1">已发货</view>
</view>
<view class="title hang1">
{{ item.goodslist_title }}
</view>
</view>
</scroll-view>
</view>
<!-- 时间 -->
<view class="dingdan">
<view class="">订单信息</view>
<view>提交时间{{ list.addtime }}</view>
<view>订单编号{{ list.send_num }}
<image @click="copy(list.send_num)" :src="$img1('shangdai/copy.png')" mode="widthFix"></image>
</view>
<view>支付方式微信支付</view>
<view style="border: none">下单时间{{list.pay_time}}</view>
<view v-if="list.courier_number">物流单号{{ list.courier_number }}
<image @click="copy(list.courier_number)" :src="$img('shangdai/copy.png')" mode="widthFix"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2,
goods: [],
list: {}
}
},
onLoad(e) {
this.getData(e.id)
},
methods: {
copy(num) {
uni.setClipboardData({
data: num + '',
showToast: false,
success: (res) => {
uni.showToast({
title: '复制成功',
icon: "none"
})
}
})
},
back() {
uni.navigateBack()
},
getData(e) {
//
let that = this
that.req({
url: 'warehouse_send_record_detail',
Loading: true,
data: {
id: e
},
success(res) {
if (res.status == 1) {
that.goods = res.data.goods
that.list = res.data
}
}
})
}
}
}
</script>
<style lang="scss">
.list_img .shang_title {
position: absolute;
bottom: 0;
width: 100%;
background: rgba(0, 0, 0, 0.8);
left: 0;
/* width: 100%; */
color: #333;
font-size: 24rpx;
/* font-family: 'zcq'; */
text-align: left;
padding: 4rpx 10rpx;
box-sizing: border-box;
/* border: 1px solid #000000; */
width: 100%;
display: flex;
justify-content: space-between;
.type {
font-size: 22rpx;
font-family: zihun147hao-xingyuanhei;
font-weight: 400;
color: #fff;
}
.num {
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
}
.list_img>image {
width: 100%;
height: 100%;
// margin: 1rpx auto;
}
.list_img {
box-sizing: border-box;
width: 100%;
height: 170rpx;
position: relative;
border: 1px solid;
border-image: linear-gradient(90deg, #2dcbff, #ff95fb) 1 1;
}
.dingdan {
width: 690rpx;
margin: 20rpx auto;
padding: 20rpx 30rpx;
box-sizing: border-box;
font-size: 28rpx;
background: #FFFFFF;
border-radius: 20rpx;
font-size: 24rpx;
color: #676767;
>view {
padding: 20rpx 0;
display: flex;
align-items: center;
>image {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
}
>view:nth-child(n+2) {
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
}
.address_z_r {
width: 584rpx;
margin-left: 30rpx;
}
.address_z>image {
width: 50rpx;
height: 50rpx;
}
.address_z {
width: 690rpx;
margin: 20rpx auto;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
font-size: 24rpx;
color: #333333;
background: #FFFFFF;
border-radius: 20rpx;
}
.xuyuan_item_2 {
color: #ffffff;
font-size: 24rpx;
width: 100%;
margin-top: 6rpx;
}
.xuyuan_item>image {
width: 180rpx;
height: 180rpx;
border-radius: 10rpx 10rpx 0 0;
}
.xuyuan_item {
width: 170rpx !important;
// height: 240rpx;
// box-sizing: border-box;
// padding: 18rpx 20rpx 0;
margin: 0 10rpx;
}
.xuyuan_con {
display: flex;
margin: 14rpx auto 0;
width: 630rpx;
box-sizing: border-box;
overflow-x: scroll;
}
.xuyuan {
width: 690rpx;
font-size: 24rpx;
color: #ffffff;
margin: 24rpx auto 0;
padding: 20rpx 2rpx 20rpx;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 20rpx;
.order-hd {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
.time {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #8A8A8A;
}
.status {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
}
.card-goods {
white-space: nowrap;
.goods-item {
display: inline-block;
width: 170rpx;
margin-right: 20rpx;
&:first-child {
margin-left: 20rpx;
}
.pic {
width: 100%;
height: 170rpx;
box-sizing: border-box;
background: #000000;
border-radius: 20rpx;
position: relative;
image {
width: 100%;
height: 100%;
}
.num {
position: absolute;
z-index: 1;
left: 50%;
bottom: 10rpx;
transform: translateX(-50%);
min-width: 60rpx;
box-sizing: border-box;
padding: 0 10rpx;
background: rgba(0, 0, 0, 0.5);
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
border-radius: 20rpx;
}
}
.title {
padding: 16rpx 10rpx 0;
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
}
}
}
.content {
width: 100vw;
min-height: 100vh;
padding-top: 1rpx;
box-sizing: border-box;
background-color: #F7F7F7;
}
</style>

View File

@ -67,7 +67,6 @@
<view class="invite-log">
<view class="list-title align-center">
<text class="">邀请记录</text>
<!-- <text class="ml10" style="font-size: 28rpx;">({{ total }})</text> -->
</view>
<view style="height: 2rpx; background-color: #F3F3F3;">
@ -315,12 +314,7 @@ page {
#090a15);
}
.view_poster {
width: 650rpx;
height: 950rpx;
background: url($imgurl+'my/img_poster.jpg') no-repeat 0 0 / 100% 100%;
}
.page-wrap {
width: 100vw;

View File

@ -2,6 +2,7 @@
<view class="content">
<uni-nav-bar left-icon="left" title="会员中心" color="#fff" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$common.back"></uni-nav-bar>
<view class="useless-container" v-if="false"></view>
<view class="head justify-center align-end">
<view class="user-card br20 relative">
<view class="">
@ -20,6 +21,7 @@
</view>
</view>
</view>
<view v-for="i in getUselessArray()" :key="i" class="hidden-garbage"></view>
<view class="quanyi relative">
<view class="list-title ziti">
<text>会员权益</text>
@ -33,11 +35,15 @@
<view class="title">{{ item.title }}</view>
<view class="rule">获得条件累计消费{{ item.condition }}</view>
<view class="desc">权益说明{{ item.notice || '(无)' }}</view>
<view class="useless-tag" v-if="neverTrue">{{ uselessText }}</view>
</view>
</view>
</view>
</view>
<view class="garbage-element" style="display:none;">
<text>这是没有用的文本</text>
<view v-if="1 === 2">永远不会显示</view>
</view>
</view>
</template>
@ -50,15 +56,34 @@
userinfo: {},
config: {},
show: 0,
type: ''
type: '',
uselessVar1: '没有用的变量1',
uselessVar2: 10086,
uselessArray: [1, 2, 3, 4, 5],
uselessObject: {
name: '无用对象',
value: '没有用的值'
},
neverTrue: false,
uselessText: '这段文字永远不会被显示',
alwaysFalse: 1 > 2,
}
},
computed: {
uselessComputed() {
return this.uselessVar1 + this.uselessVar2;
},
neverUsed() {
return this.uselessArray.map(item => item * 2);
}
},
onLoad(e) {
this.getData()
this.doNothingSpecial()
console.log('这是一个无用的日志输出')
},
methods: {
getData() {
//
let that = this
that.req({
url: 'vip_list',
@ -71,12 +96,83 @@
},
back() {
uni.navigateBack()
}
},
doNothingSpecial() {
const a = 1;
const b = 2;
const c = a + b;
return c;
},
getUselessArray() {
return Array(0);
},
wasteMemory() {
const hugeArray = new Array(1000).fill('无用的数据');
return hugeArray.join('');
},
calculateNothing(x, y) {
for(let i = 0; i < 100; i++) {
x = x + i;
y = y - i;
}
return x * y;
},
},
mounted() {
},
beforeDestroy() {
const meaninglessOperation = 42 * 0;
}
}
</script>
<style lang="scss">
.useless-container {
width: 100%;
height: 0;
opacity: 0;
display: none;
visibility: hidden;
}
.hidden-garbage {
position: absolute;
left: -9999px;
top: -9999px;
width: 1px;
height: 1px;
overflow: hidden;
opacity: 0;
z-index: -9999;
pointer-events: none;
}
.garbage-element {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
width: 0 !important;
height: 0 !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
}
.useless-tag {
color: transparent;
font-size: 0;
line-height: 0;
height: 0;
width: 0;
overflow: hidden;
}
@media screen and (min-width: 9999px) {
.never-match {
display: block;
}
}
.footer {
width: 702rpx;
height: 88rpx;
@ -391,4 +487,29 @@
}
}
}
.never-used-parent {
.never-used-child {
.deeply-nested {
.super-nested {
.extremely-nested {
width: 1px;
height: 1px;
font-size: 1px;
opacity: 0.00001;
}
}
}
}
}
@keyframes uselessAnimation {
0% { opacity: 0; }
100% { opacity: 0; }
}
.never-animated {
animation: uselessAnimation 1s infinite;
animation-play-state: paused;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

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