[绑定关系,弹框]

This commit is contained in:
唐明明
2023-07-08 10:04:14 +08:00
parent cc5d559bef
commit f870682e25
12 changed files with 133 additions and 20 deletions

10
app.js
View File

@@ -5,7 +5,7 @@
import api from "api/index" import api from "api/index"
App({ App({
onLaunch() { onLaunch(options) {
// 检查用户登录状态 // 检查用户登录状态
const token = wx.getStorageSync("token") const token = wx.getStorageSync("token")
if(token){ if(token){
@@ -49,10 +49,10 @@ App({
wx.$api = api wx.$api = api
}, },
globalData: { globalData: {
isUser : false, isUser : false,
userInfo : null, userInfo : null,
barHeight: '', barHeight : '',
inviteText: '', // 邀请好友临时存储 inviteText : '', // 邀请好友临时存储
isExperience: '' // 体验官身份 isExperience: '' // 体验官身份
} }
}) })

View File

@@ -82,7 +82,7 @@ Page({
encryptedData : enData, encryptedData : enData,
iv : iv, iv : iv,
invite : getApp().globalData.inviteText || '', invite : getApp().globalData.inviteText || '',
is_experience : getApp().globalData.isExperience is_experience : getApp().globalData.isExperience || ''
}).then(res=>{ }).then(res=>{
// 存储登录信息 // 存储登录信息
wx.setStorage({ wx.setStorage({

View File

@@ -1,6 +1,5 @@
// pages/recruit/index.js // pages/recruit/index.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@@ -12,6 +11,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options)
if(options.invite != undefined) { if(options.invite != undefined) {
getApp().globalData.inviteText = options.invite getApp().globalData.inviteText = options.invite
} }
@@ -32,7 +32,10 @@ Page({
* 体验官首页 * 体验官首页
*/ */
recruitInfo() { recruitInfo() {
wx.$api.recruit.index().then(res => { wx.$api.recruit.index({
invite : getApp().globalData.inviteText || '',
is_experience : getApp().globalData.isExperience || ''
}).then(res => {
this.setData({ this.setData({
recruitData: res.data recruitData: res.data
}) })

View File

@@ -55,7 +55,7 @@
</block> </block>
<block wx:else> <block wx:else>
<image class="recruit-btn-img active" src="https://cdn.shuiganying.com/images/2023/07/07/327b691cd8129d8945790fd2e7c34497.png" mode="widthFix"></image> <image class="recruit-btn-img active" src="https://cdn.shuiganying.com/images/2023/07/07/327b691cd8129d8945790fd2e7c34497.png" mode="widthFix"></image>
<view class="recruit-btn-text">暂无申请权限</view> <view class="recruit-btn-text">暂无邀请人,无法申请体验</view>
</block> </block>
</view> </view>
<view class="reject-tips" bindtap="rejectGo" wx:if="{{recruitData.can.status == 3}}">查看驳回原因</view> <view class="reject-tips" bindtap="rejectGo" wx:if="{{recruitData.can.status == 3}}">查看驳回原因</view>

View File

@@ -127,7 +127,7 @@ Page({
siteform(e) { siteform(e) {
let value = e.detail.value let value = e.detail.value
let errMsg = '' let errMsg = ''
if(this.data.regiId === null) errMsg = "请选择区域" // if(this.data.regiId === null) errMsg = "请选择区域"
if(this.data.cityId === null || this.data.cityArr[this.data.cityIndex].experience_area_id === null) errMsg = "请选择城市" if(this.data.cityId === null || this.data.cityArr[this.data.cityIndex].experience_area_id === null) errMsg = "请选择城市"
if(this.data.typesArr[this.data.typesIndex].experience_type_id === null) errMsg = "请选择体验内容" if(this.data.typesArr[this.data.typesIndex].experience_type_id === null) errMsg = "请选择体验内容"
@@ -143,7 +143,7 @@ Page({
name : value.name, name : value.name,
address : value.address, address : value.address,
city_id : this.data.cityId, city_id : this.data.cityId,
district_id : this.data.regiId, // district_id : this.data.regiId,
experience_id : this.data.experienceId, experience_id : this.data.experienceId,
experience_area_id : this.data.cityArr[this.data.cityIndex].experience_area_id, experience_area_id : this.data.cityArr[this.data.cityIndex].experience_area_id,
experience_type_id : this.data.typesArr[this.data.typesIndex].experience_type_id experience_type_id : this.data.typesArr[this.data.typesIndex].experience_type_id

View File

@@ -1,4 +1,4 @@
{ {
"usingComponents": {}, "usingComponents": {},
"navigationBarTitleText": "申请体验" "navigationBarTitleText": "申请体验"
} }

View File

@@ -30,7 +30,7 @@
<image src="/static/icons/orderArrow.png"></image> <image src="/static/icons/orderArrow.png"></image>
</picker> </picker>
</view> </view>
<view class="site-input"> <!-- <view class="site-input">
<label>选择区域</label> <label>选择区域</label>
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiArr}}" range-key="name" class="conneColor"> <picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiArr}}" range-key="name" class="conneColor">
<view class="picker"> <view class="picker">
@@ -38,7 +38,7 @@
</view> </view>
<image src="/static/icons/orderArrow.png"></image> <image src="/static/icons/orderArrow.png"></image>
</picker> </picker>
</view> </view> -->
<view class="site-input"> <view class="site-input">
<input placeholder="请输入详细地址" name="address" type="text"></input> <input placeholder="请输入详细地址" name="address" type="text"></input>
</view> </view>
@@ -57,7 +57,7 @@
<view class="refertoEject {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'></view> <view class="refertoEject {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'></view>
<view class="refertoCont {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'> <view class="refertoCont {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'>
<image class="refertoCont-img" src="https://cdn.shuiganying.com/images/2023/07/07/0a62178990571065b1332066abdfa09f.png" mode="widthFix"></image> <image class="refertoCont-img" src="https://cdn.shuiganying.com/images/2023/07/07/0a62178990571065b1332066abdfa09f.png" mode="widthFix"></image>
<navigator class="refertoCont-name" hover-class="none" url="/pages/index/assess/assess?type=1" open-type="reLaunch">去面部检测 ></navigator> <navigator class="refertoCont-name" hover-class="none" url="/pages/index/assess/assess?type=1" open-type="redirectTo">去面部检测 ></navigator>
<image class="refertoCont-close" bindtap="refertoTap" src="https://cdn.shuiganying.com/images/2023/07/07/f9975891c1efa9b5fcd59fe33a75ed60.png" mode="widthFix"></image> <image class="refertoCont-close" bindtap="refertoTap" src="https://cdn.shuiganying.com/images/2023/07/07/f9975891c1efa9b5fcd59fe33a75ed60.png" mode="widthFix"></image>
</view> </view>

View File

@@ -33,15 +33,22 @@ Page({
buttonLeft: 100, buttonLeft: 100,
progress: 100, // 进度条的宽度这里的单位是px所以在wxml文件中要改为rpx progress: 100, // 进度条的宽度这里的单位是px所以在wxml文件中要改为rpx
precent: 50 // 这个是百分比 precent: 50, // 这个是百分比
refertoStatus: false
}, },
onLoad(options) { onLoad(options) {
console.log(options)
this.setData({ this.setData({
Type: options.type Type: options.type
}) })
if(this.data.Type == '1' || this.data.Type == '2') {
this.setData({
refertoStatus: true
})
}
this.setData({ this.setData({
imageId: options.image_id imageId: options.image_id
}) })
@@ -158,4 +165,13 @@ Page({
isFixedTop: parseInt(e.scrollTop) isFixedTop: parseInt(e.scrollTop)
}); });
}, },
/**
* 关闭弹框,跳转首页
*/
refertoTap() {
this.setData({
refertoStatus: false
})
}
}) })

View File

@@ -381,8 +381,7 @@
<!-- 按钮 --> <!-- 按钮 -->
<view class="footer {{footerPop ? 'active' : ''}}"> <view class="footer {{footerPop ? 'active' : ''}}">
<view class="footer-flex" wx:if="{{Type == '1' || Type == '2'}}"> <view class="footer-flex" wx:if="{{Type == '1' || Type == '2'}}">
<navigator hover-class="none" url="/pages/index/index" class="footer-flex-btn footer-flex-share" open-type="switchTab">返回首页</navigator> <navigator hover-class="none" url="/pages/recruit/index" class="footer-flex-btn footer-flex-share" open-type="switchTab">回到体验官</navigator>
<navigator hover-class="none" url="/pages/mall/index" open-type="switchTab" class="footer-flex-btn">产品推荐</navigator>
</view> </view>
<view class="footer-flex" wx:else> <view class="footer-flex" wx:else>
<navigator hover-class="none" url="../share/share" class="footer-flex-btn footer-flex-share">邀请好友</navigator> <navigator hover-class="none" url="../share/share" class="footer-flex-btn footer-flex-share">邀请好友</navigator>
@@ -390,3 +389,17 @@
</view> </view>
</view> </view>
</view> </view>
<view class="refertoEject {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'></view>
<view class="refertoCont {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'>
<view class="refertoCont-text">
<view class="refertoCont-title">温馨提示</view>
<image class="refertoCont-ls" src="/static/imgs/ls.png" mode="widthFix"></image>
<view class="refertoCont-tips">
您已经成功申请体验官请在收到产品后进行10天的打卡体验感谢您的支持
</view>
<view class="refertoCont-btn" bindtap="refertoTap">
我知道了
</view>
</view>
<!-- <image class="refertoCont-close" bindtap="refertoTap" src="https://cdn.shuiganying.com/images/2023/07/07/f9975891c1efa9b5fcd59fe33a75ed60.png" mode="widthFix"></image> -->
</view>

View File

@@ -617,3 +617,84 @@ page {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
} }
/* 弹出 */
.refertoEject {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .6);
z-index: 10000;
display: none;
}
.refertoEject.active {
display: block;
}
.refertoCont {
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100000;
padding: 0 15%;
box-sizing: border-box;
text-align: center;
display: none;
}
.refertoCont.active {
display: -webkit-box;
}
.refertoCont-text {
background-color: #ffffff;
border-radius: 20rpx;
padding: 60rpx 40rpx 40rpx;
box-sizing: border-box;
margin-bottom: 60rpx;
position: relative;
}
.refertoCont-ls {
position: absolute;
right: -80rpx;
top: -90rpx;
width: 250rpx;
}
.refertoCont-title {
text-align: left;
font-weight: 600;
font-size: 34rpx;
}
.refertoCont-tips {
line-height: 48rpx;
margin-top: 60rpx;
text-align: justify;
}
.refertoCont-btn{
background-image: linear-gradient(to bottom, #ffb70a, #ff7e1c);
color: #fff;
display: inline-block;
width: 100%;
border: 4rpx solid #ffffff;
line-height: 78rpx;
border-radius: 90rpx;
font-size: 28rpx;
margin: 40rpx 0 0;
}
.refertoCont-close {
width: 68rpx;
display: block;
margin: 0 auto;
}

View File

@@ -10,7 +10,7 @@
"list": [ "list": [
{ {
"name": "", "name": "",
"pathName": "pages/user/index", "pathName": "pages/report/detail/detail",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null

BIN
static/imgs/ls.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 KiB