Compare commits
5 Commits
jwl-dy
...
8f50f42f8c
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f50f42f8c | |||
| 65149c38cd | |||
| c26e306b3a | |||
| 9e24edad28 | |||
| 67b3e63de9 |
28
project.config.json
Normal file
28
project.config.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"appid": "wx24c1b58020a5ce66",
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "3.3.3",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"coverView": true,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"minified": true,
|
||||||
|
"enhance": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
7
project.private.config.json
Normal file
7
project.private.config.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
|
"projectname": "jwl-applet",
|
||||||
|
"setting": {
|
||||||
|
"compileHotReLoad": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,7 +15,11 @@ export function queryActivityDetail(data) {
|
|||||||
url: 'activity/applet/activity/detail',
|
url: 'activity/applet/activity/detail',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data,
|
data,
|
||||||
|
<<<<<<< HEAD
|
||||||
noToken: true
|
noToken: true
|
||||||
|
=======
|
||||||
|
noToken: true
|
||||||
|
>>>>>>> 9e24edad28eff09cb1c9d947314de6e4e3a33d19
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//查询抽奖次数
|
//查询抽奖次数
|
||||||
@@ -62,6 +66,7 @@ export function getLuckyRecord(data) {
|
|||||||
data,
|
data,
|
||||||
noToken: true
|
noToken: true
|
||||||
});
|
});
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询中奖记录
|
//查询中奖记录
|
||||||
@@ -72,4 +77,50 @@ export function canRecieveGift(data) {
|
|||||||
data,
|
data,
|
||||||
noToken: true
|
noToken: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询中奖信息
|
||||||
|
export function queryWinnerInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: 'activity/applet/activity/winner/info',
|
||||||
|
method: 'get',
|
||||||
|
data,
|
||||||
|
noToken: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询助力信息
|
||||||
|
export function queryHelpInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: 'activity/applet/activity/help/info',
|
||||||
|
method: 'get',
|
||||||
|
data,
|
||||||
|
noToken: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存助力信息
|
||||||
|
export function saveHelpInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: 'activity/applet/activity/help/save',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
noToken: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//微信登录获取手机号
|
||||||
|
export function wxLogin(data) {
|
||||||
|
return request({
|
||||||
|
url: 'activity/applet/activity/wx/login',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
noToken: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
}
|
||||||
|
>>>>>>> 9e24edad28eff09cb1c9d947314de6e4e3a33d19
|
||||||
|
|||||||
@@ -197,6 +197,13 @@
|
|||||||
"navigationBarTitleText" : "核销二维码",
|
"navigationBarTitleText" : "核销二维码",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/me/help",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "好友助力",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view style="padding-bottom: 50px;background-color: #9e0f00;">
|
<view style="padding-bottom: 50px;background-color: #9e0f00;">
|
||||||
<image class="wp100" mode="widthFix" src="https://jwl-jiakao-bq.oss-cn-hangzhou.aliyuncs.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/ggl_header.png"></image>
|
<image class="wp100" mode="widthFix" src="https://jwl-jiakao-bq.oss-cn-hangzhou.aliyuncs.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/ggl_header.png"></image>
|
||||||
<view class="tip">您今日还剩{{actiNum}}次刮奖机会,共有{{total}}人参加活动</view>
|
<view class="tip">您今日还剩{{actiNum}}次刮奖机会,共有{{total}}人参加活动</view>
|
||||||
<view class="scraping">
|
<view class="scraping">
|
||||||
<scraping-card style="z-index: 20;" :result="result" watermark="刮一刮" title="刮一刮赢取大奖" ref="reset" @complete="handleComplete" >
|
<scraping-card style="z-index: 20;" :result="result" watermark="刮一刮" title="刮一刮赢取大奖" ref="reset" @complete="handleComplete" >
|
||||||
@@ -123,9 +123,10 @@
|
|||||||
this.btnText = '再刮一次!'
|
this.btnText = '再刮一次!'
|
||||||
if(resp.code == 200) {
|
if(resp.code == 200) {
|
||||||
this.getActivityNum()
|
this.getActivityNum()
|
||||||
|
let help = ",完成助力即可领取奖品!"
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: `恭喜获得${this.result}`
|
title: `恭喜获得${this.result}` + help
|
||||||
})
|
})
|
||||||
this.showBtn = true
|
this.showBtn = true
|
||||||
}
|
}
|
||||||
@@ -136,6 +137,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: -80px;
|
margin-top: -80px;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- <view v-if="getLoading" class="wp100 relative" style="height: 100vh;">
|
<view v-if="getLoading" class="wp100 relative" style="height: 100vh;">
|
||||||
<image class="wp100" mode="widthFix"
|
<image class="wp100" mode="widthFix"
|
||||||
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E8%AF%95%E6%8F%90%E9%86%92_20230906135037.png">
|
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E8%AF%95%E6%8F%90%E9%86%92_20230906135037.png">
|
||||||
</image>
|
</image>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%87%91%E6%AD%A6%E8%81%94_20230831123333.png"
|
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%87%91%E6%AD%A6%E8%81%94_20230831123333.png"
|
||||||
mode="widthFix"></image>
|
mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view v-if="!getLoading">
|
<view v-if="!getLoading">
|
||||||
<!-- <j-navbar :isBack="false">金武联驾考</j-navbar> -->
|
<!-- <j-navbar :isBack="false">金武联驾考</j-navbar> -->
|
||||||
<u-sticky bgColor="#fff">
|
<u-sticky bgColor="#fff">
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
<<<<<<< HEAD
|
||||||
import {
|
import {
|
||||||
mapState,
|
mapState,
|
||||||
mapActions
|
mapActions
|
||||||
@@ -139,6 +140,140 @@
|
|||||||
})
|
})
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/activity?detailId=' + detailId,
|
url: '/pages/index/activity?detailId=' + detailId,
|
||||||
|
=======
|
||||||
|
import {
|
||||||
|
mapState,
|
||||||
|
mapActions
|
||||||
|
} from 'pinia' //引入映射函数
|
||||||
|
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||||
|
import useUserStore from '@/jtools/store/user'
|
||||||
|
import storage from '@/jtools/storage';
|
||||||
|
import {
|
||||||
|
querySysConfigList,
|
||||||
|
} from '@/jtools/api/question';
|
||||||
|
import Subject1 from "./components/Subject1";
|
||||||
|
import Subject2 from "./components/Subject2";
|
||||||
|
import {
|
||||||
|
queryActivityList,
|
||||||
|
} from '@/jtools/api/activity';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Subject1,
|
||||||
|
Subject2
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show:false,
|
||||||
|
subject: storage.get('curSubject') || '1',
|
||||||
|
curTab: 0,
|
||||||
|
searchValue: '',
|
||||||
|
cityName: '',
|
||||||
|
categoryList: [],
|
||||||
|
rightList: storage.get(`rightList_subject${this.subject}`) || [],
|
||||||
|
wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
|
||||||
|
activityList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png']
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.show=true
|
||||||
|
this.getSubjectConfig()
|
||||||
|
if (this.subject == '1' || this.subject == '4') {
|
||||||
|
this.rightList = storage.get(`rightList_subject${this.subject}`) || []
|
||||||
|
this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
|
||||||
|
}
|
||||||
|
if(this.subject=='2'||this.subject=='3'){
|
||||||
|
this.$refs.subjectRef.getDiverType()
|
||||||
|
}
|
||||||
|
this.queryActivityList();
|
||||||
|
},
|
||||||
|
onHide(){
|
||||||
|
this.show=false
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1","curSubject","orderQuestion_subject1","orderQuestion_subject4"]), //映射函数,取出tagslist
|
||||||
|
getLoading() {
|
||||||
|
return this.loading_subject4 && this.loading_subject1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
getLoading(newVal){
|
||||||
|
if(this.show){
|
||||||
|
if(newVal){
|
||||||
|
if(this.loading_subject4 && this.loading_subject1){
|
||||||
|
uni.hideTabBar();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showTabBar()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']),
|
||||||
|
//获取科目配置
|
||||||
|
getSubjectConfig() {
|
||||||
|
const carTypeId = storage.get('carType') || '1001'
|
||||||
|
querySysConfigList(carTypeId, 'Subject').then(resp => {
|
||||||
|
if (resp.code === '0000') {
|
||||||
|
this.categoryList = resp.data.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
name: item.configItemName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.subject=storage.get('curSubject') || '1',
|
||||||
|
this.curTab=this.categoryList.findIndex(item=>item.configItemCode==this.subject)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//切换科目
|
||||||
|
async changeCategory(val) {
|
||||||
|
this.subject = val.configItemCode
|
||||||
|
this.changeSubject(this.subject)
|
||||||
|
if (this.subject == '1' || this.subject == '4') {
|
||||||
|
this.rightList = storage.get(`rightList_subject${this.subject}`) || []
|
||||||
|
this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.subjectRef.getDiverType()
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//查询活动列表
|
||||||
|
queryActivityList(){
|
||||||
|
// console.log(this.user)
|
||||||
|
// console.log(useUserStore().userInfo)
|
||||||
|
// this.activityList = null;
|
||||||
|
// uni.request({
|
||||||
|
// url: 'http://localhost:8089/applet/activity/list',
|
||||||
|
// method: 'get',
|
||||||
|
// data: {'schoolId': useUserStore().userInfo.schoolId}
|
||||||
|
// }).then(resp => {
|
||||||
|
// console.log(".....")
|
||||||
|
// console.log(resp)
|
||||||
|
// if(resp.data.code == 200) {
|
||||||
|
// this.activityList = resp.data.data
|
||||||
|
// console.log("*****")
|
||||||
|
// console.log(resp.data)
|
||||||
|
// console.log(resp.data.data)
|
||||||
|
// console.log(this.activityList)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
queryActivityList({schoolId: this.user.schoolId}).then(resp => {
|
||||||
|
this.activityList = resp.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 去活动
|
||||||
|
handleToActivity(index) {
|
||||||
|
let detailId;
|
||||||
|
this.activityList.find((item, index1) => {
|
||||||
|
if(index === index1){
|
||||||
|
detailId = item.detailId;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/index/activity?detailId='+detailId,
|
||||||
|
>>>>>>> 9e24edad28eff09cb1c9d947314de6e4e3a33d19
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
305
src/pages/me/help.vue
Normal file
305
src/pages/me/help.vue
Normal file
@@ -0,0 +1,305 @@
|
|||||||
|
<template>
|
||||||
|
<view style="padding-bottom: 50px;background-color: #C5121B;">
|
||||||
|
<image class="wp100 img" mode="widthFix" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E5%8A%A9%E5%8A%9B%E4%B8%BB%E5%9B%BE.jpg"></image>
|
||||||
|
<view class="relative tip">邀请好友帮助你进行助力即可有机会领取奖品</view>
|
||||||
|
<view class="relative help_div">
|
||||||
|
<!-- -->
|
||||||
|
<view v-if="type == 1" class="relative help_card">
|
||||||
|
<view class="relative help_tip">
|
||||||
|
还差{{diffNum}}位好友助力即可领取奖品:
|
||||||
|
</view>
|
||||||
|
<view v-if="winnerInfo.awards != undefined" class="relative help_tip" style="font-size: 40rpx;">
|
||||||
|
{{winnerInfo.awards}}
|
||||||
|
</view>
|
||||||
|
<view class="help_list">
|
||||||
|
<view v-for="item in helpUserList" class="help_item">
|
||||||
|
<u-avatar class="help_item_avatar" :src="item.avatarUrl"></u-avatar>
|
||||||
|
|
||||||
|
<!-- <view class="help_item_2_yao">
|
||||||
|
<image :src="item.avatarUrl"></image>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view v-for="item in diffNum" class="help_item_2">
|
||||||
|
<view class="help_item_2_yao">邀</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="help_btn" >
|
||||||
|
<button open-type="share" class="help_btn_font"> 邀请好友助力</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="type == 2" class="relative help_card">
|
||||||
|
<view class="relative help_list" style="top: 200rpx;">
|
||||||
|
<view v-if="winnerInfo.activityName != undefined" class="help_tip" style="font-size: 40rpx; margin: 25rpx 0rpx;">
|
||||||
|
{{winnerInfo.activityName}}
|
||||||
|
</view>
|
||||||
|
<view v-if="winnerInfo.schoolName != undefined" class="help_tip">
|
||||||
|
举办单位:{{winnerInfo.schoolName}}
|
||||||
|
</view>
|
||||||
|
<view v-if="winnerInfo.awards != undefined" class="help_tip" style="font-size: 45rpx;margin: 25rpx 0rpx;">
|
||||||
|
奖品:{{winnerInfo.awards}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="help_btn" >
|
||||||
|
<button class="help_btn_font" open-type="chooseAvatar" @chooseavatar="handleHelp" :disabled="disBtn">帮好友助力</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import useUserStore from '@/jtools/store/user'
|
||||||
|
import { queryActivityDetail,queryHelpInfo, saveHelpInfo, queryWinnerInfo } from '@/jtools/api/activity'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
winnerId: undefined,
|
||||||
|
btnText: '点我刮奖',
|
||||||
|
showBtn: true,
|
||||||
|
helpUserList: [],
|
||||||
|
drawNum: 0,
|
||||||
|
diffNum: 3,
|
||||||
|
phone: undefined,
|
||||||
|
type: 2,
|
||||||
|
winnerInfo: undefined,
|
||||||
|
disBtn: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(op) {
|
||||||
|
|
||||||
|
this.winnerId = op.id
|
||||||
|
// this.type = op.type ? Number(op.type) : 1
|
||||||
|
this.phone = useUserStore().userInfo?.phone || undefined
|
||||||
|
console.log(this.phone)
|
||||||
|
this.getWinnerInfo()
|
||||||
|
this.getHelpInfo()
|
||||||
|
this.disBtn = false
|
||||||
|
|
||||||
|
},
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
if (res.from === 'button') {// 来自页面内分享按钮
|
||||||
|
console.log(res.target)
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
title: '我正在参与领奖活动柜,请帮我助力',
|
||||||
|
path: '/pages/me/help?id='+this.winnerId + '&type=2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
//查询中奖信息
|
||||||
|
getWinnerInfo(){
|
||||||
|
// uni.request({
|
||||||
|
// url: 'http://192.168.1.6:8089/applet/activity/winner/info?winnerId='+this.winnerId
|
||||||
|
// }).then(resp => {
|
||||||
|
// if(resp.data.code == 200) {
|
||||||
|
// console.log(resp)
|
||||||
|
// this.winnerInfo = resp.data.data;
|
||||||
|
// if(this.phone && this.winnerInfo.phone == this.phone){
|
||||||
|
// this.type == 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
queryWinnerInfo({winnerId : this.winnerId}).then(resp => {
|
||||||
|
if(resp.code == 200){
|
||||||
|
console.log(resp)
|
||||||
|
this.winnerInfo = resp.data;
|
||||||
|
if(this.phone && this.winnerInfo.phone == this.phone){
|
||||||
|
this.type = 1
|
||||||
|
} else {
|
||||||
|
this.type = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
//查询助力信息
|
||||||
|
getHelpInfo(){
|
||||||
|
// uni.request({
|
||||||
|
// url: 'http://192.168.1.6:8089/applet/activity/help/info?winnerId='+this.winnerId
|
||||||
|
// }).then(resp => {
|
||||||
|
// if(resp.data.code == 200) {
|
||||||
|
// console.log(resp)
|
||||||
|
// this.drawNum = resp.data.data.helpNum;
|
||||||
|
// this.helpUserList = resp.data.data.helpUsers
|
||||||
|
// this.diffNum = (this.drawNum - this.helpUserList.length) < 0 ? 0 : (this.drawNum - this.helpUserList.length);
|
||||||
|
// console.log(this.drawNum)
|
||||||
|
// console.log(this.diffNum)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
queryHelpInfo({winnerId : this.winnerId}).then(resp => {
|
||||||
|
if(resp.code == 200){
|
||||||
|
console.log(resp)
|
||||||
|
this.drawNum = resp.data.helpNum;
|
||||||
|
this.helpUserList = resp.data.helpUsers.map(item => ({
|
||||||
|
...item,
|
||||||
|
avatarUrl: 'https://jwl.ahduima.com' + item.avatarUrl
|
||||||
|
}));
|
||||||
|
this.diffNum = (this.drawNum - this.helpUserList.length) < 0 ? 0 : (this.drawNum - this.helpUserList.length);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击助力
|
||||||
|
handleHelp(e){
|
||||||
|
this.disBtn = false
|
||||||
|
console.log(e)
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin', //使用微信登录
|
||||||
|
success: (loginRes) => {
|
||||||
|
console.log(loginRes);
|
||||||
|
uni.uploadFile({
|
||||||
|
url: 'https://jwl.ahduima.com/activity/applet/activity/help/save',
|
||||||
|
// url: 'http://192.168.1.6:8089/applet/activity/help/save',
|
||||||
|
filePath: e.detail.avatarUrl,
|
||||||
|
name: 'file',
|
||||||
|
formData: {
|
||||||
|
'code': loginRes.code,
|
||||||
|
'winnerId': this.winnerId,
|
||||||
|
},
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
console.log(uploadFileRes.data);
|
||||||
|
let resp = JSON.parse(uploadFileRes.data);
|
||||||
|
console.log(resp);
|
||||||
|
|
||||||
|
if(resp.code == 200){
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: `助力成功`
|
||||||
|
})
|
||||||
|
this.disBtn = true
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: resp.msg
|
||||||
|
})
|
||||||
|
this.disBtn = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.img{
|
||||||
|
top: -130rpx !important;
|
||||||
|
}
|
||||||
|
.tip {
|
||||||
|
height: 75px;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FEFEFE;
|
||||||
|
line-height: 48px;
|
||||||
|
top: -520rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 35rpx;
|
||||||
|
}
|
||||||
|
.help_div{
|
||||||
|
width: 710rpx;
|
||||||
|
height: 996rpx;
|
||||||
|
top: -560rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
background: linear-gradient(0deg, #F33D2F 100%, rgba(197,18,27,0.01) 0%);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
|
||||||
|
|
||||||
|
.help_card{
|
||||||
|
width: 630rpx;
|
||||||
|
height: 886rpx;
|
||||||
|
margin: 0rpx 39rpx;
|
||||||
|
top: 55rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
|
||||||
|
.help_tip{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #010101;
|
||||||
|
line-height: 55rpx;
|
||||||
|
top: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help_list{
|
||||||
|
margin: 68rpx 25rpx 25rpx 20rpx;
|
||||||
|
height: 580rpx;
|
||||||
|
|
||||||
|
.help_item{
|
||||||
|
display: inline-block;
|
||||||
|
padding: 35rpx;
|
||||||
|
width: 194rpx;
|
||||||
|
height: 194rpx;
|
||||||
|
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
.help_item_avatar{
|
||||||
|
margin: auto;
|
||||||
|
width: 56rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
color: #CCCCCC;
|
||||||
|
background: #C42E13;
|
||||||
|
border: 4px solid #C42E13;
|
||||||
|
|
||||||
|
image{
|
||||||
|
height: 45px;
|
||||||
|
width: 45px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.help_item_2{
|
||||||
|
display: inline-block;
|
||||||
|
margin: 35rpx;
|
||||||
|
width: 124rpx;
|
||||||
|
height: 124rpx;
|
||||||
|
border: 2px dotted #CCCCCC;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
.help_item_2_yao{
|
||||||
|
margin: 34rpx 33rpx;
|
||||||
|
width: 56rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
font-size: 60rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #CCCCCC;
|
||||||
|
line-height: 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.help_btn{
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 75rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
width: 500rpx;
|
||||||
|
height: 86rpx;
|
||||||
|
background: linear-gradient(0deg, #DE4224 0%, #B81706 100%);
|
||||||
|
border-radius: 43rpx;
|
||||||
|
|
||||||
|
.help_btn_font{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 86rpx;
|
||||||
|
background: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -13,8 +13,10 @@
|
|||||||
<view>有效期至:{{ item.endTime }}</view>
|
<view>有效期至:{{ item.endTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ml20" style="width: 120rpx;">
|
<view class="ml20" style="width: 120rpx;">
|
||||||
<img v-if="item.status" src="/static/image/mine/writeoff.png" style="width: 120rpx;height: 120rpx;" />
|
<view v-if="item.status == 0" class="btn" @tap="handleHelp(item)">助力</view>
|
||||||
<view v-else class="btn" @tap="handleWriteoff(item)">核销</view>
|
<view v-else-if="item.status == 1" class="btn" @tap="handleWriteoff(item)">核销</view>
|
||||||
|
<img v-else-if="item.status == 2" src="/static/image/mine/writeoff.png" style="width: 120rpx;height: 120rpx;" />
|
||||||
|
<view v-else class="btn" @tap="handleWriteoff(item)">核销</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-list-item>
|
</u-list-item>
|
||||||
@@ -61,6 +63,11 @@
|
|||||||
url: `/pages/me/qrCode?id=${item.id}`
|
url: `/pages/me/qrCode?id=${item.id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleHelp(item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/me/help?id=${item.id}`
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user