达达券排行榜.
This commit is contained in:
parent
daef89a8c5
commit
5143e72a81
|
|
@ -67,16 +67,27 @@ export default {
|
|||
},
|
||||
|
||||
navTo(item) {
|
||||
/* 领券中心 */
|
||||
if (item.ttype == 1) {
|
||||
this.to({
|
||||
url: '/package/index/coupon-center',
|
||||
query: {
|
||||
coupon_id: item.coupon_id
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
switch (item.ttype) {
|
||||
case 1:
|
||||
/* 领券中心 */
|
||||
this.to({
|
||||
url: '/package/index/coupon-center',
|
||||
query: {
|
||||
coupon_id: item.coupon_id
|
||||
}
|
||||
})
|
||||
break;
|
||||
|
||||
case 5: //达达券排行榜
|
||||
this.to({
|
||||
url: '/pages/shouye/dada_ranking',
|
||||
})
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (item.goods_id > 0) {
|
||||
if (item.ttype == 2) {
|
||||
/* 一番赏 */
|
||||
|
|
@ -125,7 +136,7 @@ export default {
|
|||
return new Promise((resolve, reject) => {
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest', data,
|
||||
function (res) {
|
||||
function(res) {
|
||||
console.log('支付回调', res);
|
||||
if (res.errMsg == 'requestPayment:fail cancel') {
|
||||
uni.showToast({
|
||||
|
|
@ -283,7 +294,10 @@ export default {
|
|||
//TODO handle the exception
|
||||
}
|
||||
var that = this;
|
||||
setTimeout(() => { that.data.loading = false; console.log("方法执行结束", this.data.loading, this.data.loading); }, 1000)
|
||||
setTimeout(() => {
|
||||
that.data.loading = false;
|
||||
console.log("方法执行结束", this.data.loading, this.data.loading);
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -521,13 +535,13 @@ export default {
|
|||
'onMenuShareTimeline',
|
||||
]
|
||||
});
|
||||
wx.ready(function () {
|
||||
wx.ready(function() {
|
||||
wx.checkJsApi({
|
||||
jsApiList: [
|
||||
'openAddress',
|
||||
'onMenuShareTimeline',
|
||||
],
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (link.indexOf('http:') < 0 &&
|
||||
link.indexOf('https:') < 0) {
|
||||
link = location.href.split('#')[0] + "#" + link;
|
||||
|
|
@ -538,7 +552,7 @@ export default {
|
|||
desc: desc, // 分享描述
|
||||
link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: image, // 分享图标
|
||||
success: function () {
|
||||
success: function() {
|
||||
// 设置成功
|
||||
}
|
||||
})
|
||||
|
|
@ -568,7 +582,7 @@ export default {
|
|||
|
||||
|
||||
});
|
||||
wx.error(function (res) {
|
||||
wx.error(function(res) {
|
||||
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
||||
console.log("出现错误", res);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@
|
|||
.content {
|
||||
padding: 30rpx;
|
||||
background-color: #F7F7F7;
|
||||
height: 100%;
|
||||
min-height: 100vh;
|
||||
|
||||
.user-card {
|
||||
margin: 40rpx auto 0;
|
||||
|
|
|
|||
23
pages.json
23
pages.json
|
|
@ -438,30 +438,25 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/infinite/daily_check_in",
|
||||
"style" :
|
||||
{
|
||||
"path": "pages/infinite/daily_check_in",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/infinite/bonus_house",
|
||||
"style" :
|
||||
{
|
||||
"path": "pages/infinite/bonus_house",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/infinite/bonus_house_details",
|
||||
"style" :
|
||||
{
|
||||
"path": "pages/infinite/bonus_house_details",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/infinite/VIP_perks",
|
||||
"style" :
|
||||
{
|
||||
}, {
|
||||
"path": "pages/shouye/dada_ranking",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="navLeft align-center" :style="{top:$sys().statusBarHeight+'px'}" @tap="$c.back(1)">
|
||||
<uni-icons type="left" color="#000000"></uni-icons>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="title1">VIP福利</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.content {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.navLeft {
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
height: 44px;
|
||||
z-index: 100;
|
||||
|
||||
>view {
|
||||
font-weight: 400;
|
||||
font-size: 50rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.title1 {
|
||||
width: 100%;
|
||||
top: 108rpx;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 34rpx;
|
||||
justify-content: center;
|
||||
color: black;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<!-- 积分 -->
|
||||
<!-- 福利 -->
|
||||
|
||||
<template>
|
||||
<view class="content">
|
||||
<uni-nav-bar color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true"
|
||||
:border="false" >
|
||||
<uni-nav-bar color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true" :border="false">
|
||||
<view style="font-size: 34rpx; width: 100%; display: flex; justify-content: center; align-items: center;">
|
||||
福利
|
||||
</view>
|
||||
|
|
@ -20,114 +19,121 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import RequestManager from '@/common/request.js'
|
||||
import RequestManager from '@/common/request.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取福利屋菜单列表
|
||||
getWelfareList() {
|
||||
RequestManager.post('/welfare_house_list')
|
||||
.then(res => {
|
||||
if (res.status === 1 && res.data) {
|
||||
this.list = res.data;
|
||||
} else {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取福利屋菜单列表
|
||||
getWelfareList() {
|
||||
RequestManager.post('/welfare_house_list')
|
||||
.then(res => {
|
||||
if (res.status === 1 && res.data) {
|
||||
this.list = res.data;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg || '获取福利列表失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('获取福利列表失败:', err);
|
||||
uni.showToast({
|
||||
title: res.msg || '获取福利列表失败',
|
||||
title: '获取福利列表失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('获取福利列表失败:', err);
|
||||
uni.showToast({
|
||||
title: '获取福利列表失败',
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
//跳转页面
|
||||
toPage(item) {
|
||||
if (item.url) {
|
||||
this.$c.to({
|
||||
url: item.url
|
||||
//跳转页面
|
||||
toPage(item) {
|
||||
|
||||
if (item.id == 5) {//达达券测试
|
||||
this.$c.to({
|
||||
url: '/pages/shouye/dada_ranking',
|
||||
});
|
||||
}
|
||||
|
||||
if (item.url) {
|
||||
this.$c.to({
|
||||
url: item.url
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.current = 0
|
||||
const curPages = getCurrentPages()[0]; // 获取当前页面实例
|
||||
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
|
||||
this.$mp.page.getTabBar().setData({
|
||||
selected: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getWelfareList();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.current = 0
|
||||
const curPages = getCurrentPages()[0]; // 获取当前页面实例
|
||||
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
|
||||
this.$mp.page.getTabBar().setData({
|
||||
selected: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getWelfareList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
/* padding-top: 1rpx; */
|
||||
padding-bottom: 100px;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.content {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
/* padding-top: 1rpx; */
|
||||
padding-bottom: 100px;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.title1 {
|
||||
width: 100%;
|
||||
top: 108rpx;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 34rpx;
|
||||
justify-content: center;
|
||||
color: black;
|
||||
z-index: 100;
|
||||
}
|
||||
.title1 {
|
||||
width: 100%;
|
||||
top: 108rpx;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 34rpx;
|
||||
justify-content: center;
|
||||
color: black;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 324rpx);
|
||||
/* 三列,每列宽度相等 */
|
||||
gap: 40rpx 42rpx;
|
||||
/* 网格之间的间隔 */
|
||||
}
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 324rpx);
|
||||
/* 三列,每列宽度相等 */
|
||||
gap: 40rpx 42rpx;
|
||||
/* 网格之间的间隔 */
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
position: relative;
|
||||
background-color: #D8D8D8;
|
||||
text-align: center;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.grid-item {
|
||||
position: relative;
|
||||
background-color: #D8D8D8;
|
||||
text-align: center;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.grid-item-bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.grid-item-bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.grid-item text {
|
||||
z-index: 2;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.grid-item text {
|
||||
z-index: 2;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
135
pages/shouye/dada_ranking.vue
Normal file
135
pages/shouye/dada_ranking.vue
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<template>
|
||||
|
||||
<view
|
||||
style="width: 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; background-color: #FFFFFF;">
|
||||
|
||||
<view class="" style="position: relative;width: 100%;">
|
||||
<!-- <view class="" style=" width: 100%; height: 457.64rpx; position: absolute;">
|
||||
<swiper class="" style="width: 100%; height: 100%;" :autoplay="true" :indicator-dots="false"
|
||||
:circular="true" :interval="3000">
|
||||
<swiper-item v-for="(v, i) in advert" :key="i" @click="$c.navTo(v)">
|
||||
<image class="yh_bg" :src="v.imgurl" style="width: 100%;height: 100%;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view> -->
|
||||
<uni-icons type="left" style="position: absolute; left: 30rpx; z-index: 100;"
|
||||
:style="{top:$sys().statusBarHeight+'px'}" @tap="$c.back(1)" color="#000000"></uni-icons>
|
||||
<view class="" :style="{top:$sys().statusBarHeight+'px'}"
|
||||
style="position: absolute;width: 100%; position: absolute; font-weight: 400; text-align: center; font-size: 37rpx; color: #000000;">
|
||||
达达券排行榜</view>
|
||||
</view>
|
||||
|
||||
<image :src="$img('/static/image/reward_rule.png')" style="width: 686rpx; height: 120rpx; margin-top: 232rpx;"
|
||||
@click="$refs.rulePop.getRule(15, '规则说明')" mode=""></image>
|
||||
|
||||
|
||||
<view style="width: 683rpx; margin-bottom: 50rpx; display: flex; flex-direction: column; overflow: auto; margin-top: 20rpx;">
|
||||
|
||||
<view class="" v-for="(item,index) in list"
|
||||
style="display: flex; flex-direction: row; align-items: center; margin-top:30rpx; border-radius: 14rpx; padding-top: 15rpx; padding-bottom: 15rpx;"
|
||||
:style="{backgroundColor: setBgColor(index)}">
|
||||
|
||||
<view class="" v-if="index == 0 "
|
||||
style="width: 43rpx; height: 47rpx;color: #B8B8B8;text-align:center; margin-left: 32rpx;">
|
||||
<image :src="$img1('/image/1.png')" style="width: 42rpx; height: 54rpx;"></image>
|
||||
</view>
|
||||
<view class="" v-if="index == 1 "
|
||||
style="width: 43rpx; height: 47rpx;color: #B8B8B8;text-align:center; margin-left: 32rpx;">
|
||||
<image :src="$img1('/image/2.png')" style="width: 42rpx; height: 54rpx;"></image>
|
||||
</view>
|
||||
<view class="" v-if="index == 2 "
|
||||
style="width: 43rpx; height: 47rpx;color: #B8B8B8;text-align:center; margin-left: 32rpx;">
|
||||
<image :src="$img1('/image/3.png')" style="width: 42rpx; height: 54rpx;"></image>
|
||||
</view>
|
||||
<view class="" v-if="index > 2 "
|
||||
style="width: 42rpx; height: 42rpx;color: #333333;text-align:center; margin-left: 32rpx;">
|
||||
{{index+1}}
|
||||
</view>
|
||||
|
||||
<view class="" style="width: 94rpx; height: 94rpx; margin-left: 30rpx;">
|
||||
<image :src="item.headimg" style="width: 94rpx; height: 94rpx; border-radius: 50%;"></image>
|
||||
</view>
|
||||
<view class="" style="display: flex; flex-direction: column; margin-left: 28rpx;flex: 1;">
|
||||
<text style="font-size: 20rpx; color: #333333;">{{item.nickname}}</text>
|
||||
</view>
|
||||
<view class="" style="margin-right: 20rpx;">
|
||||
<span style="color: #333333; font-size: 32rpx;">{{item.invitenumber}}<text
|
||||
style="font-size: 16rpx; color: #8A8A8A;">张</text></span>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<rule-pop ref="rulePop"></rule-pop>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
var list;
|
||||
return {
|
||||
advert: [], //轮播图
|
||||
list: [],
|
||||
colors: ['#FDFCD8', '#ECF7FF', '#FFF6EE', '#F8F8F8'],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
load() {
|
||||
let that = this
|
||||
that.req({
|
||||
url: 'getAdvert?type_id=4',
|
||||
success(res) {
|
||||
if (res.status == 1) {
|
||||
that.advert = res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
that.req({
|
||||
url: 'user_yaoqing',
|
||||
success(res) {
|
||||
console.log(res);
|
||||
if (res.status == 1) {
|
||||
that.list = res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
setBgColor(index) {
|
||||
if (index == 0) {
|
||||
return this.colors[index];
|
||||
} else if (index == 1) {
|
||||
return this.colors[index];
|
||||
} else if (index == 2) {
|
||||
return this.colors[index];
|
||||
} else {
|
||||
return this.colors[3];
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.navLeft {
|
||||
|
||||
height: 44px;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center !important;
|
||||
|
||||
>view {
|
||||
width: 100%;
|
||||
// font-family: YouSheBiaoTiHei;
|
||||
position: absolute;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
font-size: 37rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user