任务修改,会员权益修改
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||
const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||
|
||||
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||
|
||||
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
|
||||
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
|
||||
|
||||
@@ -477,12 +477,16 @@
|
||||
|
||||
if (name.type ==1) {
|
||||
tipContent = '很遗憾,没有中奖,请再接再厉!'
|
||||
uni.showToast({
|
||||
title: tipContent,
|
||||
icon: "none"
|
||||
})
|
||||
} else {
|
||||
tipContent = `恭喜您,获得 ${name}${this.result.type==2?(this.result.number+'元'):''} !`
|
||||
this.showLingPop({...this.result})
|
||||
}
|
||||
const _this=this;
|
||||
console.log(this.result);
|
||||
this.showLingPop({...this.result})
|
||||
this.result=''
|
||||
this.prizeing = false
|
||||
return
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
discSpinningRecordId: null,
|
||||
foreignId: null,
|
||||
foreignType: 'spinning',
|
||||
phone: "",
|
||||
address: "",
|
||||
remark: "",
|
||||
@@ -44,9 +45,11 @@
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if ( options.id ) {
|
||||
this.query.discSpinningRecordId = options.id
|
||||
this.query.foreignId = options.id
|
||||
}
|
||||
if ( options.foreignType ) {
|
||||
this.query.foreignType = options.foreignType
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -184,7 +184,6 @@ export default {
|
||||
getMoneyDetail() {
|
||||
let that = this;
|
||||
let token = uni.getStorageSync('token')
|
||||
console.log(1);
|
||||
if (token) {
|
||||
//可以提现金额查询预估收入查询
|
||||
let data = {
|
||||
|
||||
@@ -41,11 +41,10 @@
|
||||
}
|
||||
},
|
||||
onLoad: function(e) {
|
||||
console.log(e)
|
||||
if (e.moneyType) {
|
||||
this.moneyType = e.moneyType
|
||||
uni.setNavigationBarTitle({
|
||||
title: e.moneyType === 1 ? '红包明细' : '金币明细'
|
||||
title: e.moneyType == 1 ? '红包明细' : '金币明细'
|
||||
});
|
||||
}
|
||||
if (e.viewType) {
|
||||
|
||||
@@ -579,7 +579,6 @@
|
||||
}
|
||||
},
|
||||
goNav(e,type) {
|
||||
console.log(e)
|
||||
let token = uni.getStorageSync('token')
|
||||
if (token) {
|
||||
if (type === 'tabbar') {
|
||||
|
||||
@@ -17,14 +17,22 @@
|
||||
<view class="icon_title u-font-32 text-bold u-relative">新人好礼送不停</view>
|
||||
<image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></image>
|
||||
</view>
|
||||
|
||||
<view class="content signIn margin-lr padding bg-white u-relative" style="margin-bottom: 32rpx;">
|
||||
<view v-if="enable!=0&&signInList.length>0" class="content signIn margin-lr padding bg-white u-relative" style="margin-bottom: 32rpx;">
|
||||
|
||||
<view class="title flex justify-between">
|
||||
<view>已连续签到 <text class="num">{{signDays}}</text> 天</view>
|
||||
<!-- <view class="dk flex">
|
||||
<text style="margin-right: 20rpx;">打卡提醒</text>
|
||||
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
||||
</view> -->
|
||||
<view class="tooltip-trigger" @click="showTooltip">
|
||||
<u-icon name="question-circle" :size="40"></u-icon>
|
||||
<view class="tooltip" v-if="isTooltipVisible">
|
||||
签到中断后需重新签到
|
||||
<view class="triangle"></view>
|
||||
<view class="trianglef"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="signInList flex justify-between">
|
||||
<text class="line"></text>
|
||||
@@ -39,6 +47,7 @@
|
||||
src="../../static/images/signIn_icon1.png" mode="" />
|
||||
<view class="radius"></view>
|
||||
<view class="_label">{{item.showText}}</view>
|
||||
<view class="_label" style="font-size: 18rpx;color: #999;margin-top: 2rpx;">{{item.signDay.slice(6,10)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -50,11 +59,10 @@
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
||||
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index"
|
||||
v-if="((item.buttonUrl=='/me/invite/index'&&isShowMoneyPay))||((item.buttonUrl!='/me/invite/index'))">
|
||||
v-if="item.show">
|
||||
<view class="cell_left flex">
|
||||
<view class="cell_title flex">
|
||||
<view class="u-font-28 text-bold title"
|
||||
@@ -75,7 +83,7 @@
|
||||
</view>
|
||||
<!-- <view v-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view> -->
|
||||
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip"
|
||||
@click="goNav({buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title})">
|
||||
@click="goNav({id: item.id,buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title, disabled: item.disabled, discNumber: item.discNumber})">
|
||||
{{ item.buttonUnderContent}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -101,27 +109,9 @@
|
||||
list: [],
|
||||
checked: false,
|
||||
signDays: 0,
|
||||
signInList: [{
|
||||
name: '第一天'
|
||||
},
|
||||
{
|
||||
name: '第二天'
|
||||
},
|
||||
{
|
||||
name: '第三天'
|
||||
},
|
||||
{
|
||||
name: '第四天'
|
||||
},
|
||||
{
|
||||
name: '第五天'
|
||||
},
|
||||
{
|
||||
name: '第六天'
|
||||
},
|
||||
{
|
||||
name: '第七天'
|
||||
},
|
||||
enable: 0,
|
||||
signInList: [],
|
||||
recordList: [
|
||||
],
|
||||
signInBtn: '点击签到',
|
||||
isShowMoneyPay: true,
|
||||
@@ -129,9 +119,12 @@
|
||||
isAndroid: false,
|
||||
adRewardedVideo: true,
|
||||
urlCallback: null,
|
||||
isTooltipVisible: false,
|
||||
tooltipTimeout: null,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.signInList = []
|
||||
this.adRewardedVideo = true;
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
@@ -141,9 +134,7 @@
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isIos = /iOS/.test(sysInfo.platform);
|
||||
// 判断是否是安卓设备
|
||||
// #ifdef APP-PLUS
|
||||
this.isAndroid = sysInfo.platform === 'android'
|
||||
// #endif
|
||||
|
||||
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
@@ -153,9 +144,28 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 签到提示出发
|
||||
*/
|
||||
showTooltip() {
|
||||
clearTimeout(this.tooltipTimeout);
|
||||
this.isTooltipVisible = !this.isTooltipVisible;
|
||||
this.tooltipTimeout = setTimeout(() => {
|
||||
this.isTooltipVisible = false;
|
||||
}, 1000); // 1000毫秒后隐藏tooltip
|
||||
},
|
||||
|
||||
/**
|
||||
* 广告数据加载成功回调
|
||||
* @param {Object} e
|
||||
*/
|
||||
onadload(e) {
|
||||
console.log('广告数据加载成功');
|
||||
},
|
||||
/**
|
||||
* 广告播放成功回调
|
||||
* @param {Object} e
|
||||
*/
|
||||
async onadclose(e) {
|
||||
const detail = e.detail
|
||||
if (detail && detail.isEnded) {
|
||||
@@ -177,6 +187,10 @@
|
||||
// 播放中途退出
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 广告加载失败回调
|
||||
* @param {Object} e
|
||||
*/
|
||||
onaderror(e) { // 广告加载失败
|
||||
this.adRewardedVideo = false;
|
||||
console.log("广告加载失败")
|
||||
@@ -189,6 +203,7 @@
|
||||
if (res.code == 0) {
|
||||
this.signInList = res.data.recordList
|
||||
this.signDays = res.data.signDays
|
||||
this.enable = res.data.enable
|
||||
this.signInList.map((item, index) => {
|
||||
if (item.showText == '待签到' && index > 0) {
|
||||
this.signInBtn = this.signInList[index - 1].status == 0 ? '重新签到' : '点击签到'
|
||||
@@ -247,14 +262,17 @@
|
||||
} else if (item.jumpType == 1) {
|
||||
let source, buttonUrl;
|
||||
buttonUrl = item.buttonUrl
|
||||
if (item.title && item.title.indexOf('每周') != -1) {
|
||||
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
||||
source = 2
|
||||
buttonUrl = item.buttonUrl + '?source=' + source
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月') != -1) {
|
||||
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||
source = 3
|
||||
buttonUrl = item.buttonUrl + '?source=' + source
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
||||
buttonUrl = `${item.buttonUrl}?standard=${item.discNumber==null?true:false}&taskId=${item.id}`
|
||||
}
|
||||
console.log(buttonUrl)
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
@@ -298,10 +316,21 @@
|
||||
* 获取任务列表
|
||||
*/
|
||||
getTaskdata() {
|
||||
|
||||
this.list= [];
|
||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.list = res.data
|
||||
this.list.map(item=>{
|
||||
item.show = true
|
||||
})
|
||||
// #ifdef H5
|
||||
this.list.map(item=>{
|
||||
if(item.title.indexOf("观看视频") != -1) {
|
||||
item.show = false
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
@@ -320,10 +349,59 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
// width: 100%;
|
||||
// min-height: 100vh;
|
||||
page{
|
||||
background-color: #F3F4F8;
|
||||
}
|
||||
.tooltip-trigger {
|
||||
// background-color: #f0f0f0;
|
||||
// border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
box-shadow: 0rpx 4rpx 10rpx 4rpx rgba(140,140,140,0.35);
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
position: absolute;
|
||||
top: 80rpx;
|
||||
right: 30rpx;
|
||||
z-index: 10;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.triangle,.trianglef {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
right: 15rpx;
|
||||
top: -16rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 17rpx solid transparent;
|
||||
/* 左边的边框为透明 */
|
||||
border-right: 17rpx solid transparent;
|
||||
/* 右边的边框为透明 */
|
||||
border-bottom: 17rpx solid rgba(140,140,140,0.15);
|
||||
opacity: .9;
|
||||
z-index: 8;
|
||||
}
|
||||
.trianglef{
|
||||
top: -15rpx;
|
||||
right: 17rpx;
|
||||
border-left: 15rpx solid transparent;
|
||||
/* 左边的边框为透明 */
|
||||
border-right: 15rpx solid transparent;
|
||||
border-bottom: 15rpx solid #fff;
|
||||
z-index: 11;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
// height: 100vh;
|
||||
background-color: #F3F4F8;
|
||||
// padding-bottom: 132rpx;
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 494rpx !important;
|
||||
@@ -486,7 +564,7 @@
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 57rpx;
|
||||
bottom: 82rpx;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar :background="background" :is-back="true" :title="title" :border-bottom="false"></u-navbar>
|
||||
<view class="task_bg u-relative"></view>
|
||||
|
||||
|
||||
<view style="width: 100%;position: absolute;">
|
||||
<image class="task_bg" src="../../static/images/task/prize_bg.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="content u-relative" v-if="list.length">
|
||||
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index" >
|
||||
@@ -24,7 +24,7 @@
|
||||
return {
|
||||
title: '',
|
||||
background: {
|
||||
backgroundImage: 'transparent'
|
||||
backgroundImage: 'linear-gradient(to right, #F0987B 0%, #F0987B 49%, #F0987B 100%)'
|
||||
},
|
||||
list: [],
|
||||
source: null
|
||||
@@ -55,23 +55,26 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #FAF8F3;
|
||||
}
|
||||
.container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
.task_bg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
background: url('../../static/images/task/prize_bg.png') no-repeat top center / cover;
|
||||
// height: 100%;
|
||||
// position: absolute;
|
||||
// top: 88rpx;
|
||||
// background: url('../../static/images/task/prize_bg.png') no-repeat top center / cover;
|
||||
|
||||
}
|
||||
|
||||
.content{
|
||||
z-index: 9;
|
||||
padding: 370rpx 28rpx 0 28rpx;
|
||||
padding: 282rpx 28rpx 0 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar :background="background" :is-back="true" :title="title" :border-bottom="false"></u-navbar>
|
||||
<u-navbar :background="background" :is-back="true" :title="title" :border-bottom="false" style="position: absolute;"></u-navbar>
|
||||
<view class="task_bg u-relative">
|
||||
<u-image class="task_bg" src="../../static/images/task/member_bg.png" ></u-image>
|
||||
<view class="title ">每月打卡免费领</view>
|
||||
@@ -15,12 +15,32 @@
|
||||
</view>
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index" >
|
||||
<view class="cell_left flex">
|
||||
<image class="cell_icon" :src="item.url"></image>
|
||||
<image class="cell_icon" :src="item.img"></image>
|
||||
<view class="cell_title flex">
|
||||
<view class="u-font-28 text-bold title">{{ item.name}}</view>
|
||||
<!-- <view class="u-font-24 tip">{{ item.rewardDetail }}</view> -->
|
||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell_right" v-if="standard=='true'">
|
||||
<viwe v-if="!receive">
|
||||
<view class="btn" @click="taskReceive(item)">领取</view>
|
||||
</viwe>
|
||||
<view v-else>
|
||||
<view v-if="item.disabled" >
|
||||
<view class="btn disabled" >领取</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-if="!item.targetId" class="btn" @click="toDuiHuan(item)">去兑换</view>
|
||||
<view v-else class="btn receive" >已兑换</view>
|
||||
<u-image v-if="!item.targetId" class="icon" src="../../static/images/task/receive2.png"></u-image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="standard" v-else>
|
||||
<u-image class="icon" src="../../static/images/task/receive1.png"></u-image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -37,7 +57,14 @@
|
||||
background: {
|
||||
backgroundImage: 'transparent',
|
||||
},
|
||||
query: {
|
||||
taskId: null,
|
||||
|
||||
},
|
||||
list: [],
|
||||
standard: true,
|
||||
receive: null,
|
||||
record: null,
|
||||
source: null,
|
||||
}
|
||||
},
|
||||
@@ -46,21 +73,75 @@
|
||||
if ( options.source ) {
|
||||
this.source = options.source
|
||||
}
|
||||
this.getList()
|
||||
if ( options.standard ) {
|
||||
this.standard = options.standard
|
||||
}
|
||||
if ( options.taskId ) {
|
||||
this.query.taskId = options.taskId
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 去兑换
|
||||
* @param {Object} item
|
||||
*/
|
||||
toDuiHuan(item){
|
||||
uni.navigateTo({
|
||||
url:`/me/gift/duihuan?id=${this.record}&foreignType=task`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*/
|
||||
getList() {
|
||||
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||
this.$Request.getT('app/taskCenterReward/selectTaskCenterUserReward', this.query).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
this.list = res.data.records
|
||||
this.list = res.data
|
||||
this.list.map(item=>{
|
||||
item.disabled = true
|
||||
})
|
||||
this.receive = res.receive
|
||||
this.record = res.record
|
||||
if ( this.receive ) {
|
||||
this.list.map(item=>{
|
||||
if ( item.id == this.receive ) {
|
||||
item.disabled = false
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(this.list)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 领取
|
||||
*/
|
||||
taskReceive(item) {
|
||||
let data = {
|
||||
taskId: this.query.taskId,
|
||||
sourceId: item.id
|
||||
}
|
||||
this.$Request.postT('app/taskCenter/receiveGoods', data).then(res => {
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: '领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.getList()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -120,6 +201,17 @@
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 32rpx 28rpx;
|
||||
position: relative;
|
||||
.standard{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(43,43,43,0.19);
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
}
|
||||
.cell_left{
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
@@ -147,7 +239,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
.cell_right{
|
||||
.cell_right{
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
@@ -163,6 +255,8 @@
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
border: 2rpx solid transparent;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.opt{
|
||||
@@ -179,6 +273,13 @@
|
||||
color: #6DA9F7;
|
||||
}
|
||||
}
|
||||
.icon{
|
||||
width: 132rpx!important;
|
||||
height: 136rpx!important;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
}
|
||||
.cell:last-child{
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
static/images/task/receive1.png
Normal file
BIN
static/images/task/receive1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
static/images/task/receive2.png
Normal file
BIN
static/images/task/receive2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user