[本时生活H5]

This commit is contained in:
2023-09-28 14:35:28 +08:00
parent f74b177f6d
commit 69824dedea
48 changed files with 9224 additions and 6635 deletions

View File

@@ -1,78 +1,116 @@
/** /**
* 手太欠 * 手太欠
* 愿这世界都如故事里一样 美好而动人~ * 愿这世界都如故事里一样 美好而动人~
*/ */
import request from '../request' import request from '../request'
// 月兑活动 - 首页 // 月兑活动 - 首页
const index = (data) => { const index = (data) => {
return request({ return request({
url: 'months' url: 'months'
}) })
} }
// 月兑活动 - 商品详情 // 月兑活动 - 商品详情
const details = (month_id) => { const details = (month_id) => {
return request({ return request({
url : "months/" + month_id url : "months/" + month_id
}) })
} }
// 月兑活动 - 确认订单 // 月兑活动 - 确认订单
const buy = (data) => { const buy = (data) => {
return request({ return request({
url : "months/buy", url : "months/buy",
data: data data: data
}) })
} }
// 月兑活动 - 提交订单 // 月兑活动 - 提交订单
const buySubmit = (data) => { const buySubmit = (data) => {
return request({ return request({
url : "months/buy", url : "months/buy",
method : "POST", method : "POST",
data : data data : data
}) })
} }
// 月兑活动 - 优惠券列表 // 月兑活动 - 优惠券列表
const logs = (data) => { const logs = (data) => {
return request({ return request({
url : "account/logs", url : "account/logs",
data : data data : data
}) })
} }
// 月兑活动 - 账变列表 // 月兑活动 - 账变列表
const coupon = (data) => { const coupon = (data) => {
return request({ return request({
url : "months/coupons", url : "months/coupons",
data : data data : data
}) })
} }
// 月兑活动 - 兑换列表 // 月兑活动 - 兑换列表
const monthsList = (category_id) => { const monthsList = (category_id) => {
return request({ return request({
url : "months/goods/" + category_id url : "months/goods/" + category_id
}) })
} }
// 月兑活动 - 兑换列表 // 月兑活动 - 兑换列表
const monthsChoose = (category_id) => { const monthsChoose = (category_id) => {
return request({ return request({
url : "months/category/" + category_id + "/choose" url : "months/category/" + category_id + "/choose"
}) })
} }
export { // 月兑活动 - 领取红包
index, const monthsPacket = (data) => {
details, return request({
buy, url : "months/red_packet",
buySubmit, data : data
coupon, })
logs, }
monthsList,
monthsChoose // 月兑活动 - 可用商家列表
const shopsUrl = (coupon_id, data) => {
return request({
url : "washcar/" + coupon_id + "/shops",
data : data
})
}
// 入库用户微信信息
const authInfo = (data) => {
return request({
url : "auth/info",
method : "POST",
data : data
})
}
// h5微信支付获取微信授权地址
const getAuthUrl = (data) => {
return request({
url : 'auth/get_auth_url',
data: data
})
}
export {
index,
details,
buy,
buySubmit,
coupon,
logs,
monthsList,
monthsChoose,
monthsPacket,
shopsUrl,
authInfo,
getAuthUrl
} }

View File

@@ -1,73 +1,84 @@
/** /**
* 手太欠 * 手太欠
* 愿这世界都如故事里一样 美好而动人~ * 愿这世界都如故事里一样 美好而动人~
*/ */
import request from '../request.js' import request from '../request.js'
// 活动权益内容 // 活动权益内容
const activity = (data) => { const activity = (data) => {
return request({ return request({
url: 'home', url: 'home',
data: data data: data
}) })
} }
// 钻石+白金权益内容 // 钻石+白金权益内容
const index = (data) => { const index = (data) => {
return request({ return request({
url: 'home/group', url: 'home/group',
data: data data: data
}) })
} }
// 周五福利日订阅 // 周五福利日订阅
const subscribe = (subscribe) => { const subscribe = (subscribe) => {
return request({ return request({
url: 'wechat/' + subscribe + "/welfare_subscribe", url: 'wechat/' + subscribe + "/welfare_subscribe",
method: "POST" method: "POST"
}) })
} }
// 所有城市-最新无字母 // 所有城市-最新无字母
const newCity = () => { const newCity = () => {
return request({ return request({
url: 'ajax/all_right_citys' url: 'ajax/all_right_citys'
}) })
} }
// 市区选择-最新无字母 // 市区选择-最新无字母
const newidxCity = (data) => { const newidxCity = (data) => {
return request({ return request({
url: 'ajax/all_right_children', url: 'ajax/all_right_children',
data: data data: data
}) })
} }
// h5掉起微信授权的前置获取相关的签名信息前置 // h5掉起微信授权的前置获取相关的签名信息前置
const subscribeUrl = (data) => { const subscribeUrl = (data) => {
return request({ return request({
url: 'auth/jssdk', url: 'auth/jssdk',
data: data data: data
}) })
} }
const subscribeH5 = (subscribe, channel) => { const subscribeH5 = (subscribe, channel) => {
return request({ return request({
url: "wechat/" + subscribe + "/welfare_subscribe", url: "wechat/" + subscribe + "/welfare_subscribe",
method: "POST", method: "POST",
data: { data: {
channel: 'h5' channel: 'h5'
} }
}) })
} }
export {
activity, // 营业厅列表
index, const hallsIndex = (data) => {
subscribe, return request({
newCity, url: "halls",
newidxCity, data: data
subscribeUrl, })
subscribeH5 }
export {
activity,
index,
subscribe,
newCity,
newidxCity,
subscribeUrl,
subscribeH5,
hallsIndex
} }

View File

@@ -1,419 +1,429 @@
/** /**
* 手太欠 * 手太欠
* 愿这世界都如故事里一样 美好而动人~ * 愿这世界都如故事里一样 美好而动人~
*/ */
import request from '../request.js' import request from '../request.js'
// 活动权益内容 // 活动权益内容
const index = () => { const index = () => {
return request({ return request({
url: 'user' url: 'user'
}) })
} }
// 卡券详情 // 卡券详情
const couponinfo = (data) => { const couponinfo = (data) => {
return request({ return request({
url: 'coupons/show', url: 'coupons/show',
data: data data: data
}) })
} }
// 卡券二维码 // 卡券二维码
const qrcode = (coupon_id) => { const qrcode = (coupon_id) => {
return request({ return request({
url: 'coupons/qrcode', url: 'coupons/qrcode',
data: { data: {
coupon_id coupon_id
} }
}) })
} }
// 卡券条形码 // 卡券条形码
const barcode = (coupon_id) => { const barcode = (coupon_id) => {
return request({ return request({
url: 'coupons/' + coupon_id + '/barcode' url: 'coupons/' + coupon_id + '/barcode'
}) })
} }
// 卡券列表 // 卡券列表
const coupon = (status) => { const coupon = (status) => {
return request({ return request({
url: 'coupons?status=' + status url: 'coupons?status=' + status
}) })
} }
// 卡券分组
const couponArr = (data) => {
return request({
url: 'coupons/list',
data: data
})
}
// 积分账变记录
const logs = (data) => {
return request({
url: 'account/logs',
data: data
})
}
// 订单收益列表
const profits = (data) => {
return request({
url: 'data/profits',
data: data
})
}
// 卡券分组 // 订单收益列表-下级明细
const couponArr = (data) => { const profitsNext = (data) => {
return request({ return request({
url: 'coupons/list', url: 'data/profitlogs',
data: data data: data
}) })
} }
// 积分账变记录 // 积分卡激活
const logs = (data) => { const cards = (data) => {
return request({ return request({
url: 'account/logs', url: 'user/cards/activate',
data: data method: "POST",
}) data: data
} })
}
// 订单收益列表
const profits = (data) => {
return request({
url: 'data/profits',
data: data
})
}
// 订单收益列表-下级明细
const profitsNext = (data) => {
return request({
url: 'data/profitlogs',
data: data
})
}
// 积分卡激活
const cards = (data) => {
return request({
url: 'user/cards/activate',
method: "POST",
data: data
})
}
// 冻结列表 // 冻结列表
const ungrants = (type) => { const ungrants = (type) => {
return request({ return request({
url: 'account/newungrants', url: 'account/newungrants',
data: { data: {
type type
} }
}) })
} }
// 冻结列表-最新
const ungrantsNew = (data) => {
return request({
url: 'account/unaccountgrants',
data: data
})
}
// 洗车券-获取跳转地址 // 洗车券-获取跳转地址
const washcarCoupon = (coupon) => { const washcarCoupon = (coupon) => {
return request({ return request({
url: 'washcar/' + coupon + "/info", url: 'washcar/' + coupon + "/info",
method: "POST" method: "POST"
}) })
} }
//权益商品订单列表 //权益商品订单列表
const orders = (data) => { const orders = (data) => {
return request({ return request({
url: 'orders/index', url: 'orders/index',
data: data data: data
}) })
} }
//权益订单列表 //权益订单列表
const ordersCoupons = (data) => { const ordersCoupons = (data) => {
return request({ return request({
url: 'orders/coupons', url: 'orders/coupons',
data: data data: data
}) })
} }
//取消兑换订单 //取消兑换订单
const cancel = (orderid) => { const cancel = (orderid) => {
return request({ return request({
url: 'orders/cancel?orderid=' + orderid, url: 'orders/cancel?orderid=' + orderid,
method: "POST" method: "POST"
}) })
} }
// 福利商品订单列表 // 福利商品订单列表
const welfare = (data) => { const welfare = (data) => {
return request({ return request({
url: 'welfares/orders', url: 'welfares/orders',
data: data data: data
}) })
} }
// 福利券订单列表 // 福利券订单列表
const welfareCoupons = (data) => { const welfareCoupons = (data) => {
return request({ return request({
url: 'welfares/coupons', url: 'welfares/coupons',
data: data data: data
}) })
} }
// 福利取消订单 // 福利取消订单
const welfaresCancel = (orderid) => { const welfaresCancel = (orderid) => {
return request({ return request({
url: 'welfares/orders/cancel?orderid=' + orderid, url: 'welfares/orders/cancel?orderid=' + orderid,
method: "POST" method: "POST"
}) })
}
//权益订单详情
const show = (orderid) => {
return request({
url: 'orders/show',
data: {
orderid
}
})
}
//周五福利订单详情
const welfaresShow = (orderid) => {
return request({
url: 'welfares/orders/show',
data: {
orderid
}
})
}
// 头像上传+昵称修改
const upload = (data) => {
return request({
url: 'user/setting/info',
method: "POST",
data: data
})
}
// 发送短信
const send = (data) => {
return request({
url: 'sms/send',
method: "POST",
data: data
})
}
// 设置支付密码
const setPassword = (data) => {
return request({
url: 'user/setting/set_password',
method: "POST",
data: data
})
} }
//权益订单详情 // 修改支付密码
const show = (orderid) => { const changePassword = (data) => {
return request({ return request({
url: 'orders/show', url: 'user/setting/change_password',
data: { method: "POST",
orderid data: data
} })
})
}
//周五福利订单详情
const welfaresShow = (orderid) => {
return request({
url: 'welfares/orders/show',
data: {
orderid
}
})
}
// 头像上传+昵称修改
const upload = (data) => {
return request({
url: 'user/setting/info',
method: "POST",
data: data
})
}
// 发送短信
const send = (data) => {
return request({
url: 'sms/send',
method: "POST",
data: data
})
}
// 设置支付密码
const setPassword = (data) => {
return request({
url: 'user/setting/set_password',
method: "POST",
data: data
})
}
// 修改支付密码
const changePassword = (data) => {
return request({
url: 'user/setting/change_password',
method: "POST",
data: data
})
}
// 重置支付密码
const resetPassword = (data) => {
return request({
url: 'user/setting/reset_password',
method: "POST",
data: data
})
}
//门店列表
const stores = (data) => {
return request({
url: 'coupons/new_stores',
method: "POST",
data: data
})
}
//门店详情
const storesShow = (data) => {
return request({
url: 'coupons/store/show',
data: data
})
}
//省市区
const areas = (psn) => {
return request({
url: 'areas/children?psn=' + psn
})
} }
// 重置支付密码
const resetPassword = (data) => {
return request({
url: 'user/setting/reset_password',
method: "POST",
data: data
})
}
//门店列表
const stores = (data) => {
return request({
url: 'coupons/new_stores',
method: "POST",
data: data
})
}
//门店详情
const storesShow = (data) => {
return request({
url: 'coupons/store/show',
data: data
})
}
//省市区
const areas = (psn) => {
return request({
url: 'areas/children?psn=' + psn
})
}
// 2021-07-28新增 // 2021-07-28新增
// 我的收益 // 我的收益
const myProfit = () => { const myProfit = () => {
return request({ return request({
url: 'data/index' url: 'data/index'
}) })
} }
// 我的收益-收益报表 // 我的收益-收益报表
const myIncome = (month) => { const myIncome = (month) => {
return request({ return request({
url: 'data/income', url: 'data/income',
data:{ data:{
month month
} }
}) })
}
// 我的收益-收益报表 + 我的收益-我的团队
const profitUrl = (url, data) => {
return request({
url: url,
data: data
})
}
// 提现前置账户信息
const withdraws = () => {
return request({
url: 'withdraws/create'
})
}
// 提现记录列表
const withdrawsList = (data) => {
return request({
url: 'user/withdraws',
data: data
})
}
// 提现表单填写
const withdrawsForm = (data) => {
return request({
url: 'withdraws',
method: "POST",
data: data
})
}
// 权益详细列表
const profitLogs = (data) => {
return request({
url: 'data/logs',
data: data
})
}
// 转账获取积分账户分类
const transfers = () => {
return request({
url: 'user/transfers'
})
} }
// 我的收益-收益报表 + 我的收益-我的团队 // 转账提交表单
const profitUrl = (url, data) => { const transfersForm = (data) => {
return request({ return request({
url: url, url: 'user/transfers',
data: data method: "POST",
}) data: data
})
} }
// 提现前置账户信息 // 校验转账的手机号码
const withdraws = () => { const ajaxTel = (mobile) => {
return request({ return request({
url: 'withdraws/create' url: 'ajax/user',
}) data: {
} mobile
}
// 提现记录列表 })
const withdrawsList = (data) => { }
return request({
url: 'user/withdraws', // 产品分享 - 新增
data: data const productList = (page) => {
}) return request({
} url: 'shares/goods',
data: {
// 提现表单填写 page
const withdrawsForm = (data) => { }
return request({ })
url: 'withdraws', }
method: "POST",
data: data const productInfo = (right) => {
}) return request({
} url: 'shares/goods/' + right
})
// 权益详细列表 }
const profitLogs = (data) => {
return request({ const productPoster = (right) => {
url: 'data/logs', return request({
data: data url: 'shares/goods/' + right + '/poster'
}) })
} }
// 转账获取积分账户分类 // 我的分享
const transfers = () => { const myshare = (data) => {
return request({ return request({
url: 'user/transfers' url: 'user/share',
}) data: data
} })
}
// 转账提交表单
const transfersForm = (data) => { // 产品分享二维码+储值分享二维码
return request({ const publicCode = (data) => {
url: 'user/transfers', return request({
method: "POST", url: 'user/share/goods',
data: data data: data
}) })
} }
// 校验转账的手机号码
const ajaxTel = (mobile) => {
return request({
url: 'ajax/user',
data: {
mobile
}
})
}
// 产品分享 - 新增
const productList = (page) => {
return request({
url: 'shares/goods',
data: {
page
}
})
}
const productInfo = (right) => {
return request({
url: 'shares/goods/' + right
})
}
const productPoster = (right) => {
return request({
url: 'shares/goods/' + right + '/poster'
})
}
// 我的分享
const myshare = (data) => {
return request({
url: 'user/share',
data: data
})
}
// 产品分享二维码+储值分享二维码
const publicCode = (data) => {
return request({
url: 'user/share/goods',
data: data
})
}
// 储值分享 // 储值分享
const storedList = () => { const storedList = () => {
return request({ return request({
url: 'shares/recharges' url: 'shares/recharges'
}) })
} }
export { export {
index, index,
couponinfo, couponinfo,
qrcode, qrcode,
barcode, barcode,
coupon, coupon,
couponArr, couponArr,
logs, logs,
profits, profits,
profitsNext, profitsNext,
cards, cards,
ungrants, ungrants,
washcarCoupon, ungrantsNew,
orders, washcarCoupon,
ordersCoupons, orders,
cancel, ordersCoupons,
welfare, cancel,
welfareCoupons, welfare,
welfaresCancel, welfareCoupons,
show, welfaresCancel,
welfaresShow, show,
upload, welfaresShow,
send, upload,
setPassword, send,
changePassword, setPassword,
resetPassword, changePassword,
stores, resetPassword,
storesShow, stores,
areas, storesShow,
myProfit, areas,
myIncome, myProfit,
profitUrl, myIncome,
withdraws, profitUrl,
withdrawsList, withdraws,
withdrawsForm, withdrawsList,
profitLogs, withdrawsForm,
transfers, profitLogs,
transfersForm, transfers,
ajaxTel, transfersForm,
productList, ajaxTel,
productInfo, productList,
productPoster, productInfo,
myshare, productPoster,
publicCode, myshare,
storedList publicCode,
storedList
} }

View File

@@ -1,140 +1,140 @@
/** /**
* 手太欠 * 手太欠
* 愿这世界都如故事里一样 美好而动人~ * 愿这世界都如故事里一样 美好而动人~
*/ */
import store from '@/store' import store from '@/store'
// 基础配置 // 基础配置
// https://lifetest.ysd-bs.com //测试地址 // https://lifetest.ysd-bs.com //测试地址
// https://card.ysd-bs.com // https://card.ysd-bs.com
const config = { const config = {
// apiUrl : 'https://lifetest.ysd-bs.com/api/', // apiUrl : 'https://lifetest.ysd-bs.com/api/', //测试地址
apiUrl : 'https://card.ysd-bs.com/api/', apiUrl : 'https://card.ysd-bs.com/api/', //正式地址
timeout: 60000 timeout: 60000
} }
let loginHintState = false let loginHintState = false
// 网络请求 // 网络请求
const request = (parameter) => { const request = (parameter) => {
// 检查url配置 // 检查url配置
if(parameter.url === 'undefined' || parameter.url === '') { if(parameter.url === 'undefined' || parameter.url === '') {
uni.showToast({ uni.showToast({
title: '请求地址不能为空', title: '请求地址不能为空',
icon : 'none' icon : 'none'
}) })
return return
} }
// 注入header // 注入header
config.header = { config.header = {
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': store.getters.getToken || '' 'Authorization': store.getters.getToken || ''
} }
// 请求实例 // 请求实例
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
url : config.apiUrl + parameter.url, url : config.apiUrl + parameter.url,
timeout : config.timeout, timeout : config.timeout,
header : config.header || {}, header : config.header || {},
data : parameter.data || {}, data : parameter.data || {},
method : parameter.method || 'GET', method : parameter.method || 'GET',
success: res => { success: res => {
if (res.header.Authorization) { if (res.header.Authorization) {
updateToken('token', res.header.Authorization) updateToken('token', res.header.Authorization)
} }
if (res.statusCode === 200) { if (res.statusCode === 200) {
const resolveData = res.data const resolveData = res.data
if(resolveData.status_code === 200) { if(resolveData.status_code === 200) {
resolve(resolveData.data) resolve(resolveData.data)
return return
} }
if (resolveData.status_code === 401) { if (resolveData.status_code === 401) {
loginHint() loginHint()
return return
} }
reject(resolveData) reject(resolveData)
return return
} }
errToast(res.statusCode) errToast(res.statusCode)
} }
}) })
}) })
} }
// 处理一些http请求错误提示 // 处理一些http请求错误提示
const errToast = (code) => { const errToast = (code) => {
switch (code){ switch (code){
case 404: case 404:
uni,uni.showToast({ uni,uni.showToast({
title: code + '接口不存在,请联系系统管理员', title: code + '接口不存在,请联系系统管理员',
icon : none icon : none
}) })
break; break;
case 405: case 405:
uni.showToast({ uni.showToast({
title: code + '请检查接口请求方式错误', title: code + '请检查接口请求方式错误',
icon :'none' icon :'none'
}) })
break; break;
case 500: case 500:
uni.showToast({ uni.showToast({
title: code + '服务端错误,请检查服务器信息', title: code + '服务端错误,请检查服务器信息',
icon : 'none' icon : 'none'
}) })
break; break;
} }
} }
// 更新token // 更新token
const updateToken = (token) => { const updateToken = (token) => {
store.commit('setToken', token) store.commit('setToken', token)
} }
// 处理登录提示 // 处理登录提示
const loginHint = () => { const loginHint = () => {
if(loginHintState) return if(loginHintState) return
if(!loginHintState) loginHintState = true if(!loginHintState) loginHintState = true
updateToken('') updateToken('')
uni.showModal({ uni.showModal({
title:'登录提示', title:'登录提示',
content:'您的登录信息已过期,请重新登录', content:'您的登录信息已过期,请重新登录',
confirmColor:'#33f800', confirmColor:'#33f800',
showCancel:false, showCancel:false,
success: res => { success: res => {
console.log(getApp().globalData.envType) console.log(getApp().globalData.envType)
loginHintState = false loginHintState = false
if(res.confirm){ if(res.confirm){
if(getApp().globalData.envType == 'campusEnv') { if(getApp().globalData.envType == 'campusEnv') {
uni.reLaunch({ uni.reLaunch({
url: '/pages/campus/signin' url: '/pages/campus/signin'
}) })
} else if(getApp().globalData.envType == 'oilEnv') { } else if(getApp().globalData.envType == 'oilEnv') {
uni.reLaunch({ uni.reLaunch({
url: '/pages/oil/signin' url: '/pages/oil/signin'
}) })
}else if(getApp().globalData.envType == 'unicomEnv') { }else if(getApp().globalData.envType == 'unicomEnv') {
uni.reLaunch({ uni.reLaunch({
url: '/pages/unicom/signin' url: '/pages/unicom/signin'
}) })
}else if(getApp().globalData.envType == 'drawEnv') { }else if(getApp().globalData.envType == 'drawEnv') {
uni.reLaunch({ uni.reLaunch({
url: '/pages/draw/signin' url: '/pages/draw/signin'
}) })
}else if(getApp().globalData.envType == 'giftPEnv') { }else if(getApp().globalData.envType == 'giftPEnv') {
uni.reLaunch({ uni.reLaunch({
url: '/pages/giftPack/signin' url: '/pages/giftPack/signin'
}) })
}else { }else {
uni.reLaunch({ uni.reLaunch({
url: '/pages/auth/login' url: '/pages/auth/login'
}) })
} }
} }
} }
}) })
} }
export default request export default request

View File

@@ -14,7 +14,6 @@ Vue.prototype.$wx = require('jweixin-module')
App.mpType = 'app' App.mpType = 'app'
// jsonp // jsonp
Vue.use(VueJsonp) Vue.use(VueJsonp)

View File

@@ -18,27 +18,29 @@
}, },
/* */ /* */
"modules" : { "modules" : {
"Payment" : {} "Payment" : {},
"Maps" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */
"android" : { "android" : {
"permissions" : [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
@@ -53,7 +55,13 @@
"UniversalLinks" : "" "UniversalLinks" : ""
} }
}, },
"ad" : {} "ad" : {},
"maps" : {
"amap" : {
"appkey_ios" : "73f1992898e143896d4529a8ffead6c3",
"appkey_android" : "73f1992898e143896d4529a8ffead6c3"
}
}
} }
} }
}, },

70
package-lock.json generated
View File

@@ -1,69 +1,35 @@
{ {
"name": "ysdH5",
"lockfileVersion": 3,
"requires": true, "requires": true,
"lockfileVersion": 1, "packages": {
"dependencies": { "": {
"encoding": { "dependencies": {
"version": "0.1.13", "@vuemap/amap-jsapi-loader": "^1.0.3",
"resolved": "https://registry.npmmirror.com/encoding/-/encoding-0.1.13.tgz", "jweixin-module": "^1.6.0",
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "vue-jsonp": "^2.0.0",
"requires": { "weixin-js-sdk": "^1.6.0"
"iconv-lite": "^0.6.2"
} }
}, },
"iconv-lite": { "node_modules/@vuemap/amap-jsapi-loader": {
"version": "0.6.3", "version": "1.0.3",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", "resolved": "https://registry.npmmirror.com/@vuemap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "integrity": "sha512-GdRWm7IAto18TJLySjm8JehNPlvYW8cNaqqnb1CQHvpr7k3zkGdvCrv+7H/Op1HaLMCt4LQsUjEAkiAqUfqZ7A=="
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
}, },
"is-stream": { "node_modules/jweixin-module": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ=="
},
"jweixin-module": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", "resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==" "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
}, },
"node-fetch": { "node_modules/vue-jsonp": {
"version": "1.7.3",
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-1.7.3.tgz",
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
"requires": {
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"vue-jsonp": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
}, },
"weixin-js-sdk": { "node_modules/weixin-js-sdk": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz", "resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
"integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ==" "integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
},
"wxjssdk": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/wxjssdk/-/wxjssdk-1.0.1.tgz",
"integrity": "sha512-tY69YisKIiG6jT0cnTIwTvK4I6ivF8iWXyq5tmgVULiyKPRAWRDEIwhWUdHi7NljN9PQeLOZudUaiIq4gGfefA==",
"requires": {
"node-fetch": "^1.6.3"
}
},
"wxjssdk-copy": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/wxjssdk-copy/-/wxjssdk-copy-1.4.1.tgz",
"integrity": "sha512-wTLfNrT7vIzsO4/YdalRCvErq/wD7pST1TOvWnOf00LvGHwqPcrm4ka3pYP0sI6sXDgfJh4HbjIcPgQTb20Gcg=="
} }
} }
} }

8
package.json Normal file
View File

@@ -0,0 +1,8 @@
{
"dependencies": {
"@vuemap/amap-jsapi-loader": "^1.0.3",
"jweixin-module": "^1.6.0",
"vue-jsonp": "^2.0.0",
"weixin-js-sdk": "^1.6.0"
}
}

View File

@@ -10,7 +10,7 @@
},{ },{
"path": "pages/giftPack/index", "path": "pages/giftPack/index",
"style": { "style": {
"navigationBarTitleText": "超级红包活动", "navigationBarTitleText": "联通合约送全额消费金",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@@ -64,10 +64,22 @@
"navigationBarTitleText": "重置密码", "navigationBarTitleText": "重置密码",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path" : "pages/giftPack/superRed",
"style" : {
"navigationBarTitleText": "领取消费金",
"enablePullDownRefresh": false
}
},{
"path" : "pages/giftPack/logsFrozen",
"style" : {
"navigationBarTitleText": "待发放",
"enablePullDownRefresh": false
}
},{ },{
"path" : "pages/giftPack/logs", "path" : "pages/giftPack/logs",
"style" : { "style" : {
"navigationBarTitleText": "积分记录", "navigationBarTitleText": "余额明细记录",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{ },{
@@ -417,7 +429,7 @@
},{ },{
"path": "pages/campus/index", "path": "pages/campus/index",
"style": { "style": {
"navigationBarTitleText": "校园迎新活动", "navigationBarTitleText": "消费金兑换活动",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@@ -445,7 +457,7 @@
},{ },{
"path": "pages/campus/signin", "path": "pages/campus/signin",
"style": { "style": {
"navigationBarTitleText": "校园迎新活动 登录", "navigationBarTitleText": "消费金兑换活动登录",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@@ -488,6 +500,12 @@
"navigationBarTitleText": "重置密码", "navigationBarTitleText": "重置密码",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path" : "pages/campus/campusPay",
"style" : {
"navigationBarTitleText": "收银台",
"enablePullDownRefresh": false
}
},{ },{
"path" : "pages/userGoods/index", "path" : "pages/userGoods/index",
"style" : { "style" : {
@@ -710,6 +728,12 @@
"navigationBarTitleText": "兑换成功", "navigationBarTitleText": "兑换成功",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path" : "pages/business/business",
"style" : {
"navigationBarTitleText": "附近营业厅",
"enablePullDownRefresh": false
}
} }
], ],
"tabBar": { "tabBar": {

View File

@@ -106,7 +106,12 @@
_this.disabled = true _this.disabled = true
} }
}, 1000) }, 1000)
}).catch(err=>{}) }).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
} }
}, },

273
pages/business/business.vue Normal file
View File

@@ -0,0 +1,273 @@
<template>
<view>
<view class="pack-center pages-hint showActive" v-if="showDt">
<image src="/static/img/null_icon.png"></image>
<view>查看附近营业厅需要获取您的地理位置</view>
<!-- <button class="location-btn" size="mini" open-type="openSetting">
开启定位服务
</button> -->
<view class="showActive-go" @tap="showTap">获取</view>
</view>
<view class="showDt" v-else>
<view class="top">
<view class="top-left nowrap">{{locationData.address}}</view>
<view class="top-picker">
<picker @change="screenOrders" :value="ordersIndex" :range-key="'name'" :range="ordersWay">
{{ ordersWay[ordersIndex].name }}
</picker>
<image class="profigReport-module-icon" src="/static/icon/arrow_down.png"></image>
</view>
</view>
<view class="list" v-if="cityList.length > 0">
<view class="item" v-for="(item, index) in cityList" :key="index">
<image :src="item.cover" mode="aspectFill" class="item-logo"></image>
<view class="item-cont">
<view class="item-name nowrap">{{item.title}}</view>
<view class="item-address nowrap">{{item.address}}</view>
<view class="item-distance nowrap">
<view class="item-distance-left">{{item.distance}}</view>
<view class="item-distance-go" @tap="siteMap(item.latitude, item.longitude)">去导航</view>
</view>
</view>
</view>
</view>
<!-- 暂无内容 -->
<view class="pack-center pages-hint" v-else>
<image src="/static/img/null_icon.png"></image>
<view>抱歉目前暂无内容~</view>
</view>
</view>
</view>
</template>
<script>
import { hallsIndex } from '@/apis/interfaces/index'
import QQMapWX from '@/utils/qqmap-wx-jssdk.min.js'
export default {
data() {
return {
showDt : false,
latitude : '',
longitude : '',
Distance : '',
locationData : '',
cityList : [], // 营业厅列表
qqMap: new QQMapWX({
key: '4KYBZ-LCAKF-QWOJN-NIDNZ-FZHLZ-2XFW7',
vm: this
}),
ordersIndex : 0,
ordersWay : [
{value: '', name: "全部"},
{value: '1000', name: "小于1000"},
{value: '2000', name: "小于2000"}
],
page : 1, //分页
lodingStats : false //加载状态
}
},
onLoad(e) {
if(this.latitude == '') {
this.showDt = true
}
},
onShow() {},
methods:{
showTap() {
this.showDt = false
// 获取定位 - 使用腾讯地图sdk
uni.getLocation({
success: res => {
// 调用接口
this.qqMap.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: locatRes => {
this.latitude = locatRes.result.location.lat
this.longitude = locatRes.result.location.lng
// 获取营业厅列表
this.regilist(this.latitude, this.longitude);
},
fail: res => {},
complete: res => {}
});
}
})
},
// 营业厅列表
regilist(page) {
hallsIndex({
user_lat: this.latitude,
user_lng: this.longitude,
distance: this.Distance,
page : page || ''
}).then(res=>{
let newStores = this.cityList,
newData = []
if(page == 1 || page == undefined) newStores = []
newData = newStores.concat(res.halls.data)
for(let val in res.halls.data){
let distance = res.halls.data[val].distance
if (distance > 1000) {
distance = parseFloat( distance / 1000).toFixed(2) + "km";
} else {
distance = parseFloat( distance).toFixed(2) + "m";
}
res.halls.data[val].distance = distance
}
this.cityList = newData
this.locationData = res.location
this.page = res.halls.page
this.lodingStats = false
uni.stopPullDownRefresh()
})
},
screenOrders(e) {
this.ordersIndex = e.detail.value
this.Distance = Number(this.ordersWay[this.ordersIndex].value)
// 营业厅列表
this.regilist();
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 营业厅列表
this.regilist();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 营业厅列表
this.regilist(pageNumber);
}
},
// 导航
siteMap(lat, long){
let key = '34ea3d2958aee3ffc154738551a976f9',//高德地图key
latitude = parseFloat(lat),
longitude = parseFloat(long)
window.location.href = "http://uri.amap.com/marker?position="+ longitude +","+latitude +"&name="+ name +"&coordinate=gaode&callnative=1";
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #f0f4fe;
}
.showActive {
z-index: 1;
}
.showActive-go {
display: inline-block;
background-color: #666c9f;
color: #ffffff;
border-radius: 10rpx;
height: 64rpx;
line-height: 64rpx;
padding: 0 60rpx;
font-size: 28rpx;
margin-top: 30rpx;
}
.top {
padding: 30rpx;
box-sizing: border-box;
display: flex;
}
.top-left {
flex: 1;
margin-right: 30rpx;
line-height: 64rpx;
}
.top-picker {
display: flex;
background-color: #ffffff;
line-height: 64rpx;
padding: 0 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
}
.profigReport-module-picker {
display: flex;
color: #797979;
font-size: 28rpx;
}
.profigReport-module-icon {
width: 28rpx;
height: 28rpx;
margin: 20rpx 0 0 10rpx;
}
.list {
padding: 0 30rpx 30rpx;
box-sizing: border-box;
}
.item {
background-color: #ffffff;
padding: 30rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin-bottom: 30rpx;
position: relative;
}
.item-logo {
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
}
.item-cont {
width: 100%;
position: absolute;
left: 0;
top: 0;
padding: 30rpx 30rpx 30rpx 240rpx;
box-sizing: border-box;
}
.item-name {
font-weight: 600;
font-size: 34rpx;
}
.item-address {
margin: 10rpx 0 30rpx;
}
.item-distance {
display: flex;
}
.item-distance-left {
flex: 1;
line-height: 58rpx;
}
.item-distance-go {
background-color: #666c9f;
color: #ffffff;
border-radius: 10rpx;
height: 58rpx;
line-height: 58rpx;
padding: 0 20rpx;
font-size: 26rpx;
}
</style>

File diff suppressed because it is too large Load Diff

692
pages/campus/campusPay.vue Normal file
View File

@@ -0,0 +1,692 @@
<template>
<view>
<view class="cashierTips">
<image src="/static/img/cashierTips_icon.png" mode="aspectFill"></image>推荐使用沃支付可在享优惠
</view>
<view class="cashierCont">
<view class="cashierCont-title">
<text>支付类型</text>线上支付
</view>
<view class="cashierCont-price">
<block v-if="this.defaultType == 'unicom'">
<view class="cashierCont-price-title">
中奖用户0元支付
</view>
<view class="cashierCont-price-title">
具体支付金额以页面显示为准
</view>
</block>
<block v-else>
<view class="cashierCont-price-title">
付款金额
</view>
<view class="cashierCont-price-number">
{{ defaultPrice }}
</view>
</block>
</view>
<view class="cashierCont-pay">
<view class="cashierCont-pay-title">
付款方式<text>*</text>
</view>
<view class="cashierCont-pay-way">
<radio-group @change="radioChange">
<view class="cashierCont-way-label cashierCont-way-unicom" :class="{active : current == 1}">
<view class="payContList-label-name">
<image class="payContList-label-img" src="/static/img/wqb.jpg"></image>
<text>沃支付支付</text>
</view>
<radio class="radio" value="1" checked></radio>
</view>
</radio-group>
</view>
<button class="payBtn" @tap="submitPay" :disabled="disabledOk">立即支付</button>
</view>
</view>
</view>
</template>
<script>
import { getAuthUrl, wpayH5Info, h5Pay } from '@/apis/interfaces/rights'
const jweixin = require('jweixin-module'); //获取微信支付
export default {
data() {
return {
defaultPrice : '', //支付金额
disabledOk : false, //支付按钮状态
current : 1, //支付下标
defaultNo : '', //权益订单编号
defaultType : '', //购买类型 school为校园活动 oil为中石油活动 default为洗车券+权益+周五福利 giftPEnv为月兑活动
activityType : '', //活动类型 welfare为周五福利日 right为权益
defaultDeliver : '' //提交方式 0为快递 1为自提
}
},
// 生命周期函数--监听页面加载
onLoad(options) {
// 判断是否微信授权登录过 只有外部游览器才用到(支付需要授权微信环境)
let status = navigator.userAgent.toLowerCase();
if (status.match(/MicroMessenger/i) == "micromessenger" && !options.code) {
let locationUrl = window.location.pathname.substr(1) + window.location.search
getAuthUrl(locationUrl).then(res=> {
window.location.href = res
})
}
this.openid = options.openid || ''
this.code = options.code || '' //用code换取oppid
// 页面跳转参数接收
this.defaultPrice = options.price
this.defaultNo = options.tradeNo
this.defaultType = options.type
this.activityType = options.activity_type
this.defaultDeliver = options.deliver
},
// 生命周期函数--监听页面显示
onShow() {
// 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv'
},
methods: {
// 支付方式选择
radioChange(e) {
this.current = e.detail.value
},
// 支付提交
submitPay() {
// this.current为1的时候为沃支付-直接跳转h5
if (this.current == 1) {
// const newUrl = "https://lifetest.ysd-bs.com/webunicom/payment?trade_no=" + this.defaultNo // 测试地址
const newUrl = "https://card.ysd-bs.com/webunicom/payment?trade_no=" + this.defaultNo // 正式地址
window.location.href = newUrl
}
// this.current为1的时候为微信支付
if (this.current == 2) {
// 调取微信支付
this.wechatPayment();
}
},
// 微信支付数据
wechatPayment() {
let status = navigator.userAgent.toLowerCase();
if (status.match(/MicroMessenger/i) == "micromessenger") {
// 微信浏览器-获取
this.wxBrowser();
}else {
// 普通浏览器(网址游览器)
this.outBrowser();
}
},
// 当支付环境为微信游览器情况下
wxBrowser() {
wpayH5Info({
url: location.href.split('#')[0],
list:'chooseWXPay'
}).then(wechatConfig => {
let wxConfig = JSON.parse(wechatConfig)
jweixin.config({
appId: wxConfig.appId,
debug: false,
jsApiList: wxConfig.jsApiList,
signature: wxConfig.signature,
nonceStr: wxConfig.nonceStr,
timestamp: wxConfig.timestamp
})
jweixin.ready(() => {
// activityType=right为权益 支付; activityType=welfare为周五福利日 支付
let wechaUrl = '' // 定义接口来源名称
if (this.activityType == 'welfare') wechaUrl = 'payments/welfare/wechat'// 周五福利日支付接口
if (this.activityType == 'right') wechaUrl = 'payments/wechat' //权益支付接口
h5Pay(wechaUrl, {
channel: 'h5',
trade_no: this.defaultNo,
code: this.code
}).then(wechatRes => {
let wechatPay = JSON.parse(wechatRes)
jweixin.chooseWXPay({
timestamp: wechatPay.timeStamp,
nonceStr: wechatPay.nonceStr,
package: wechatPay.package,
signType: wechatPay.signType,
paySign: wechatPay.paySign,
success: payRes => {
this.disabledOk = true
uni.showToast({
title: '支付成功',
icon : 'success'
})
// 校园活动成功跳转
if(this.defaultType == 'school') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/campus/myCoupon'
})
},3000)
}
// 中石油活动活动成功跳转
if(this.defaultType == 'oil') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/oil/myCoupon'
})
},3000)
}
// 中国联通回馈活动成功跳转
if(this.defaultType == 'unicom') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/unicom/index'
})
},3000)
}
// 月兑活动成功跳转
if(this.defaultType == 'giftPEnv') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/giftPack/index'
})
},3000)
}
// 洗车券+权益+福利成功跳转 获取
if(this.defaultType == 'default') {
this.successUrl();
}
},
cancel: () =>{
this.disabledOk = true
uni.showToast({
title: '取消支付',
icon : 'success'
})
// 校园活动失败跳转
if(this.defaultType == 'school') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/campus/index'
})
},3000)
}
// 中石油活动活动成功跳转
if(this.defaultType == 'oil') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/oil/index'
})
},3000)
}
// 月兑活动成功跳转
if(this.defaultType == 'giftPEnv') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/giftPack/index'
})
},3000)
}
// 中国联通回馈活动成功跳转
if(this.defaultType == 'unicom') {
setTimeout(()=>{
uni.reLaunch({
url: '/pages/unicom/index'
})
},3000)
}
// 洗车券+权益+福利失败跳转 获取
if(this.defaultType == 'default') {
this.failUrl();
}
}
})
})
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
if (!err.login) {
// 跳转校园活动登录页面
if (this.defaultType == 'school') {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/campus/signin'
});
}
}
})
}
// 跳转中石油活动登录页面
if (this.defaultType == 'oil') {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/oil/signin'
});
}
}
})
}
// 月兑活动成功跳转
if(this.defaultType == 'giftPEnv') {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/giftPack/signin'
});
}
}
})
}
// 中国联通回馈活动成功跳转
if (this.defaultType == 'unicom') {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/unicom/signin'
});
}
}
})
}
// 跳转本时生活平台登录页面
if (this.defaultType == 'default') {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/auth/login'
});
}
}
})
}
}
})
},
// 车券+权益+福利成功跳转 数据
successUrl() {
if(this.activityType == 'welfare'){
setTimeout(()=>{
if(this.defaultDeliver == 1) {
uni.reLaunch({
url: '/pages/order/order?orderType=welfareGoods'
})
} else {
uni.reLaunch({
url: '/pages/order/order?orderType=welfare'
})
}
},3000)
}
if(this.activityType == 'right'){
setTimeout(()=>{
if(this.defaultDeliver == 1) {
uni.reLaunch({
url: '/pages/order/order?orderType=rightsCoupons'
})
} else {
uni.reLaunch({
url: '/pages/order/order?orderType=rights'
})
}
},3000)
}
},
// 车券+权益+福利失败跳转 数据
failUrl() {
if(this.activityType == 'welfare'){
setTimeout(()=>{
if(this.defaultDeliver == 1) {
uni.reLaunch({
url: '/pages/order/order?orderType=welfareGoods&stateType=unpay'
})
} else {
uni.reLaunch({
url: '/pages/order/order?orderType=welfare&stateType=unpay'
})
}
},3000)
}
if(this.activityType == 'right'){
setTimeout(()=>{
if(this.defaultDeliver == 1) {
uni.reLaunch({
url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay'
})
} else {
uni.reLaunch({
url: '/pages/order/order?orderType=rights&stateType=unpay'
})
}
},3000)
}
},
// 当为外部游览器环境
outBrowser(){
wechatH5({
channel: 'mweb',
trade_no: this.defaultNo
}).then(mwebRes => {
let url = mwebRes
let newUrl = ''
// 校园活动购买
if(this.defaultType == 'school') {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/campus/myCoupon'
// #ifdef H5
window.location.href = newUrl
// #endif
}
// 中石油活动购买
if(this.defaultType == 'oil') {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/oil/myCoupon'
// #ifdef H5
window.location.href = newUrl
// #endif
}
// 月兑活动成功跳转
if(this.defaultType == 'giftPEnv') {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/giftPack/myCoupon'
// #ifdef H5
window.location.href = newUrl
// #endif
}
// 中国联通回馈活动购买
if(this.defaultType == 'unicom') {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/unicom/index'
// #ifdef H5
window.location.href = newUrl
// #endif
}
// 洗车券+权益+福利购买
if(this.defaultType == 'default') {
if (this.activityType == 'welfare') {
if (this.defaultDeliver == 1) {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/order/order?orderType=welfareGoods'
// #ifdef H5
window.location.href = newUrl
// #endif
} else {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/order/order?orderType=welfare'
// #ifdef H5
window.location.href = newUrl
// #endif
}
}
if (this.activityType == 'right') {
if (this.defaultDeliver == 1) {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/order/order?orderType=rightsCoupons'
// #ifdef H5
window.location.href = newUrl
// #endif
} else {
newUrl = url + '&redirect_url=' + window.location.protocol + '//' + window.location.host + '/pages/order/order?orderType=rights'
// #ifdef H5
window.location.href = newUrl
// #endif
}
}
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
// 跳转校园活动登录页面
if (this.defaultType == 'school') {
if (!err.login) {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.redirectTo({
url: '/pages/campus/signin'
});
}
}
})
}
}
// 跳转中石油活动登录页面
if (this.defaultType == 'oil') {
if (!err.login) {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.redirectTo({
url: '/pages/oil/signin'
});
}
}
})
}
}
// 月兑活动成功跳转
if(this.defaultType == 'giftPEnv') {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/giftPack/signin'
});
}
}
})
}
// 中国联通回馈活动登录页面
if (this.defaultType == 'unicom') {
if (!err.login) {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.redirectTo({
url: '/pages/unicom/signin'
});
}
}
})
}
}
// 跳转本时生活平台登录页面
if (this.defaultType == 'default') {
if (!err.login) {
uni.showModal({
title: '用户登录已过期',
content: '请重新登录',
showCancel: false,
success: res => {
if (res.confirm) {
uni.redirectTo({
url: '/pages/auth/login'
});
}
}
})
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #bc1d30;
padding: 40rpx;
box-sizing: border-box;
}
.cashierTips {
background-color: #FFFFFF;
font-weight: 600;
font-size: 30rpx;
border-radius: 10rpx;
margin-bottom: 40rpx;
line-height: 80rpx;
padding: 0 30rpx;
box-sizing: border-box;
color: #e69500;
display: flex;
image {
width: 32rpx;
height: 32rpx;
margin: 24rpx 10rpx 0 0;
}
}
.cashierCont {
width: 100%;
background-color: #ffffff;
padding: 30rpx;
box-sizing: border-box;
border-radius: 20rpx;
overflow: hidden;
}
.cashierCont-title text {
color: #7e7d81;
padding-right: 30rpx;
}
.cashierCont-price {
text-align: center;
margin: 90rpx 0;
color: #bc1d30;
}
.cashierCont-price-title {
font-size: 34rpx;
margin-bottom: 10rpx;
}
.cashierCont-price-number {
font-size: 60rpx;
}
.cashierCont-pay-title {
color: #7e7d81;
margin-bottom: 40rpx;
text{
color: #bc1d30;
padding-left: 10rpx;
}
}
.cashierCont-pay-way {
height: 240rpx;
}
.cashierCont-way-label {
float: left;
border: 2rpx solid #e8e8e8;
box-sizing: border-box;
padding: 30rpx 0;
border-radius: 10rpx;
width: calc(50% - 84rpx);
text-align: center;
margin: 0 40rpx;
font-size: 30rpx;
position: relative;
&.active {
border-color: #bc1d30;
color: #bc1d30;
box-shadow: 0 10rpx 20rpx rgba(188, 29, 48 ,.3);
}
radio {
opacity: 0;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
image {
width: 90rpx;
height: 90rpx;
display: block;
margin: 0 auto 20rpx;
}
}
.cashierCont-way-unicom {
width: calc(100% - 84rpx);
}
.payBtn {
background-color: #bc1d30;
color: #ffffff;
height: 90rpx;
line-height: 90rpx;
width: 100%;
font-size: 32rpx;
padding: 0;
border-radius: 80rpx;
margin: 80rpx 0 40rpx;
}
.payBtn[disabled] {
background: #eaeaea !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,109 +1,133 @@
<template> <template>
<view> <view>
<image class="campusBanner" src="/static/img/campusIdx_back.png" mode="widthFix"></image> <!-- <image class="campusBanner" src="/static/img/campusIdx_back.png" mode="widthFix"></image> -->
<view class="recommend"> <view class="bottomTop">
<navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="recommend-label" v-for="(item, index) in topData" :key="index"> <!-- 卡片轮播 -->
<view class="recommend-label-img"> <view class="indexBanner">
<image :src="item.cover" mode="aspectFill"></image> <view class="banner">
</view> <swiper class="banner-swiper" interval="5000" autoplay indicator-dots>
<view class="nowrap recommend-label-text"> <swiper-item >
{{ item.title }}<text>{{ item.name }}</text> <image class="banner-img" src="https://lifetest.ysd-bs.com/storage/materials/2023/09/20/微信图片_20230919170443.jpg"></image>
</view> </swiper-item>
</navigator> <swiper-item >
</view> <image class="banner-img" src="https://lifetest.ysd-bs.com/storage/materials/2023/09/20/微信图片_20230919170449.jpg"></image>
</swiper-item>
<!-- 电影券 --> <swiper-item >
<view class="film"> <image class="banner-img" src="https://lifetest.ysd-bs.com/storage/materials/2023/09/19/微信图片_20230919170456.jpg"></image>
<view class="filmTitle"> </swiper-item>
电影院优惠券 </swiper>
</view> </view>
<navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in filmData" :key="index"> </view>
<view class="filmList-top">
<view class="filmList-top-name"> <view class="recommend">
{{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text> <navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="recommend-label" v-for="(item, index) in topData" :key="index">
</view> <view class="recommend-label-img">
<view class="filmList-top-price"> <image :src="item.cover" mode="aspectFill"></image>
<view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view> </view>
<view v-if="item.button_text != null"> <view class="nowrap recommend-label-text">
<view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view> {{ item.title }}<text>{{ item.name }}</text>
</view> </view>
</view> </navigator>
</view> </view>
<view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<text>{{ items }}</text> <!-- 39元套餐包年兑换480元消费金 -->
</view> <view class="film">
</navigator> <view class="filmTitle">
</view> 39元套餐包年兑换480元消费金
</view>
<!-- 洗浴优惠券 --> <navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in filmData" :key="index">
<view class="film"> <view class="filmList-top">
<view class="filmTitle"> <view class="filmList-top-name">
洗浴优惠券 {{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text>
</view> </view>
<navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in bathData" :key="index"> <view class="filmList-top-price">
<view class="filmList-top"> <view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view>
<view class="filmList-top-name"> <view v-if="item.button_text != null">
{{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text> <view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view>
</view> </view>
<view class="filmList-top-price"> </view>
<view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view> </view>
<view v-if="item.button_text != null"> <view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view> <text>{{ items }}</text>
</view> </view>
</view> </navigator>
</view> </view>
<view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<text>{{ items }}</text> <!-- 59元套餐包年兑换720元消费金 -->
</view> <view class="film">
</navigator> <view class="filmTitle">
</view> 59元套餐包年兑换720元消费金
</view>
<!-- 超市券 --> <navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in bathData" :key="index">
<view class="film"> <view class="filmList-top">
<view class="filmTitle"> <view class="filmList-top-name">
超市券 {{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text>
</view> </view>
<navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in marketData" :key="index"> <view class="filmList-top-price">
<view class="filmList-top"> <view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view>
<view class="filmList-top-name"> <view v-if="item.button_text != null">
{{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text> <view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view>
</view> </view>
<view class="filmList-top-price"> </view>
<view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view> </view>
<view v-if="item.button_text != null"> <view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view> <text>{{ items }}</text>
</view> </view>
</view> </navigator>
</view> </view>
<view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<text>{{ items }}</text> <!-- 云盘套餐包年兑换180元消费金 -->
</view> <view class="film">
</navigator> <view class="filmTitle">
</view> 云盘套餐包年兑换180元消费金
</view>
<!-- 餐饮优惠券 --> <navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in marketData" :key="index">
<view class="film"> <view class="filmList-top">
<view class="filmTitle"> <view class="filmList-top-name">
餐饮优惠券 {{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text>
</view> </view>
<navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in repastData" :key="index"> <view class="filmList-top-price">
<view class="filmList-top"> <view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view>
<view class="filmList-top-name"> <view v-if="item.button_text != null">
{{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text> <view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view>
</view> </view>
<view class="filmList-top-price"> </view>
<view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view> </view>
<view v-if="item.button_text != null"> <view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view> <text>{{ items }}</text>
</view> </view>
</view> </navigator>
</view> </view>
<view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<text>{{ items }}</text> <!-- 99元套餐包年兑换960元消费金 -->
</view> <view class="film">
</navigator> <view class="filmTitle">
99元套餐包年兑换960元消费金
</view>
<navigator hover-class="none" :url="'/pages/campus/buy?id=' + item.activity_school_id" class="filmList" v-for="(item, index) in repastData" :key="index">
<view class="filmList-top">
<view class="filmList-top-name">
{{ item.three_title || '-' }}<text>{{ item.two_title || '-'}}</text>
</view>
<view class="filmList-top-price">
<view class="filmList-tag" v-if="item.label != null">{{item.label || '-'}}</view>
<view v-if="item.button_text != null">
<view v-for="(btnItem, btnIndex) in item.button_text" :key="btnIndex">{{btnItem}}</view>
</view>
</view>
</view>
<view class="filmList-text" v-for="(items, index) in item.description" :key="index">
<text>{{ items }}</text>
</view>
</navigator>
</view>
</view>
<!-- 按钮 --> <!-- 按钮 -->
<!-- 按钮 --> <view class="campusBtn">
<view class="campusBtn-go" @click="userNav('/pages/giftPack/superRed')">
领取消费金
</view>
</view>
</view> </view>
</template> </template>
@@ -186,11 +210,37 @@
.campusBanner { .campusBanner {
width: 100%; width: 100%;
} }
.indexBanner {
padding: 30rpx;
box-sizing: border-box;
}
.banner {
position: relative;
padding-top: 48%;
width: 100%;
background: white;
overflow: hidden;
z-index: 99;
border-radius: 10rpx;
.banner-swiper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.banner-img {
width: 100%;
height: 100%;
vertical-align: top;
}
}
}
// 推荐 // 推荐
.recommend { .recommend {
overflow: hidden; overflow: hidden;
overflow: hidden;
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
.recommend-label { .recommend-label {
@@ -306,18 +356,30 @@
} }
} }
// 按钮
.bottomTop {
border-bottom: 80rpx solid transparent;
}
// 按钮 .campusBtn {
.campusBtn { position: fixed;
background: linear-gradient(to right, #474d73, #28314e); width: 100%;
box-shadow: 0px 6px 10px rgba(188,152,90,.5); z-index: 9;
border-radius: 60rpx; bottom: 0;
line-height: 90rpx; left: 0;
height: 90rpx; padding:30rpx;
margin: 30rpx 60rpx 0; box-sizing: border-box;
text-align: center; background-color: #cbaf7f;
color: #FFFFFF; .campusBtn-go {
text { font-size: 36rpx;
color: #bd9045; text-align: center;
font-weight: 600;
line-height: 100rpx;
height: 100rpx;
color: #FFFFFF;
border-radius: 60rpx;
width: 100%;
background: linear-gradient(to right, #474d73, #28314e);
box-shadow: 0px 6px 10px rgba(188,152,90,.5);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
<template> <template>
<view class="content"> <view class="content">
<view class="campus-header"> <view class="campus-header">
<view class="logo"> <view class="logo">
<image src="/static/img/campusLogin_logo.png" mode="aspectFill"></image> <image src="/static/img/campusLogin_logo.png" mode="aspectFill"></image>
<view class="title">身份验证</view> <view class="title">身份验证</view>
</view> </view>
<image class="cover" src="/static/img/campusLogin_back_01.png" mode="aspectFill"></image> <image class="cover" src="/static/img/campus_nologo.png" mode="aspectFill"></image>
</view> </view>
<view class="campus-cont"> <view class="campus-cont">
<form @submit="forgetlogin"> <form @submit="forgetlogin">
<view class="campus-inputs"> <view class="campus-inputs">
<input class="campus-form-input" type="number" placeholder="请输入手机号" @input="getNameValue" name="mobile"></input> <input class="campus-form-input" type="number" placeholder="请输入手机号" @input="getNameValue" name="mobile"></input>
@@ -16,86 +16,86 @@
<input class="campus-form-input" type="number" placeholder="请输入验证码" @input="getCodeValue" maxlength="4"></input> <input class="campus-form-input" type="number" placeholder="请输入验证码" @input="getCodeValue" maxlength="4"></input>
<button class="campus-form-code" @tap="getCode" :disabled="disabled" hover-class="none">{{ codename }}</button> <button class="campus-form-code" @tap="getCode" :disabled="disabled" hover-class="none">{{ codename }}</button>
</view> </view>
<button class="campus-form-btn" form-type="submit">设置新密码</button> <button class="campus-form-btn" form-type="submit">设置新密码</button>
</form> </form>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { send, auth } from '@/apis/interfaces/auth' import { send, auth } from '@/apis/interfaces/auth'
export default { export default {
data() { data() {
return { return {
codename : '获取验证码', codename : '获取验证码',
mobileNo : '', // 手机号 mobileNo : '', // 手机号
code : '', // 验证码 code : '', // 验证码
disabled : false, disabled : false,
} }
}, },
methods: { methods: {
// 切换登录方式 // 切换登录方式
onCutLogin(){ onCutLogin(){
this.passwordLogin = !this.passwordLogin this.passwordLogin = !this.passwordLogin
}, },
// mobileNo // mobileNo
getNameValue(e) { getNameValue(e) {
this.mobileNo = e.detail.value this.mobileNo = e.detail.value
}, },
// 获取code // 获取code
getCode(){ getCode(){
let mobileNo = this.mobileNo, let mobileNo = this.mobileNo,
myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9]||16[0-9])\d{8}$$/ myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9]||16[0-9])\d{8}$$/
var _this = this var _this = this
if (mobileNo == "") { if (mobileNo == "") {
uni.showToast({ uni.showToast({
title : '手机号不能为空', title : '手机号不能为空',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else if (!myreg.test(mobileNo)) { }else if (!myreg.test(mobileNo)) {
uni.showToast({ uni.showToast({
title : '请输入正确的手机号', title : '请输入正确的手机号',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else{ }else{
send({mobile: mobileNo, channel: 'LOGIN'}).then(res=>{ send({mobile: mobileNo, channel: 'LOGIN'}).then(res=>{
uni.showToast({ uni.showToast({
title : '发送成功', title : '发送成功',
icon : 'success', icon : 'success',
duration: 2000 duration: 2000
}) })
var num = 61; var num = 61;
var timer = setInterval(function () { var timer = setInterval(function () {
num--; num--;
if (num <= 0) { if (num <= 0) {
clearInterval(timer); clearInterval(timer);
_this.codename = '重新发送' _this.codename = '重新发送'
_this.disabled = false _this.disabled = false
} else { } else {
_this.codename = num + "s后重新获取" _this.codename = num + "s后重新获取"
_this.disabled = true _this.disabled = true
} }
}, 1000) }, 1000)
}).catch(err=>{}) }).catch(err=>{})
} }
}, },
// 获取后输入code // 获取后输入code
getCodeValue (e) { getCodeValue (e) {
this.code = e.detail.value this.code = e.detail.value
}, },
// 立即登录 // 立即登录
forgetlogin(e){ forgetlogin(e){
let mobileNo = e.detail.value.mobile || '', let mobileNo = e.detail.value.mobile || '',
code = this.code || '' code = this.code || ''
auth({ auth({
@@ -113,8 +113,8 @@
icon : 'none' icon : 'none'
}) })
}) })
} }
} }
} }
</script> </script>

View File

@@ -5,7 +5,7 @@
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image> <image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
<view class="title">用户注册</view> <view class="title">用户注册</view>
</view> </view>
<image class="cover" src="@/static/img/campusLogin_back_01.png" mode="aspectFill"></image> <image class="cover" src="@/static/img/campus_nologo.png" mode="aspectFill"></image>
</view> </view>
<view class="campus-cont"> <view class="campus-cont">
<form @submit="submitRegister"> <form @submit="submitRegister">
@@ -29,71 +29,71 @@
</view> </view>
</template> </template>
<script> <script>
import { send, register } from '@/apis/interfaces/auth' import { send, register } from '@/apis/interfaces/auth'
export default { export default {
data() { data() {
return { return {
codename : '获取验证码', codename : '获取验证码',
mobileNo : '', // 手机号 mobileNo : '', // 手机号
code : '', // 验证码 code : '', // 验证码
disabled : false, disabled : false,
} }
}, },
methods: { methods: {
// mobileNo // mobileNo
getNameValue(e) { getNameValue(e) {
this.mobileNo = e.detail.value this.mobileNo = e.detail.value
}, },
// 获取code // 获取code
getCode(){ getCode(){
let mobileNo = this.mobileNo let mobileNo = this.mobileNo
var _this = this var _this = this
if (mobileNo == "") { if (mobileNo == "") {
uni.showToast({ uni.showToast({
title : '手机号不能为空', title : '手机号不能为空',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else{ }else{
send({mobile: mobileNo, channel: 'LOGIN'}).then(res=>{ send({mobile: mobileNo, channel: 'LOGIN'}).then(res=>{
uni.showToast({ uni.showToast({
title : '发送成功', title : '发送成功',
icon : 'success', icon : 'success',
duration: 2000 duration: 2000
}) })
var num = 61; var num = 61;
var timer = setInterval(function () { var timer = setInterval(function () {
num--; num--;
if (num <= 0) { if (num <= 0) {
clearInterval(timer); clearInterval(timer);
_this.codename = '重新发送' _this.codename = '重新发送'
_this.disabled = false _this.disabled = false
} else { } else {
_this.codename = num + "s后重新获取" _this.codename = num + "s后重新获取"
_this.disabled = true _this.disabled = true
} }
}, 1000) }, 1000)
}).catch(err=>{ }).catch(err=>{
uni.showToast({ uni.showToast({
title : err.message, title : err.message,
icon :'none', icon :'none',
duration: 2000 duration: 2000
}) })
}) })
} }
}, },
// 获取后输入code // 获取后输入code
getCodeValue (e) { getCodeValue (e) {
this.code = e.detail.value this.code = e.detail.value
}, },
// 立即登录 // 立即登录
submitRegister(e){ submitRegister(e){
let formValue = e.detail.value let formValue = e.detail.value
@@ -124,8 +124,8 @@
icon : 'none' icon : 'none'
}) })
}) })
} }
} }
} }
</script> </script>

View File

@@ -1,13 +1,13 @@
<template> <template>
<view class="content"> <view class="content">
<view class="campus-header"> <view class="campus-header">
<view class="logo"> <view class="logo">
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image> <image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
<view class="title">设置新密码</view> <view class="title">设置新密码</view>
</view> </view>
<image class="cover" src="@/static/img/campusLogin_back_01.png" mode="aspectFill"></image> <image class="cover" src="@/static/img/campus_nologo.png" mode="aspectFill"></image>
</view> </view>
<view class="campus-cont"> <view class="campus-cont">
<form @submit="forgetlogin"> <form @submit="forgetlogin">
<view class="campus-inputs"> <view class="campus-inputs">
<input class="campus-form-input" type="password" placeholder="设置新的登录密码" name="password"></input> <input class="campus-form-input" type="password" placeholder="设置新的登录密码" name="password"></input>
@@ -15,23 +15,23 @@
<view class="campus-inputs"> <view class="campus-inputs">
<input class="campus-form-input" type="password" placeholder="确认新的登录密码" name="newpassword"></input> <input class="campus-form-input" type="password" placeholder="确认新的登录密码" name="newpassword"></input>
</view> </view>
<button class="campus-form-btn" form-type="submit">找回</button> <button class="campus-form-btn" form-type="submit">找回</button>
</form> </form>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { passSetup } from '@/apis/interfaces/auth' import { passSetup } from '@/apis/interfaces/auth'
export default { export default {
data() { data() {
return { return {
} }
}, },
methods: { methods: {
// 立即登录 // 立即登录
forgetlogin(e){ forgetlogin(e){
let newPass = e.detail.value.newpassword || '', let newPass = e.detail.value.newpassword || '',
password = e.detail.value.password || '' password = e.detail.value.password || ''
passSetup({ passSetup({
@@ -51,8 +51,8 @@
icon : 'none' icon : 'none'
}) })
}) })
} }
} }
} }
</script> </script>

View File

@@ -1,13 +1,13 @@
<template> <template>
<view class="content"> <view class="content">
<view class="campus-header"> <view class="campus-header">
<view class="logo"> <view class="logo">
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image> <image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
<view class="title">中石油活动登录</view> <view class="title">消费金兑换活动登录</view>
</view> </view>
<image class="cover" src="@/static/img/campusLogin_back_01.png" mode="aspectFill"></image> <image class="cover" src="@/static/img/campus_nologo.png" mode="aspectFill"></image>
</view> </view>
<view class="campus-cont"> <view class="campus-cont">
<form @submit="forgetlogin"> <form @submit="forgetlogin">
<view class="campus-inputs"> <view class="campus-inputs">
<image class="campus-form-icon" src="/static/img/campus_login_02.png" mode="aspectFill"></image> <image class="campus-form-icon" src="/static/img/campus_login_02.png" mode="aspectFill"></image>
@@ -25,91 +25,91 @@
<view class="resPassword"> <view class="resPassword">
<navigator url="./password">忘记密码</navigator> <navigator url="./password">忘记密码</navigator>
</view> </view>
<button class="campus-form-btn" form-type="submit">登录</button> <button class="campus-form-btn" form-type="submit">登录</button>
</form> </form>
<view class="login-box"> <view class="login-box">
<view @click="onCutLogin">{{passwordLogin ? '验证码登录': '密码登录'}}</view> <view @click="onCutLogin">{{passwordLogin ? '验证码登录': '密码登录'}}</view>
<navigator url="./register">快速注册</navigator> <navigator url="./register">快速注册</navigator>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { send, auth, passlogin } from '@/apis/interfaces/auth' import { send, auth, passlogin } from '@/apis/interfaces/auth'
export default { export default {
data() { data() {
return { return {
codename : '获取验证码', codename : '获取验证码',
mobileNo : '', // 手机号 mobileNo : '', // 手机号
code : '', // 验证码 code : '', // 验证码
passwordLogin: false, // 登录方式 passwordLogin: true, // 登录方式
disabled : false, disabled : false,
} }
}, },
methods: { methods: {
// 切换登录方式 // 切换登录方式
onCutLogin(){ onCutLogin(){
this.passwordLogin = !this.passwordLogin this.passwordLogin = !this.passwordLogin
}, },
// mobileNo // mobileNo
getNameValue(e) { getNameValue(e) {
this.mobileNo = e.detail.value this.mobileNo = e.detail.value
}, },
// 获取code // 获取code
getCode(){ getCode(){
let mobileNo = this.mobileNo, let mobileNo = this.mobileNo,
myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9]|16[0-9])\d{8}$$/ myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9]|16[0-9])\d{8}$$/
var _this = this var _this = this
if (mobileNo == "") { if (mobileNo == "") {
uni.showToast({ uni.showToast({
title : '手机号不能为空', title : '手机号不能为空',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else if (!myreg.test(mobileNo)) { }else if (!myreg.test(mobileNo)) {
uni.showToast({ uni.showToast({
title : '请输入正确的手机号', title : '请输入正确的手机号',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else{ }else{
send({mobile: mobileNo, channel: 'LOGIN'}).then(res=>{ send({mobile: mobileNo, channel: 'LOGIN'}).then(res=>{
uni.showToast({ uni.showToast({
title : '发送成功', title : '发送成功',
icon : 'success', icon : 'success',
duration: 2000 duration: 2000
}) })
var num = 61; var num = 61;
var timer = setInterval(function () { var timer = setInterval(function () {
num--; num--;
if (num <= 0) { if (num <= 0) {
clearInterval(timer); clearInterval(timer);
_this.codename = '重新发送' _this.codename = '重新发送'
_this.disabled = false _this.disabled = false
} else { } else {
_this.codename = num + "s后重新获取" _this.codename = num + "s后重新获取"
_this.disabled = true _this.disabled = true
} }
}, 1000) }, 1000)
}).catch(err=>{}) }).catch(err=>{})
} }
}, },
// 获取后输入code // 获取后输入code
getCodeValue (e) { getCodeValue (e) {
this.code = e.detail.value this.code = e.detail.value
}, },
// 立即登录 // 立即登录
forgetlogin(e){ forgetlogin(e){
let mobileNo = e.detail.value.mobile || '', let mobileNo = e.detail.value.mobile || '',
code = this.code || '', code = this.code || '',
password = e.detail.value.password || '', password = e.detail.value.password || '',
loginFunction loginFunction
@@ -138,8 +138,8 @@
icon : 'none' icon : 'none'
}) })
}) })
} }
} }
} }
</script> </script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -48,41 +48,31 @@
<image src="/static/icon/arrow_left.png"></image> <image src="/static/icon/arrow_left.png"></image>
</navigator> </navigator>
</view> </view>
<view class="location" v-if="longitude == 0 && latitude == 0"> <block v-if="stores.length > 0">
<image class="location-img" src="/static/img/location_img.jpg"></image> <view class="detailsStore-list" :data-id="(item.store_id)" v-for="(item, index) in stores" :key="index"
<text>您尚未授权本时生活开启定位服务</text> @tap="detailsTap">
<text>不能看到附近的商家哦点击下方按钮开启</text> <image :src="item.cover" class="detailsStore-logo"></image>
<button class="location-btn" size="mini" open-type="openSetting"> <view class="detailsStore-cont">
开启定位服务 <view class="detailsStore-left">
</button> <view class="nowrap detailsStore-name">
</view> {{ item.title }}
<view v-else> </view>
<block v-if="stores.length > 0"> <view class="detailsStore-place">
<view class="detailsStore-list" :data-id="(item.store_id)" v-for="(item, index) in stores" :key="index" <text class="nowrap">{{ item.address }}</text>
@tap="detailsTap"> {{ item.km }}
<image :src="item.cover" class="detailsStore-logo"></image> </view>
<view class="detailsStore-cont"> </view>
<view class="detailsStore-left"> <image class="detailsStore-tel" src="/static/icon/tel.png" @tap.stop="tel"
<view class="nowrap detailsStore-name"> :data-tel="(item.mobile)"></image>
{{ item.title }} </view>
</view> </view>
<view class="detailsStore-place"> </block>
<text class="nowrap">{{ item.address }}</text> <block v-else>
{{ item.km }} <view class="pages-hint">
</view> <image src="/static/img/null_icon.png"></image>
</view> <view>暂无门店</view>
<image class="detailsStore-tel" src="/static/icon/tel.png" @tap.stop="tel" </view>
:data-tel="(item.mobile)"></image> </block>
</view>
</view>
</block>
<block v-else>
<view class="pages-hint">
<image src="/static/img/null_icon.png"></image>
<view>暂无门店</view>
</view>
</block>
</view>
</view> </view>
</view> </view>
<!-- 使用须知 --> <!-- 使用须知 -->
@@ -113,7 +103,6 @@
<view class="detailsBottom-title"> <view class="detailsBottom-title">
超级红包活动 超级红包活动
</view> </view>
亿时代 - 本时生活
</view> </view>
</view> </view>
</view> </view>
@@ -183,7 +172,9 @@
// 存储环境-月兑活动 // 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv' getApp().globalData.envType = 'giftPEnv'
// 获取定位信息 // 获取定位信息
uni.getLocation({ uni.getLocation({
success: res => { success: res => {
@@ -204,7 +195,6 @@
user_lng: this.longitude, user_lng: this.longitude,
user_lat: this.latitude user_lat: this.latitude
}).then(res=>{ }).then(res=>{
console.log(res)
let stores = res.stores let stores = res.stores
stores.map(res=>{ stores.map(res=>{
let distance = res.distance let distance = res.distance

View File

@@ -1,10 +1,19 @@
<template> <template>
<view class="content"> <view class="content">
<view class="content-border"> <view class="content-border">
<view v-for="(item, idx) in adverts" :key="item.cover">
<image class="campusBanner" :src="item.cover" mode="widthFix"></image> <!-- 卡片轮播 -->
</view> <view class="indexBanner">
<view class="recommend"></view> <view class="banner">
<swiper class="banner-swiper" interval="5000" autoplay indicator-dots>
<swiper-item v-for="(item, idx) in adverts" :key="item.cover">
<image class="banner-img" :src="item.cover"></image>
</swiper-item>
</swiper>
</view>
</view>
<!-- <view class="recommend"></view> -->
<!-- tab --> <!-- tab -->
<view class="indexTab"> <view class="indexTab">
<view class="indexTab-item" :class="{active : tabType == item.used}" @tap="orderTab" v-for="(item, index) in tabList" :key="index" :data-state="(item.used)"> <view class="indexTab-item" :class="{active : tabType == item.used}" @tap="orderTab" v-for="(item, index) in tabList" :key="index" :data-state="(item.used)">
@@ -74,8 +83,8 @@
<view class="couponItem"> <view class="couponItem">
<view class="couponItem-cont"> <view class="couponItem-cont">
<view class="couponItem-top"> <view class="couponItem-top">
<view class="couponItem-cont-number"> <view class="couponItem-cont-image">
<text>{{item.price}}</text> <image :src="item.cover" mode="widthFix"></image>
</view> </view>
<view class="couponItem-cont-name"> <view class="couponItem-cont-name">
<view class="nowrap couponItem-cont-title"> <view class="nowrap couponItem-cont-title">
@@ -86,9 +95,9 @@
</view> </view>
</view> </view>
</view> </view>
<navigator class="couponItem-btn" hover-class="none" :url="'/pages/giftPack/details?id=' + item.id"> <view class="couponItem-btn" @click="couponUrl(item.id, item.from)">
立即使用 立即使用
</navigator> </view>
</view> </view>
<view class="couponItem-cont-text" v-if="item.couponShow"> <view class="couponItem-cont-text" v-if="item.couponShow">
<rich-text :nodes="item.remark"></rich-text> <rich-text :nodes="item.remark"></rich-text>
@@ -130,8 +139,7 @@
</view> </view>
</navigator> </navigator>
</view> </view>
<!-- 是否兑换弹出 --> <!-- 是否兑换弹出 -->
<view class="tipsBack" v-if="generalShow"></view> <view class="tipsBack" v-if="generalShow"></view>
<view class="tipsCont" v-if="generalShow"> <view class="tipsCont" v-if="generalShow">
@@ -157,12 +165,13 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { index, coupon, monthsChoose } from '@/apis/interfaces/giftPack' const jweixin = require('jweixin-module');
import { index, coupon, monthsChoose, shopsUrl, getAuthUrl, authInfo } from '@/apis/interfaces/giftPack'
import AMapLoader from '@vuemap/amap-jsapi-loader';
export default { export default {
data() { data() {
return { return {
@@ -172,11 +181,13 @@
couponArr : [], couponArr : [],
numbers : '', numbers : '',
count : '', count : '',
openId : '',
codeData : '',
//Tab列表 //Tab列表
tabList : [ tabList : [
{ title : "可兑换", used: 0 }, { title : "可兑换", used: 0 },
{ title : "已兑换", used: 1 } // { title : "已兑换", used: 1 }
], ],
tabType : 0, //卡券状态 tabType : 0, //卡券状态
generalId : '', //卡券id generalId : '', //卡券id
@@ -185,10 +196,46 @@
}, },
// 生命周期函数--监听页面加载 // 生命周期函数--监听页面加载
onLoad(options) {}, onLoad(options) {
if(options != ''){
this.codeData = options.code || '';
}
// 获取首页数据
this.indexInfo()
// window.location.href = "https://www.amap.com/search?query=%E8%9E%8D%E5%88%9B%E4%B9%90%E5%9B%AD&city=230100&geoobj=126.150528%7C45.61094%7C127.139298%7C46.008671&zoom=11"
// Key
// 秘钥73f1992898e143896d4529a8ffead6c3
// 开发文档:
// AMapLoader.load({
// key: "34ea3d2958aee3ffc154738551a976f9"
// }).then(AMap => {
// console.log(this.$refs.amap)
// let aMap = new AMap.Map('amap', {
// zoom:11,//级别
// center: [116.397428, 39.90923],//中心点坐标
// viewMode:'3D'//使用3D视图
// })
// console.log(AMap)
// }).catch(err => {
// console.log(err)
// })
},
// 生命周期函数--监听页面显示 // 生命周期函数--监听页面显示
onShow() { onShow() {
console.log(this.codeData)
// 存储环境-月兑活动 // 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv' getApp().globalData.envType = 'giftPEnv'
@@ -196,9 +243,15 @@
this.isUser = true this.isUser = true
} }
// 获取首页数据 if(this.codeData != ''){
this.indexInfo() authInfo({
code: this.codeData
}).then(res=>{
// 获取首页数据
this.indexInfo()
}).catch(err=>{})
}
}, },
methods: { methods: {
// 首页数据 // 首页数据
@@ -210,12 +263,11 @@
for(let val in listData){ for(let val in listData){
listData[val].schemesShow = false listData[val].schemesShow = false
} }
console.log(listData)
this.giftPackArr = listData this.giftPackArr = listData
this.numbers = res.numbers this.numbers = res.numbers
this.count = res.coupons_count this.count = res.coupons_count
this.adverts = res.adverts this.adverts = res.adverts
this.openId = res.h5_openid
}).catch(err=>{}) }).catch(err=>{})
} else { } else {
if(uni.getStorageSync("token")) { if(uni.getStorageSync("token")) {
@@ -276,6 +328,24 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/giftPack/list?id=' + id url: '/pages/giftPack/list?id=' + id
}) })
// if(this.openId != null) {
// if(!can) {
// this.generalShow = !this.generalShow
// return
// }
// uni.navigateTo({
// url: '/pages/giftPack/list?id=' + id
// })
// return
// }
// oppid
// getAuthUrl({
// url: 'pages/giftPack/index'
// }).then(res=> {
// window.location.href = res
// })
}, },
// 兑换跳转 // 兑换跳转
@@ -286,7 +356,23 @@
url: '/pages/giftPack/list?id=' + this.generalId url: '/pages/giftPack/list?id=' + this.generalId
}) })
}).catch(err=>{}) }).catch(err=>{})
} },
// 优惠券跳转详情
couponUrl(id, from) {
if(from == 'washcar') {
shopsUrl(id).then(res=>{
const newUrl = res.url
window.location.href = newUrl
})
return
}
// 跳转分类页
uni.navigateTo({
url: '/pages/giftPack/details?id=' + id
})
},
} }
} }
</script> </script>
@@ -302,11 +388,33 @@
.content-border { .content-border {
border-bottom: 130rpx transparent solid; border-bottom: 130rpx transparent solid;
} }
// banner .indexBanner {
.campusBanner { padding: 30rpx;
width: 100%; box-sizing: border-box;
} }
.banner {
position: relative;
padding-top: 48%;
width: 100%;
background: white;
overflow: hidden;
z-index: 99;
border-radius: 10rpx;
.banner-swiper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.banner-img {
width: 100%;
height: 100%;
vertical-align: top;
}
}
}
// 推荐 // 推荐
.recommend { .recommend {
@@ -515,6 +623,19 @@
text { text {
font-size: 54rpx; font-size: 54rpx;
} }
}
.couponItem-cont-image {
width: 88rpx;
height: 88rpx;
margin-right: 10rpx;
border-radius: 50%;
padding: 10rpx;
box-sizing: border-box;
background-color: #fff1dd;
image {
width: 100%;
border-radius: 50%;
}
} }
.couponItem-cont-name { .couponItem-cont-name {
color: #72411f; color: #72411f;

View File

@@ -1,233 +1,267 @@
<template> <template>
<view class="content"> <view class="content">
<view v-for="(item, idx) in adverts" :key="item.cover"> <!-- 卡片轮播 -->
<image class="campusBanner" :src="item.cover" mode="widthFix"></image> <view class="indexBanner">
</view> <view class="banner">
<view class="recommend"></view> <swiper class="banner-swiper" interval="5000" autoplay indicator-dots>
<view class="special-list" v-if="giftPackArr.length > 0"> <swiper-item v-for="(item, idx) in adverts" :key="item.cover">
<navigator hover-class="none" :url="'buy?id=' + item.activity_month_id" class="special-label" v-for="(item, index) in giftPackArr" :key="index"> <image class="banner-img" :src="item.cover"></image>
<view class="special-rebate" v-if="item.label != null">{{item.label}}</view> </swiper-item>
<view class="welfareCont-top" > </swiper>
<view class="welfareCont-list-img" > </view>
<image :src="item.cover" mode="aspectFill"></image> </view>
</view>
</view> <view class="special-list" v-if="giftPackArr.length > 0">
<view class="special-text"> <navigator hover-class="none" :url="'buy?id=' + item.activity_month_id" class="special-label" v-for="(item, index) in giftPackArr" :key="index">
<view class="nowrap special-name">{{item.title}}</view> <view class="special-rebate" v-if="item.label != null">{{item.label}}</view>
<view class="special-tips">{{item.two_title}}</view> <view class="welfareCont-top" >
</view> <view class="welfareCont-list-img" >
</navigator> <image :src="item.cover" mode="aspectFill"></image>
</view> </view>
<!-- 列表为空 --> </view>
<view class="campusTips" v-else> <view class="special-text">
<view class="campusTips-cont"> <view class="nowrap special-name">{{item.title}}</view>
<image src="/static/img/giftPack-null.png" mode="aspectFill"></image> <view class="special-tips">{{item.two_title}}</view>
<view>抱歉暂无可购买权益</view> </view>
</view> </navigator>
</view> </view>
<!-- 列表为空 -->
<view class="campusTips" v-else>
<view class="campusTips-cont">
<image src="/static/img/giftPack-null.png" mode="aspectFill"></image>
<view>抱歉暂无可购买权益</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { index, monthsList } from '@/apis/interfaces/giftPack' import { index, monthsList } from '@/apis/interfaces/giftPack'
export default { export default {
data() { data() {
return { return {
adverts : [], adverts : [],
giftPackArr : [] giftPackArr : []
} }
}, },
// 生命周期函数--监听页面加载 // 生命周期函数--监听页面加载
onLoad(options) { onLoad(options) {
// 获取列表数据 // 获取列表数据
this.monthsInfo(options.id); this.monthsInfo(options.id);
}, },
// 生命周期函数--监听页面显示 // 生命周期函数--监听页面显示
onShow() { onShow() {
// 存储环境-月兑活动 // 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv' getApp().globalData.envType = 'giftPEnv'
// 获取分类数据 // 获取分类数据
this.indexInfo(); this.indexInfo();
}, },
methods: { methods: {
// 分类数据 // 分类数据
indexInfo() { indexInfo() {
index().then(res=>{ index().then(res=>{
this.adverts = res.adverts this.adverts = res.adverts
}).catch(err=>{}) }).catch(err=>{})
}, },
// 列表数据 // 列表数据
monthsInfo(id) { monthsInfo(id) {
monthsList(id).then(res=>{ monthsList(id).then(res=>{
this.giftPackArr = res this.giftPackArr = res
}).catch(err=>{}) }).catch(err=>{})
}, },
// 可兑换信息展开 // 可兑换信息展开
moreClick(index) { moreClick(index) {
this.giftPackArr[index].schemesShow = !this.giftPackArr[index].schemesShow this.giftPackArr[index].schemesShow = !this.giftPackArr[index].schemesShow
}, },
// 已兑换细信息展开 // 已兑换细信息展开
moreCoupon(index) { moreCoupon(index) {
this.couponArr[index].couponShow = !this.couponArr[index].couponShow this.couponArr[index].couponShow = !this.couponArr[index].couponShow
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .indexBanner {
background: #fff; padding: 30rpx;
padding-bottom: 40rpx; box-sizing: border-box;
height: 100vh; }
overflow-y: scroll;
box-sizing: border-box .banner {
} position: relative;
padding-top: 48%;
// banner width: 100%;
.campusBanner { background: white;
width: 100%; overflow: hidden;
} z-index: 99;
border-radius: 10rpx;
// 推荐 .banner-swiper {
.recommend { position: absolute;
overflow: hidden; top: 0;
margin-top: -70rpx; left: 0;
padding: 0 30rpx; width: 100%;
box-sizing: border-box; height: 100%;
} .banner-img {
width: 100%;
// 列表 height: 100%;
.film { vertical-align: top;
width: 100%; }
padding: 30rpx; }
box-sizing: border-box; }
}
.special-list { .content {
flex-wrap: wrap; background: #fff;
display: flex; padding-bottom: 40rpx;
padding: 30rpx; height: 100vh;
box-sizing: border-box; overflow-y: scroll;
} box-sizing: border-box
}
.special-label {
margin: 10rpx; // banner
width: calc(50% - 20rpx); .campusBanner {
height: 330rpx; width: 100%;
flex: 0 0 calc(50% - 20rpx); }
border: 4rpx solid #fb9b00;
background-color: #ffe0b8; // 推荐
border-radius: 10rpx; .recommend {
text-align: center; overflow: hidden;
padding: 20rpx 0; margin-top: -70rpx;
box-sizing: border-box; padding: 0 30rpx;
position: relative; box-sizing: border-box;
} }
.special-label:last-child { // 列表
margin-bottom: 0; .film {
} width: 100%;
padding: 30rpx;
.special-rebate { box-sizing: border-box;
position: absolute; }
top: -30rpx; .special-list {
right: 10rpx; flex-wrap: wrap;
background: #fe0002; display: flex;
color: #fff; padding: 0 30rpx 30rpx;
border-radius: 30rpx; box-sizing: border-box;
line-height: 52rpx; }
height: 52rpx;
font-size: 26rpx; .special-label {
padding: 0 20rpx; margin: 10rpx;
font-weight: 600; width: calc(50% - 20rpx);
} height: 330rpx;
flex: 0 0 calc(50% - 20rpx);
.welfareCont-top{ border: 4rpx solid #fb9b00;
white-space: nowrap; background-color: #ffe0b8;
flex-direction: row; border-radius: 10rpx;
align-items: center; text-align: center;
justify-content: space-around; padding: 20rpx 0;
width: 100%; box-sizing: border-box;
padding: 0 10rpx; position: relative;
box-sizing: border-box; }
margin: 10rpx 0;
} .special-label:last-child {
margin-bottom: 0;
.welfareCont-list-img { }
border: 2rpx solid #eccc69;
border-radius: 50%; .special-rebate {
width: 100rpx; position: absolute;
height: 100rpx; top: -30rpx;
display: inline-block; right: 10rpx;
margin: 0 10rpx; background: #fe0002;
overflow: hidden; color: #fff;
} border-radius: 30rpx;
line-height: 52rpx;
.welfareCont-list-img image { height: 52rpx;
width: 100%; font-size: 26rpx;
height: 100%; padding: 0 20rpx;
} font-weight: 600;
}
.campusTips {
padding: 30rpx; .welfareCont-top{
box-sizing: border-box; white-space: nowrap;
.campusTips-cont { flex-direction: row;
background-color: #fff; align-items: center;
border-radius: 20rpx; justify-content: space-around;
text-align: center; width: 100%;
padding: 80rpx; padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
color: #9c7557; margin: 10rpx 0;
image { }
width: 340rpx;
height: 280rpx; .welfareCont-list-img {
margin-bottom: 30rpx; border: 2rpx solid #eccc69;
} border-radius: 50%;
.campusTips-cont-go { width: 100rpx;
display: inline-block; height: 100rpx;
border: #9c7557 2rpx solid; display: inline-block;
line-height: 66rpx; margin: 0 10rpx;
padding: 0 40rpx; overflow: hidden;
margin-top: 30rpx; }
font-size: 28rpx;
border-radius: 90rpx; .welfareCont-list-img image {
} width: 100%;
} height: 100%;
} }
.special-text { .campusTips {
padding: 0 15rpx; padding: 30rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; .campusTips-cont {
font-size: 26rpx; background-color: #fff;
border-top: 4rpx dashed #fb9b00; border-radius: 20rpx;
margin-top: 20rpx; text-align: center;
padding-top: 20rpx; padding: 80rpx;
} box-sizing: border-box;
color: #9c7557;
.special-name { image {
color: #6f4a2d; width: 340rpx;
font-weight: 600; height: 280rpx;
font-size: 28rpx; margin-bottom: 30rpx;
} }
.campusTips-cont-go {
.special-tips { display: inline-block;
background-color: #242424; border: #9c7557 2rpx solid;
color: #fff; line-height: 66rpx;
border-radius: 10rpx; padding: 0 40rpx;
padding: 4rpx 20rpx; margin-top: 30rpx;
line-height: 46rpx; font-size: 28rpx;
height: 46rpx; border-radius: 90rpx;
margin-top: 20rpx; }
font-size: 24rpx; }
display: inline-block; }
overflow: hidden;
text-overflow: ellipsis; .special-text {
} padding: 0 15rpx;
box-sizing: border-box;
position: relative;
font-size: 26rpx;
border-top: 4rpx dashed #fb9b00;
margin-top: 20rpx;
padding-top: 20rpx;
}
.special-name {
color: #6f4a2d;
font-weight: 600;
font-size: 28rpx;
}
.special-tips {
background-color: #242424;
color: #fff;
border-radius: 10rpx;
padding: 4rpx 20rpx;
line-height: 46rpx;
height: 46rpx;
margin-top: 20rpx;
font-size: 24rpx;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
}
</style> </style>

View File

@@ -1,187 +1,325 @@
<template> <template>
<view class="content"> <view class="content">
<view class="title"> <view class="title">
积分记录 <view class="title-name">消费金账户余额</view>
</view> </view>
<view class="list" v-if="accounts.length > 0">
<view class="item" v-for="(item, index) in accounts" :key="index"> <view class="redBack">
<image class="item-img" src="@/static/img/giftPack-img09.png" mode="widthFix"></image> <view class="list">
<view class="item-cont"> <view class="label">
<view class="item-cont-top"> <view class="label-title">可用余额<image src="/static/icon/giftPack-show.png" mode="widthFix"></image></view>
<div class="item-cont-name">{{item.title}}</div> <view class="label-number">{{account.gold}}</view>
<div class="item-cont-number">{{item.variable}}</div> <view class="label-go">可用余额入账记录 </view>
</view> </view>
<view class="item-cont-bottom"> <view class="label">
<div class="item-cont-total" v-if="userData.gold">余额{{userData.gold.balance}}</div> <view class="label-title">待发放</view>
<div class="item-cont-time">{{item.created_at}}</div> <view class="label-number">{{blockeds}}</view>
</view> <navigator hover-class="none" :url="'/pages/giftPack/logsFrozen?type=gold' + '&blockeds=' + blockeds" class="label-go">立即查询 > </navigator>
</view> </view>
</view> </view>
</view>
<view class="pagesLoding" v-if="lodingStats">
<block v-if="page.has_more"> <view class="integra-cont">
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中... <view class="integra-title">
</block> <view class="integra-title-name">明细记录</view>
<block v-else> <view class="integra-title-picker">
没有更多了~ <picker @change="screenBind" :value="screenIndex" :range-key="'name'" :range="screenArray">
</block> {{screenArray[screenIndex].name}}
</view> </picker>
</view> <image class="integra-title-icon" src="/static/icon/arrow_down.png"></image>
</view>
<!-- 暂无内容 --> </view>
<view class="campusTips" v-else> <view class="integra-cont-list" v-if="accounts.length > 0">
<view class="campusTips-cont"> <view class="integra-cont-label" v-for="(item, index) in accounts" :key="index">
<image src="/static/img/giftPack-null.png" mode="aspectFill"></image> <view class="integra-cont-title">
<view>抱歉目前暂无内容~</view> <view class="integra-cont-name">{{item.title}}</view>
</view> <view class="integra-cont-tips">消费金余额</view>
</view> </view>
<view class="integra-cont-time">扣除时间{{item.created_at}}</view>
<view class="integra-cont-number">{{item.variable}}</view>
</view>
</view>
<!-- 暂无内容 -->
<view class="recommend-hint" v-else>
<image src="/static/img/legal_tips.png"></image>
<view>抱歉目前暂无内容~</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { logs } from '@/apis/interfaces/giftPack' import { logs } from '@/apis/interfaces/giftPack'
import { index } from '@/apis/interfaces/user' import { index } from '@/apis/interfaces/user'
export default { export default {
data() { data() {
return { return {
userData : '', //用户 blockeds : '',
accounts : '', // 账户列表 account : '',
page: { accounts : '', // 账户列表
has_more: false screenArray : [
}, // 下一页 {
lodingStats: false // 数据加载完渲染 channel: 'all',
} name: '全部'
}, },
{
// 生命周期函数--监听页面显示 channel: 'in',
onShow() { name: '入账'
// 存储环境-月兑活动 },
getApp().globalData.envType = 'giftPEnv' {
channel: 'out',
// 获取账变记录 name: '出账'
this.accountInfo(); }
], //账变记录筛选数组
// 获取用户接口 screenChannel: '', //账变记录筛选数组标识
this.userInfo(); screenIndex : 0 , //账变记录筛选index
}, page : 1, //分页
methods: { lodingStats : false //加载状态
// 用户接口 }
userInfo() { },
// 获取用户信息
index().then(res => { // 生命周期函数--监听页面显示
this.userData = res onShow() {
}).catch(err => { // 存储环境-月兑活动
if (!err.login) { getApp().globalData.envType = 'giftPEnv'
uni.showModal({
title: '用户登录已过期', // 获取账变记录
content: '请重新登录', this.accountInfo();
showCancel: false, },
success: res => { methods: {
if (res.confirm) { // 账变记录
uni.redirectTo({ accountInfo(page) {
url: '/pages/giftPack/signin' logs({
}); type : 'gold',
} page : page || '',
} channel : this.screenChannel
}); }).then(res=>{
} let newStores = this.accounts,
}); newData = []
}, if(page == 1 || page == undefined) newStores = []
newData = newStores.concat(res.data)
// 账变记录 this.accounts = newData
accountInfo(page) { this.blockeds = res.blockeds
logs({ this.account = res.account
type : 'gold', this.page = res.page
page : page, this.lodingStats = false
channel : 'all' uni.stopPullDownRefresh()
}).then(res=>{ })
let newStores = this.accounts, },
newData = []
if(page == 1 || page == undefined) newStores = [] // 筛选账变记录-条件
newData = newStores.concat(res.data) screenBind(e) {
this.accounts = newData this.screenIndex = e.detail.value,
this.page = res.page this.screenChannel= this.screenArray[e.detail.value].channel
this.lodingStats = false
uni.stopPullDownRefresh() // 获取账变记录
}) this.accountInfo();
}, },
}
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 获取账变记录
this.accountInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 获取账变记录
this.accountInfo(pageNumber);
}
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
padding: 30rpx; padding: 30rpx;
box-sizing: border-box; box-sizing: border-box;
} background-color: #fff9f9;
height: 100vh;
.title { overflow-y: scroll;
font-size: 36rpx; }
font-weight: 600;
} .title {
font-size: 34rpx;
.list { font-weight: 600;
margin-top: 30rpx; text-align: center;
.item { .title-name {
background-color: #fff; text-align: center;
border-radius: 10rpx; position: relative;
padding: 30rpx; width: 440rpx;
box-sizing: border-box; margin: 0 auto;
display: flex; color: #f25448;
.item-img { line-height: 60rpx;
width: 54rpx; &::after,
margin-top: 25rpx; &::before {
} position: absolute;
.item-cont { content: '';
width: calc(100% - 54rpx); top: calc(50% - 14rpx);
padding-left: 30rpx; background-image: url('/static/img/giftPackArrow.png');
box-sizing: border-box; background-size: 100%;
.item-cont-top { background-position: center;
display: flex; width: 80rpx;
font-size: 32rpx; height: 28rpx;
font-weight: 600; display: block;
margin-bottom: 20rpx; }
.item-cont-name { &::after {
flex: 1; left: 0;
} transform: rotate(180deg);
} }
.item-cont-bottom { &::before {
font-size: 28rpx; right: 0;
color: #a4a4a4; }
display: flex; }
.item-cont-total { }
flex: 1;
} .redBack {
} background-image: linear-gradient(to top, #fe796f, #f25549);
} border-radius: 30rpx;
} padding: 30rpx 0 40rpx;
} box-sizing: border-box;
margin: 30rpx 0;
.campusTips { position: relative;
margin-top: 40rpx; }
padding: 30rpx; .redBack::after,
box-sizing: border-box; .redBack::before {
.campusTips-cont { position: absolute;
background-color: #fff; content: '';
border-radius: 20rpx; left: 20rpx;
text-align: center; border-radius: 0 0 20rpx 20rpx;
padding: 80rpx; }
box-sizing: border-box; .redBack::after {
color: #9c7557; background-color: rgba(243, 85, 73, .4);
image { z-index: 2;
width: 340rpx; width: calc(100% - 40rpx);
height: 280rpx; left: 20rpx;
margin-bottom: 30rpx; bottom: -14px;
} height: 14px;
.campusTips-cont-go { }
display: inline-block; .redBack::before {
border: #9c7557 2rpx solid; background-color: rgba(243, 85, 73, .2);
line-height: 66rpx; z-index: 1;
padding: 0 40rpx; width: calc(100% - 80rpx);
margin-top: 30rpx; left: 40rpx;
font-size: 28rpx; bottom: -50rpx;
border-radius: 90rpx; height: 50rpx;
} }
}
} .list {
display: flex;
.label {
flex: 2;
color: #ffffff;
box-sizing: border-box;
&:last-child {
padding-left: 60rpx;
position: relative;
}
&:first-child {
padding-left: 40rpx;
padding-right: 20rpx;
}
&:last-child::after {
position: absolute;
content: '';
left: 0;
top: 15%;
width: 2rpx;
height: 70%;
background-color: #ffffff;
opacity: .6;
}
}
.label-title {
line-height: 54rpx;
display: flex;
image {
width: 32rpx;
margin: 14rpx 0 0 15rpx;
}
}
.label-number {
margin: 10rpx 0 30rpx;
font-size: 48rpx;
font-weight: 600;
}
.label-go {
font-size: 26rpx;
opacity: .9;
}
}
.integra-cont {
margin-top: 100rpx;
.integra-title {
display: flex;
margin-bottom: 30rpx;
.integra-title-name {
font-size: 36rpx;
font-weight: 600;
flex: 1;
}
.integra-title-picker {
display: flex;
color: #797979;
font-size: 32rpx;
.integra-title-icon {
width: 28rpx;
height: 28rpx;
margin: 6rpx 0 0 10rpx;
}
}
}
.integra-cont-label {
background-color: #ffffff;
padding: 30rpx;
box-sizing: border-box;
border-radius: 20rpx;
margin-bottom: 30rpx;
position: relative;
.integra-cont-title {
display: flex;
line-height: 40rpx;
.integra-cont-tips {
margin-left: 20rpx;
color: #ff9833;
border: 2rpx solid #ff9833;
border-radius: 80rpx;
font-size: 26rpx;
padding: 0 15rpx;
}
}
.integra-cont-time {
font-size: 26rpx;
color: #666666;
margin-top: 20rpx;
}
.integra-cont-number {
position: absolute;
top: 50rpx;
right: 30rpx;
color: #f25448;
font-size: 38rpx;
}
}
}
/* 暂无内容 */
.recommend-hint {
text-align: center;
color: #999;
padding: 100rpx 0;
}
.recommend-hint image {
width: 200rpx;
height: 200rpx;
}
</style> </style>

View File

@@ -0,0 +1,341 @@
<template>
<view class="content">
<view class="grantSwiper" v-if="frozenData.length > 0">
<view class="banner-height">
<view class="grantTop">
<image class="grantTop-img" src="https://card.ysd-bs.com/storage/materials/2023/07/20/7ebb8b87cf537179f79ba96b77da6ab7.png" mode="scaleToFill"></image>
<view class="grantTop-text">
<!-- <image :src="type == 'silver' ? 'https://card.ysd-bs.com/storage/materials/2021/09/01/frozen_identity_00.png' : 'https://card.ysd-bs.com/storage/materials/2021/09/01/frozen_identity_01.png'"></image> -->
<view class="grantTop-price">
<text>待发放(额度)</text>
<view class="grantTop-price-tips"></view>{{total}}
</view>
</view>
</view>
</view>
<view class="grantIssue">
<view class="grantIssue-list">
<view class="grantIssue-label" v-for="(item, index) in frozenData" :key="index">
<image class="grantIssue-label-img active" src="https://card.ysd-bs.com/storage/materials/2021/09/01/frozen_img.png" mode="scaleToFill"></image>
<view class="grantIssue-label-cont">
<view class="grantIssue-label-left">
<view class="grantIssue-left-top" :class="{active : item.status == 0}"><text>{{item.variable}}</text></view>
<view class="grantIssue-left-number" :class="{active : item.status == 0}">发放额度</view>
</view>
<view class="grantIssue-label-center">
<view class="grantIssue-center-top" :class="{active : item.status == 0}">
<text>{{item.title}}</text>
</view>
<view class="grantIssue-center-time">发放时间{{item.grant_time}}</view>
</view>
<view class="grantIssue-label-right" :class="{active : item.status == 0}">{{item.status_text}}</view>
</view>
<image class="grantIssue-label-tips active" src="https://card.ysd-bs.com/storage/materials/2021/09/01/frozen_btn.png" mode="scaleToFill">
</image>
</view>
</view>
</view>
</view>
<view class="no-pack-center pack-center pages-hint" v-else>
<image src="https://card.ysd-bs.com/storage/materials/2021/09/01/Account_icon.png"></image>
<view>抱歉目前暂无内容~</view>
</view>
</view>
</template>
<script>
import { ungrantsNew } from '@/apis/interfaces/user'
export default {
data() {
return {
type : '', //类型
total : '',
frozenData : [], //数组列表
blockeds : '', //待发放金额
page : 1, //分页
lodingStats : false //加载状态
}
},
// 生命周期函数--监听页面加载
onLoad (options) {
this.type = options.type
this.blockeds = options.blockeds
// 获取冻结列表
this.frozenInfo()
},
// 生命周期函数--监听页面显示
onShow() {
// 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv'
},
methods: {
// 冻结列表
frozenInfo(page) {
ungrantsNew({
type : this.type,
page : page || ''
}).then(res=>{
console.log(res)
let newStores = this.frozenData,
newData = []
if(page == 1 || page == undefined) newStores = []
newData = newStores.concat(res.logs.data)
this.frozenData = newData
this.total = res.total,
this.page = res.logs.page
this.lodingStats = false
uni.stopPullDownRefresh()
})
},
// 页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh() {
// 获取冻结列表
this.frozenInfo();
},
// 上拉加载
onReachBottom(){
this.lodingStats = true
let pageNumber = this.page.current
if(this.page.has_more){
pageNumber++
// 获取冻结列表
this.frozenInfo(pageNumber);
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 30rpx;
box-sizing: border-box;
background-color: #fff9f9;
height: 100vh;
overflow-y: scroll;
}
.grantSwiper {
width: 100%;
box-sizing: border-box;
}
.grantTop {
position: relative;
width: 100%;
height: 300rpx;
color: #ffe3a4;
}
.grantTop-img {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.grantTop-text,
.grantTop-tips {
position: absolute;
z-index: 9;
left: 0;
width: 100%;
}
.grantTop-text {
top: 0;
padding: 40rpx 60rpx;
box-sizing: border-box;
}
.grantTop-text image {
width: 120rpx;
height: 40rpx;
}
.grantTop-price {
text-align: center;
font-size: 60rpx;
margin: 30rpx 0;
}
.grantTop-price text {
font-size: 32rpx;
display: block;
color: #fff;
}
.grantTop-price-tips {
display: inline-block;
font-size: 54rpx;
margin-top: 20rpx;
}
.grantIssue-title {
height: 120rpx;
}
.grantIssue-title-name {
line-height: 44rpx;
display: flex;
}
.grantIssue-title-name image {
width: 42rpx;
height: 42rpx;
margin-right: 20rpx;
}
.grantIssue-title-name text {
font-weight: 600;
font-size: 32rpx;
background-image: -webkit-linear-gradient(left, #fbdebe, #e5ad7a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.grantIssue-title-tips {
font-size: 26rpx;
margin: 10rpx 0 30rpx;
color: #d2d6e2;
}
.grantIssue-title-tips text {
color: #dcbc8d;
}
.grantIssue-label {
position: relative;
height: 180rpx;
margin-top: 30rpx;
border-radius: 10rpx;
overflow: hidden;
background-color: #f9dabb;
}
.grantIssue-label:last-child {
margin-bottom: 0;
}
.grantIssue-label-img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.grantIssue-label-img.active,
.grantIssue-label-tips.active {
-webkit-filter: grayscale(50%);
-moz-filter: grayscale(50%);
-ms-filter: grayscale(50%);
-o-filter: grayscale(50%);
filter: grayscale(50%);
filter: gray;
}
.grantIssue-label-cont {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 6;
padding: 20rpx;
box-sizing: border-box;
display: flex;
}
.grantIssue-label-left {
width: 160rpx;
text-align: center;
margin-top: 20rpx;
}
.grantIssue-left-top {
color: #e9083d;
font-size: 26rpx;
}
.grantIssue-left-top.active,
.grantIssue-center-top.active{
color: #ba926a;
}
.grantIssue-label-right.active {
color: #ba926a;
}
.grantIssue-left-number.active {
background: -webkit-linear-gradient(left, #fce1d6, #fce1d6);
color: #fc7f45;
}
.grantIssue-left-top text {
font-size: 22rpx;
}
.grantIssue-left-top text {
font-size: 36rpx;
font-weight: 600;
padding: 0 6rpx;
}
.grantIssue-left-number {
background: -webkit-linear-gradient(left, #ffdca4, #f8af52);
color: #b13509;
border-radius: 30rpx;
display: inline-block;
font-size: 22rpx;
height: 42rpx;
line-height: 42rpx;
padding: 0 15rpx;
margin-top: 12rpx;
}
.grantIssue-label-right {
width: 100rpx;
font-weight: 600;
text-align: center;
font-size: 26rpx;
color: #3d2a26;
line-height: 140rpx;
}
.grantIssue-label-center {
width: calc(100% - 270rpx);
margin: 20rpx 0 0 20rpx;
}
.grantIssue-center-top {
font-size: 32rpx;
margin-bottom: 20rpx;
color: #0f004a;
font-weight: 600;
}
.grantIssue-center-time {
font-size: 26rpx;
color: #d6a06a;
}
.grantIssue-label-tips {
position: absolute;
width: 140rpx;
height: 100%;
right: 0;
top: 0;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -154,7 +154,7 @@
border: none; border: none;
} }
&[disabled]{ &[disabled]{
color: rgba($color: white, $alpha: .5); color: rgba($color: #f25448, $alpha: .5);
} }
} }
} }

View File

@@ -3,7 +3,7 @@
<view class="campus-header"> <view class="campus-header">
<view class="logo"> <view class="logo">
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image> <image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
<view class="title">超级红包活动用户注册</view> <view class="title">联通全额消费金活动用户注册</view>
</view> </view>
<image class="cover" src="@/static/img/campusLogin_back_red.png" mode="aspectFill"></image> <image class="cover" src="@/static/img/campusLogin_back_red.png" mode="aspectFill"></image>
</view> </view>
@@ -165,8 +165,8 @@
&::after{ &::after{
border: none; border: none;
} }
&[disabled]{ &[disabled]{
color: rgba($color: white, $alpha: .5); color: rgba($color: #f25448, $alpha: .5);
} }
} }
} }

View File

@@ -91,8 +91,8 @@
&::after{ &::after{
border: none; border: none;
} }
&[disabled]{ &[disabled]{
color: rgba($color: white, $alpha: .5); color: rgba($color: #f25448, $alpha: .5);
} }
} }
} }

View File

@@ -3,7 +3,7 @@
<view class="campus-header"> <view class="campus-header">
<view class="logo"> <view class="logo">
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image> <image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
<view class="title">超级红包活动登录</view> <view class="title">联通全额消费金活动登录</view>
</view> </view>
<image class="cover" src="@/static/img/campusLogin_back_red.png" mode="aspectFill"></image> <image class="cover" src="@/static/img/campusLogin_back_red.png" mode="aspectFill"></image>
</view> </view>
@@ -98,7 +98,12 @@
_this.disabled = true _this.disabled = true
} }
}, 1000) }, 1000)
}).catch(err=>{}) }).catch(err=>{
uni.showToast({
title: err.message,
icon : 'none'
})
})
} }
}, },
@@ -179,8 +184,8 @@
&::after{ &::after{
border: none; border: none;
} }
&[disabled]{ &[disabled]{
color: rgba($color: white, $alpha: .5); color: rgba($color: #f25448, $alpha: .5);
} }
} }
} }

View File

@@ -0,0 +1,389 @@
<template>
<view class="content">
<image class="superRed-back" src="/static/img/superRed.jpg" mode="widthFix"></image>
<view class="superRed-cont">
<image class="superRed-img" src="/static/img/superRed-img.png" mode="widthFix"></image>
<view class="superRed-see">
<view class="superRed-white">
<view class="superRed-title"><text>领取消费金</text></view>
<view class="packetText-form">
<view class="packetText-title">
<view class="packetText-title-name">请输入办理业务手机号</view>
<text>185XXXX0001</text>
</view>
<form action="" @submit="forgetlogin">
<view class="packetText-label">
<input class="inputs-input" type="text" placeholder="请输入办理业务的手机号" @input="getNameValue"
:value="mobile"></input>
</view>
<view class="packetText-label">
<input class="inputs-input" placeholder="请输入验证码" @input="getCodeValue" :value="code"></input>
<button class="packetText-code" @click="codeBind" hover-class="none" :disabled="disabled">{{codename}}</button>
</view>
<view class="packetText-label">
<input class="inputs-input" type="text" placeholder="消费金使用账户【微信关联手机号码】" @input="getMobileValue"
:value="getMobile"></input>
</view>
<view class="packetText-cozy">
<view class="packetText-cozy-name">温馨提示</view>
<text>1.消费金仅限本系统使用</text>
<text>2.消费金当月有效当月权益请在当月使用</text>
<text>3.如消费金兑换成电子券后请按电子券有效期使用如逾期未用视为放弃使用资格平台将不予补发不予延期</text>
</view>
<view class="packetText-btn">
<button type="default" form-type="submit"><text>立即领取</text></button>
</view>
</form>
</view>
</view>
</view>
</view>
<view class="popBack" :class="{active : popContHide}"></view>
<view class="popCont" :class="{active : popContHide}">
<image class="popCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/receive.png" mode="widthFix"></image>
<view class="popCont-text">
<view class="popCont-name">领取成功,共领取<text>{{popData}}</text>,可在账户中查看</view>
<view class="popCont-btn" @click="popClick">我知道了 <text v-if="countDownNum > 0">({{countDownNum}})</text></view>
</view>
</view>
</view>
</template>
<script>
import { send } from '@/apis/interfaces/auth'
import { monthsPacket } from '@/apis/interfaces/giftPack'
export default {
data() {
return {
mobile : '', //手机号码
code : '',
getMobile : '',
iscode : null, //用于存放验证码接口里获取到的code
codename : '获取验证码',
countDownNum: '',
popContHide : false, //领取成功弹出
popData : '', //领取金额
disabled : false
}
},
// 生命周期函数--监听页面显示
onShow() {
// 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv'
},
methods: {
// 获取手机号码
getNameValue(e) {
this.mobile = e.detail.value
},
// 获取验证码
getCodeValue(e) {
this.code = e.detail.value
},
// 获取领取红包的手机号
getMobileValue(e) {
this.getMobile = e.detail.value
},
// code发送
codeBind(e){
this.disabled = true
let mobile = this.mobile,
myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9])\d{8}$$/
var _this = this
if (mobile == "") {
uni.showToast({
title : '手机号不能为空',
icon : 'none',
duration : 1000
})
return false;
}else if (!myreg.test(mobile)) {
uni.showToast({
title : '请输入正确的手机号',
icon : 'none',
duration : 1000
})
return false;
}else{
send({
mobile : mobile,
channel :'DEFAULT',
type : 'month'
}).then(res=>{
uni.showToast({
title : '发送成功',
icon : 'success',
duration: 2000
})
var num = 61;
var timer = setInterval(function () {
num--;
if (num <= 0) {
clearInterval(timer);
_this.codename = '重新发送',
_this.disabled = false
} else {
_this.codename = num + "s后重新获取",
_this.disabled = true
}
}, 1000)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
}
},
// 立即领取
forgetlogin(e) {
let mobile = this.mobile,
getmobile = this.getMobile,
code = this.code,
that = this,
countDownNum = 5 //获取倒计时初始值
that.countDownNum = countDownNum
monthsPacket({
mobile : mobile,
get_mobile: getmobile,
channel : 'DEFAULT',
code : code
}).then(res=>{
that.popContHide = !this.popContHide
that.popData = res
var timerPop = setInterval(function () {
countDownNum--;
that.countDownNum = countDownNum
if (countDownNum <= 0) {
clearInterval(timerPop);
that.countDownNum = 0
uni.switchTab({
url: '/pages/user/index'
})
}
}, 1000)
}).catch(err=>{
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 关闭弹窗
popClick() {
this.popContHide = !this.popContHide
// 跳转
uni.redirectTo({
url: '/pages/giftPack/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #f31a16;
height: 100vh;
overflow-y: scroll;
position: relative;
}
.superRed-back {
width: 100%;
position: absolute;
}
.superRed-cont {
top: 0;
position: absolute;
.superRed-img {
width: 100%;
}
.superRed-see {
padding: 0 30rpx 30rpx;
box-sizing: border-box;
.superRed-white {
position: relative;
background-color: #fffcf4;
border-radius: 20rpx;
padding: 80rpx 30rpx 30rpx;
box-sizing: border-box;
.superRed-title {
width: 100%;
position: absolute;
text-align: center;
top: -38rpx;
left: 0;
text {
display: inline-block;
background-color: #f95433;
box-shadow: 0 8rpx 5rpx rgba(249, 84, 51, .4);
border: 4rpx solid #ffeca0;
line-height: 76rpx;
padding: 0 50rpx;
border-radius: 80rpx;
color: #ffffff;
font-weight: 600;
font-size: 40rpx;
}
}
}
}
}
.packetText-title {
display: flex;
color: #f25448;
line-height: 48rpx;
.packetText-title-name {
font-weight: 600;
font-size: 32rpx;
}
text{
font-size: 26rpx;
}
}
.packetText-label {
height: 100rpx;
line-height: 100rpx;
margin-top: 40rpx;
background-color: #ffffff;
border-radius: 80rpx;
padding: 0 40rpx;
box-sizing: border-box;
display: flex;
.inputs-input {
display: inline-block;
height: 100%;
flex: 1;
}
.packetText-code {
line-height: 100rpx;
border: none;
background-color: transparent;
border: none;
width: auto !important;
padding: 0;
font-weight: normal;
font-size: 28rpx;
color: #f25448;
&::after {
display: none;
}
&[disabled]{
color: #C8C7CC;
}
}
}
.packetText-cozy {
color: #f25448;
margin-top: 40rpx;
font-size: 26rpx;
padding: 0 10rpx;
box-sizing: border-box;
.packetText-cozy-name {
font-weight: 600;
margin-bottom: 20rpx;
}
text {
padding: 10rpx 0 10rpx 30rpx;
box-sizing: border-box;
position: relative;
display: block;
line-height: 34rpx;
&::after {
position: absolute;
content: '';
left: 0;
top: 24rpx;
width: 10rpx;
height: 10rpx;
background-color: #f25448;
transform: rotate(45deg);
}
}
}
.packetText-btn {
text-align: center;
padding: 60rpx 30rpx 40rpx;
box-sizing: border-box;
button {
background-image: linear-gradient(to bottom, #ff4459, #fe1924);
box-shadow: 0 8rpx 5rpx rgba(249, 84, 51, .4);
border-radius: 80rpx;
color: #ffffff;
line-height: 94rpx;
}
}
/* 弹出 */
.popBack {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .8);
z-index: 8;
display: none;
}
.popCont {
position: fixed;
z-index: 9;
width: 100vw;
height: 100vh;
text-align: center;
display: none;
}
.popCont-text {
padding: 0 10rpx;
box-sizing: border-box;
position: absolute;
z-index: 10;
left: 20%;
top: 340px;
width: 60%;
}
.popBack.active,
.popCont.active {
display: block;
}
.popCont-name {
margin-bottom: 50rpx;
font-size: 30rpx;
}
.popCont-name text {
font-size: 40rpx;
color: #fd5238;
padding: 0 10rpx;
}
.popCont-btn {
background-color: #ffea37;
color: #ff3900;
display: inline-block;
border-radius: 80rpx;
padding: 20rpx 70rpx;
box-shadow: 0 10rpx 10rpx rgba(196, 160, 0, 0.4);
}
</style>

392
pages/giftPack/superRed.vue Normal file
View File

@@ -0,0 +1,392 @@
<template>
<view class="content">
<image class="superRed-back" src="https://card.ysd-bs.com/storage/materials/2023/08/08/视频权益包2.png" mode="widthFix"></image>
<view class="superRed-cont">
<view class="superRed-img">
<image src="https://card.ysd-bs.com/storage/materials/2023/08/08/img.png" mode="widthFix"></image>
</view>
<view class="superRed-see">
<form action="" @submit="forgetlogin">
<view class="superRed-white">
<view class="packetText-form">
<view class="packetText-label">
<label>手机号码</label>
<input class="inputs-input" type="text" placeholder="请输入办理业务的手机号" @input="getNameValue"
:value="mobile"></input>
</view>
<view class="packetText-label">
<label>验证码</label>
<input class="inputs-input" placeholder="请输入验证码" @input="getCodeValue" :value="code"></input>
<button class="packetText-code" @click="codeBind" hover-class="none" :disabled="disabled">{{codename}}</button>
</view>
<view class="packetText-label">
<label>账户</label>
<input class="inputs-input" type="text" placeholder="消费金使用账户【微信关联手机号码】" @input="getMobileValue"
:value="getMobile"></input>
</view>
</view>
</view>
<view class="packetText-btn">
<button type="default" form-type="submit"><image src="https://card.ysd-bs.com/storage/materials/2023/08/08/45ffe3c74b6ab4fb2a303d19a714d15c.png" mode="widthFix"></image></button>
</view>
</form>
</view>
<view class="packetText-cozy">
<image src="https://card.ysd-bs.com/storage/materials/2023/08/08/视频权益包2_07.png" mode="widthFix"></image>
<!-- <view class="packetText-cozy-name">温馨提示</view>
<text>1.消费金仅限本系统使用</text>
<text>2.消费金当月有效当月权益请在当月使用</text>
<text>3.如消费金兑换成电子券后请按电子券有效期使用如逾期未用视为放弃使用资格平台将不予补发不予延期</text> -->
</view>
</view>
<view class="popBack" :class="{active : popContHide}"></view>
<view class="popCont" :class="{active : popContHide}">
<image class="popCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/receive.png" mode="widthFix"></image>
<view class="popCont-text">
<!-- <view class="popCont-name">领取成功,共领取<text>{{popData}}</text>,可在账户中查看</view> -->
<view class="popCont-name">恭喜您已成功领取消费金在使用时请您链接消费金使用界面用微信关联手机号重新注册登录</view>
<view class="popCont-btn" @click="popClick">我知道了 <text v-if="countDownNum > 0">({{countDownNum}})</text></view>
</view>
</view>
</view>
</template>
<script>
import { send } from '@/apis/interfaces/auth'
import { monthsPacket } from '@/apis/interfaces/giftPack'
export default {
data() {
return {
mobile : '', //手机号码
code : '',
getMobile : '',
iscode : null, //用于存放验证码接口里获取到的code
codename : '获取验证码',
countDownNum: '',
popContHide : false, //领取成功弹出
popData : '', //领取金额
disabled : false
}
},
// 生命周期函数--监听页面显示
onShow() {
// 存储环境-月兑活动
getApp().globalData.envType = 'giftPEnv'
},
methods: {
// 获取手机号码
getNameValue(e) {
this.mobile = e.detail.value
},
// 获取验证码
getCodeValue(e) {
this.code = e.detail.value
},
// 获取领取红包的手机号
getMobileValue(e) {
this.getMobile = e.detail.value
},
// code发送
codeBind(e){
this.disabled = true
let mobile = this.mobile,
myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9])\d{8}$$/
var _this = this
if (mobile == "") {
uni.showToast({
title : '手机号不能为空',
icon : 'none',
duration : 1000
})
return false;
}else if (!myreg.test(mobile)) {
uni.showToast({
title : '请输入正确的手机号',
icon : 'none',
duration : 1000
})
return false;
}else{
send({
mobile : mobile,
channel :'DEFAULT',
type : 'month'
}).then(res=>{
uni.showToast({
title : '发送成功',
icon : 'success',
duration: 2000
})
var num = 61;
var timer = setInterval(function () {
num--;
if (num <= 0) {
clearInterval(timer);
_this.codename = '重新发送',
_this.disabled = false
} else {
_this.codename = num + "s后重新获取",
_this.disabled = true
}
}, 1000)
}).catch(err => {
_this.disabled = false
uni.showToast({
icon: 'none',
title: err.message
})
})
}
},
// 立即领取
forgetlogin(e) {
let mobile = this.mobile,
getmobile = this.getMobile,
code = this.code,
that = this,
countDownNum = 5 //获取倒计时初始值
that.countDownNum = countDownNum
monthsPacket({
mobile : mobile,
get_mobile: getmobile,
channel : 'DEFAULT',
code : code
}).then(res=>{
that.popContHide = !this.popContHide
that.popData = res
var timerPop = setInterval(function () {
countDownNum--;
that.countDownNum = countDownNum
if (countDownNum <= 0) {
clearInterval(timerPop);
that.countDownNum = 0
uni.switchTab({
url: '/pages/giftPack/user'
})
}
}, 1000)
}).catch(err=>{
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 关闭弹窗
popClick() {
this.popContHide = !this.popContHide
// 跳转
// uni.redirectTo({
// url: '/pages/giftPack/index'
// })
}
}
}
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
overflow-y: scroll;
position: relative;
}
.superRed-back {
width: 100%;
position: absolute;
}
.superRed-cont {
padding-top: 120rpx;
top: 0;
position: absolute;
.superRed-img {
width: 100%;
padding: 30rpx;
box-sizing: border-box;
image {
width: 100%;
}
}
.superRed-see {
padding: 0 30rpx 30rpx;
box-sizing: border-box;
.superRed-white {
position: relative;
background-color: #ffffff;
border-radius: 20rpx;
padding: 30rpx 15rpx;
box-sizing: border-box;
.superRed-title {
width: 100%;
position: absolute;
text-align: center;
top: -38rpx;
left: 0;
text {
display: inline-block;
background-color: #f95433;
box-shadow: 0 8rpx 5rpx rgba(249, 84, 51, .4);
border: 4rpx solid #ffeca0;
line-height: 76rpx;
padding: 0 50rpx;
border-radius: 80rpx;
color: #ffffff;
font-weight: 600;
font-size: 40rpx;
}
}
}
}
}
.packetText-title {
display: flex;
color: #f25448;
line-height: 48rpx;
.packetText-title-name {
font-weight: 600;
font-size: 32rpx;
}
text{
font-size: 26rpx;
}
}
.packetText-label {
height: 90rpx;
line-height: 90rpx;
margin-bottom: 40rpx;
background-color: #ffffff;
border-radius: 80rpx;
padding: 0 20rpx;
box-sizing: border-box;
display: flex;
font-size: 32rpx;
label {
color: #1444d9;
font-weight: 600;
}
.inputs-input {
display: inline-block;
height: 100%;
flex: 1;
font-size: 28rpx;
border: 4rpx solid #000000;
border-radius: 10rpx;
padding: 0 20rpx;
box-sizing: border-box;
}
.packetText-code {
line-height: 90rpx;
background-color: #1444d9;
border: none;
width: auto !important;
padding: 0 25rpx;
font-weight: normal;
font-size: 28rpx;
color: #ffffff;
margin-left: 20rpx;
&::after {
display: none;
}
&[disabled]{
color: #C8C7CC;
}
}
}
.packetText-cozy {
color: #f25448;
font-size: 26rpx;
padding: 0 10rpx;
box-sizing: border-box;
image {
width: 100%;
}
}
.packetText-btn {
text-align: center;
padding: 60rpx 30rpx 0;
box-sizing: border-box;
button {
background-color: transparent;
border: none;
image {
width: 100%;
}
&::after {
display: none;
}
}
}
/* 弹出 */
.popBack {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .8);
z-index: 8;
display: none;
}
.popCont {
position: fixed;
z-index: 9;
width: 100vw;
height: 100vh;
text-align: center;
display: none;
}
.popCont-text {
padding: 0 10rpx;
box-sizing: border-box;
position: absolute;
z-index: 10;
left: 20%;
top: 340px;
width: 60%;
}
.popBack.active,
.popCont.active {
display: block;
}
.popCont-name {
margin-bottom: 50rpx;
font-size: 30rpx;
}
.popCont-name text {
font-size: 40rpx;
color: #fd5238;
padding: 0 10rpx;
}
.popCont-btn {
background-color: #ffea37;
color: #ff3900;
display: inline-block;
border-radius: 80rpx;
padding: 20rpx 70rpx;
box-shadow: 0 10rpx 10rpx rgba(196, 160, 0, 0.4);
}
</style>

View File

@@ -33,14 +33,14 @@
<view class="userItem-label-number"> <view class="userItem-label-number">
<block v-if="isUser"> <block v-if="isUser">
<image class="userItem-label-img" src="@/static/img/giftPack-img04.png" mode="widthFix"></image> <image class="userItem-label-img" src="@/static/img/giftPack-img04.png" mode="widthFix"></image>
<block v-if="userData.gold"><text>{{userData.gold.overdue ? userData.gold.overdue : '0'}}</text></block> <block v-if="userData.gold"><text>{{blockeds ? blockeds : '0'}}</text></block>
</block> </block>
<block v-else> <block v-else>
<image class="userItem-label-img" src="@/static/img/giftPack-img03.png" mode="widthFix"></image> <image class="userItem-label-img" src="@/static/img/giftPack-img03.png" mode="widthFix"></image>
<text>0</text> <text>0</text>
</block> </block>
</view> </view>
<view class="userItem-label-text">已过期</view> <view class="userItem-label-text">待发放 <navigator :url="'/pages/giftPack/logsFrozen?type=gold' + '&blockeds=' + blockeds">查看明细></navigator></view>
</view> </view>
</view> </view>
<view class="userList" @click="userNav('/pages/giftPack/logs')"> <view class="userList" @click="userNav('/pages/giftPack/logs')">
@@ -65,6 +65,13 @@
<image class="userCoupon-arrow" src="@/static/icon/rightsArrow.png" mode="widthFix"></image> <image class="userCoupon-arrow" src="@/static/icon/rightsArrow.png" mode="widthFix"></image>
</view> </view>
</view> </view>
<!-- <view class="userCoupon" @click="userNav('/pages/giftPack/superRed')">
<image class="userCoupon-img" src="@/static/img/giftPack-img10.png" mode="widthFix"></image>
<view class="userCoupon-cont">
<view class="userCoupon-name">领取消费金</view>
<image class="userCoupon-arrow" src="@/static/icon/rightsArrow.png" mode="widthFix"></image>
</view>
</view> -->
<view class="userTool"> <view class="userTool">
<view class="userTool-title"> <view class="userTool-title">
@@ -107,11 +114,14 @@
<script> <script>
import { index } from '@/apis/interfaces/user' import { index } from '@/apis/interfaces/user'
import { logs } from '@/apis/interfaces/giftPack'
export default { export default {
data() { data() {
return { return {
isUser : false, // 用户是否登录 isUser : false, // 用户是否登录
userData: '', //用户 userData: '', //用户
screenChannel: '', //账变记录筛选数组标识
blockeds : ''
} }
}, },
@@ -127,8 +137,10 @@
this.isUser = true this.isUser = true
// 获取用户接口 // 获取用户接口
this.userInfo(); this.userInfo();
// 获取首页数据
this.accountInfo();
} }
}, },
methods: { methods: {
// 用户接口 // 用户接口
@@ -154,6 +166,19 @@
}); });
}, },
// 账变记录
accountInfo(page) {
logs({
type : 'gold',
page : page || '',
channel : this.screenChannel
}).then(res=>{
this.blockeds = res.blockeds
})
},
// 处理未登录时的转跳 // 处理未登录时的转跳
userNav(url){ userNav(url){
let pageUrl = url let pageUrl = url

File diff suppressed because it is too large Load Diff

View File

@@ -1,363 +1,363 @@
<template> <template>
<view> <view>
<image class="packetCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet.png"></image> <image class="packetCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet.png"></image>
<view class="packetCont-title"> <view class="packetCont-title">
<image src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet_title.png" mode="widthFix"></image> <image src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet_title.png" mode="widthFix"></image>
</view> </view>
<view class="packetText"> <view class="packetText">
<image class="packetText-tips" src="https://card.ysd-bs.com/storage/materials/2021/09/01/packetText_top.png" mode="widthFix"></image> <image class="packetText-tips" src="https://card.ysd-bs.com/storage/materials/2021/09/01/packetText_top.png" mode="widthFix"></image>
<view class="packetText-form"> <view class="packetText-form">
<view class="packetText-title"> <view class="packetText-title">
<view class="packetText-title-name">请输入办理业务手机号</view> <view class="packetText-title-name">请输入办理业务手机号</view>
<text>185XXXX0001</text> <text>185XXXX0001</text>
</view> </view>
<form action="" bindsubmit="forgetlogin"> <form action="" @submit="forgetlogin">
<view class="packetText-label"> <view class="packetText-label">
<image src="/static/img/packetText_icon.png"></image> <image src="/static/img/packetText_icon.png"></image>
<input class="inputs-input" type="text" placeholder="请输入手机号领取红包" @input="getNameValue" <input class="inputs-input" type="text" placeholder="请输入手机号领取红包" @input="getNameValue"
:value="mobile"></input> :value="mobile"></input>
</view> </view>
<view class="packetText-label"> <view class="packetText-label">
<input class="inputs-code" placeholder="请输入验证码" @input="getCodeValue" :value="code"></input> <input class="inputs-code" placeholder="请输入验证码" @input="getCodeValue" :value="code"></input>
<button class="packetText-code" @click="codeBind" hover-class="none">{{codename}}</button> <button class="packetText-code" @click="codeBind" hover-class="none">{{codename}}</button>
</view> </view>
<view class="packetText-cozy"> <view class="packetText-cozy">
<view class="packetText-cozy-name">温馨提示</view> <view class="packetText-cozy-name">温馨提示</view>
<text>消费红包仅在本系统内使用有效期12个月</text> <text>消费红包仅在本系统内使用有效期12个月</text>
<text>消费红包不找零不兑现</text> <text>消费红包不找零不兑现</text>
<text>消费红包兑换成电子券后不支持退货</text> <text>消费红包兑换成电子券后不支持退货</text>
<text>如出现电子券核销问题请致电咨询0451-888955119:00-20:00</text> <text>如出现电子券核销问题请致电咨询0451-888955119:00-20:00</text>
</view> </view>
<view class="packetText-btn"> <view class="packetText-btn">
<button type="default" form-type="submit"><text>立即领取</text><image src="/static/img/packet_arr.png"></image></button> <button type="default" form-type="submit"><text>立即领取</text><image src="/static/img/packet_arr.png"></image></button>
</view> </view>
</form> </form>
</view> </view>
</view> </view>
<view class="popBack" :class="{active : popContHide}"></view> <view class="popBack" :class="{active : popContHide}"></view>
<view class="popCont" :class="{active : popContHide}"> <view class="popCont" :class="{active : popContHide}">
<image class="popCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/receive.png" mode="widthFix"></image> <image class="popCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/receive.png" mode="widthFix"></image>
<view class="popCont-text"> <view class="popCont-text">
<view class="popCont-name">领取成功,共领取<text>{{ popData }}</text>,可在账户中查看</view> <view class="popCont-name">领取成功,共领取<text>{{ popData }}</text>,可在账户中查看</view>
<view class="popCont-btn" @click="popClick">我知道了 <text v-if="countDownNum > 0">({{ countDownNum }})</text></view> <view class="popCont-btn" @click="popClick">我知道了 <text v-if="countDownNum > 0">({{ countDownNum }})</text></view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { send, unicom } from '@/apis/interfaces/auth' import { send, unicom } from '@/apis/interfaces/auth'
export default { export default {
data() { data() {
return { return {
mobile : '', // 手机号码 mobile : '', // 手机号码
code : '', // 验证码 code : '', // 验证码
iscode : null, // 用于存放验证码接口里获取到的code iscode : null, // 用于存放验证码接口里获取到的code
codename : '获取验证码', // 验证码-文字提示 codename : '获取验证码', // 验证码-文字提示
countDownNum: '', // 提示信息 countDownNum: '', // 提示信息
popContHide : false, // 领取成功弹出 popContHide : false, // 领取成功弹出
popData : '' // 领取金额 popData : '' // 领取金额
} }
}, },
onLoad(options) {}, onLoad(options) {},
methods:{ methods:{
// 获取手机号码 // 获取手机号码
getNameValue(e) { getNameValue(e) {
this.mobile = e.detail.value this.mobile = e.detail.value
}, },
// 获取验证码 // 获取验证码
getCodeValue(e) { getCodeValue(e) {
this.code = e.detail.value this.code = e.detail.value
}, },
// code发送 // code发送
codeBind(e){ codeBind(e){
let mobile = this.mobile, let mobile = this.mobile,
myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9])\d{8}$$/ myreg = /^(14[0-9]|13[0-9]|15[0-9]|17[0-9]|18[0-9])\d{8}$$/
var _this = this var _this = this
if (mobile == "") { if (mobile == "") {
uni.showToast({ uni.showToast({
title : '手机号不能为空', title : '手机号不能为空',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else if (!myreg.test(mobile)) { }else if (!myreg.test(mobile)) {
uni.showToast({ uni.showToast({
title : '请输入正确的手机号', title : '请输入正确的手机号',
icon : 'none', icon : 'none',
duration : 1000 duration : 1000
}) })
return false; return false;
}else{ }else{
send({ send({
mobile : mobile, mobile : mobile,
channel :'DEFAULT', channel :'DEFAULT',
type :'unicom' type :'unicom'
}).then(res=>{ }).then(res=>{
uni.showToast({ uni.showToast({
title : '发送成功', title : '发送成功',
icon : 'success', icon : 'success',
duration: 2000 duration: 2000
}) })
var num = 61; var num = 61;
var timer = setInterval(function () { var timer = setInterval(function () {
num--; num--;
if (num <= 0) { if (num <= 0) {
clearInterval(timer); clearInterval(timer);
_this.codename = '重新发送', _this.codename = '重新发送',
_this.disabled = false _this.disabled = false
} else { } else {
_this.codename = num + "s后重新获取", _this.codename = num + "s后重新获取",
_this.disabled = true _this.disabled = true
} }
}, 1000) }, 1000)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: err.message title: err.message
}) })
}) })
} }
}, },
// 立即领取 // 立即领取
forgetlogin(e) { forgetlogin(e) {
let mobile = this.mobile, let mobile = this.mobile,
code = this.code, code = this.code,
that = this, that = this,
countDownNum = 5 //获取倒计时初始值 countDownNum = 5 //获取倒计时初始值
that.countDownNum = countDownNum that.countDownNum = countDownNum
unicom({ unicom({
mobile: mobile, mobile: mobile,
channel: 'DEFAULT', channel: 'DEFAULT',
code: code code: code
}).then(res=>{ }).then(res=>{
that.popContHide = !this.popContHide that.popContHide = !this.popContHide
that.popData = res that.popData = res
var timerPop = setInterval(function () { var timerPop = setInterval(function () {
countDownNum--; countDownNum--;
that.countDownNum = countDownNum that.countDownNum = countDownNum
if (countDownNum <= 0) { if (countDownNum <= 0) {
clearInterval(timerPop); clearInterval(timerPop);
that.countDownNum = 0 that.countDownNum = 0
uni.switchTab({ uni.switchTab({
url: '/pages/user/index' url: '/pages/user/index'
}) })
} }
}, 1000) }, 1000)
}) })
}, },
// 关闭弹窗 // 关闭弹窗
popClick() { popClick() {
this.popContHide = !this.popContHide this.popContHide = !this.popContHide
// 跳转 // 跳转
uni.switchTab({ uni.switchTab({
url: '/pages/user/index' url: '/pages/user/index'
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/* 红包领取 */ /* 红包领取 */
.packetCont-img { .packetCont-img {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
position: fixed; position: fixed;
} }
.packetCont-title { .packetCont-title {
width: 100vw; width: 100vw;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
left: 0; left: 0;
top: 0; top: 0;
text-align: center; text-align: center;
margin-top: 60rpx; margin-top: 60rpx;
} }
.packetText { .packetText {
position: absolute; position: absolute;
top: 16%; top: 16%;
left: 40rpx; left: 40rpx;
right: 40rpx; right: 40rpx;
text-align: center; text-align: center;
.packetText-tips { .packetText-tips {
margin: 0 auto; margin: 0 auto;
display: block; display: block;
} }
.packetText-form { .packetText-form {
background: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .7);
border-radius: 30rpx; border-radius: 30rpx;
padding: 40rpx 40rpx 70rpx 40rpx; padding: 40rpx 40rpx 70rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
color: #000; color: #000;
text-align: left; text-align: left;
margin-bottom: 100rpx; margin-bottom: 100rpx;
position: relative; position: relative;
.packetText-title { .packetText-title {
font-weight: 600; font-weight: 600;
font-size: 26rpx; font-size: 26rpx;
padding: 0 10rpx 40rpx 10rpx; padding: 0 10rpx 40rpx 10rpx;
.packetText-title-name { .packetText-title-name {
font-size: 38rpx; font-size: 38rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
} }
.packetText-label { .packetText-label {
background-color: #fff; background-color: #fff;
border-radius: 80rpx; border-radius: 80rpx;
margin-bottom: 60rpx; margin-bottom: 60rpx;
box-shadow: 0 10rpx 10rpx rgba(0, 0, 0, .4); box-shadow: 0 10rpx 10rpx rgba(0, 0, 0, .4);
display: flex; display: flex;
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
image { image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-top: 2rpx; margin-top: 2rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
.packetText-code { .packetText-code {
border: none; border: none;
background-color: transparent; background-color: transparent;
width: auto !important; width: auto !important;
padding: 0; padding: 0;
font-weight: normal; font-weight: normal;
font-size: 32rpx; font-size: 32rpx;
line-height: 40rpx !important; line-height: 40rpx !important;
&::after{ &::after{
display: none; display: none;
} }
} }
.inputs-input { .inputs-input {
position: relative; position: relative;
padding-left: 30rpx; padding-left: 30rpx;
&::after, &::after,
&::after { &::after {
position: absolute; position: absolute;
content: ''; content: '';
top: 0; top: 0;
background: #000; background: #000;
width: 4rpx; width: 4rpx;
height: 100%; height: 100%;
} }
&::after { &::after {
left: 0; left: 0;
} }
&::after { &::after {
right: 0; right: 0;
} }
} }
} }
.packetText-btn { .packetText-btn {
width: 100%; width: 100%;
text-align: center; text-align: center;
height: 90rpx; height: 90rpx;
position: absolute; position: absolute;
bottom: -40rpx; bottom: -40rpx;
left: 0; left: 0;
button { button {
width: 50%; width: 50%;
line-height: 90rpx; line-height: 90rpx;
border-radius: 25rpx; border-radius: 25rpx;
background-image: radial-gradient(#fdcf7c 50%,#fdebb8); background-image: radial-gradient(#fdcf7c 50%,#fdebb8);
border: none; border: none;
font-size: 38rpx; font-size: 38rpx;
color: #fff; color: #fff;
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
} }
text{ text{
background: linear-gradient(to bottom, #e38b3c, #cb6418); background: linear-gradient(to bottom, #e38b3c, #cb6418);
-webkit-background-clip: text; -webkit-background-clip: text;
color: transparent; color: transparent;
} }
image { image {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
vertical-align: -4rpx; vertical-align: -4rpx;
margin-left: 14rpx; margin-left: 14rpx;
} }
} }
.packetText-cozy { .packetText-cozy {
font-weight: 600; font-weight: 600;
font-size: 26rpx; font-size: 26rpx;
text { text {
display: block; display: block;
margin: 15rpx 0; margin: 15rpx 0;
position: relative; position: relative;
padding-left: 30rpx; padding-left: 30rpx;
&::after { &::after {
position: absolute; position: absolute;
content: ''; content: '';
left: 0; left: 0;
top: 12rpx; top: 12rpx;
background-color: #000; background-color: #000;
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
border-radius: 50%; border-radius: 50%;
} }
} }
} }
} }
} }
/* 弹出 */ /* 弹出 */
.popBack { .popBack {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
background-color: rgba(0, 0, 0, .8); background-color: rgba(0, 0, 0, .8);
z-index: 8; z-index: 8;
display: none; display: none;
} }
.popCont { .popCont {
position: fixed; position: fixed;
z-index: 9; z-index: 9;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
text-align: center; text-align: center;
display: none; display: none;
.popCont-text { .popCont-text {
padding: 0 10rpx; padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
position: absolute; position: absolute;
z-index: 10; z-index: 10;
left: 20%; left: 20%;
top: 340px; top: 340px;
width: 60%; width: 60%;
.popCont-name { .popCont-name {
margin-bottom: 50rpx; margin-bottom: 50rpx;
font-size: 30rpx; font-size: 30rpx;
text { text {
font-size: 40rpx; font-size: 40rpx;
color: #fd5238; color: #fd5238;
padding: 0 10rpx; padding: 0 10rpx;
} }
} }
.popCont-btn { .popCont-btn {
background-color: #ffea37; background-color: #ffea37;
color: #ff3900; color: #ff3900;
display: inline-block; display: inline-block;
border-radius: 80rpx; border-radius: 80rpx;
padding: 20rpx 70rpx; padding: 20rpx 70rpx;
box-shadow: 0 10rpx 10rpx rgba(196, 160, 0, 0.4); box-shadow: 0 10rpx 10rpx rgba(196, 160, 0, 0.4);
} }
} }
} }
.popBack.active, .popBack.active,
.popCont.active { .popCont.active {
display: block; display: block;
} }
</style> </style>

View File

@@ -1,230 +1,235 @@
<template> <template>
<view> <view>
<!-- 门店详情 --> <!-- 门店详情 -->
<view class="detailsImg"> <view class="detailsImg">
<image :src="storeinfo.cover" mode="aspectFill"></image> <image :src="storeinfo.cover" mode="aspectFill"></image>
</view> </view>
<view class="detailsCont"> <view class="detailsCont">
<view class="detailsName"> <view class="detailsName">
{{ storeinfo.title }} {{ storeinfo.title }}
</view> </view>
<view class="detailsLabel"> <view class="detailsLabel">
<view class="detailsLabel-left"> <view class="detailsLabel-left">
<image src="/static/static/icon/site_icon.png"></image> <image src="/static/static/icon/site_icon.png"></image>
<view class="detailsLabel-name"> <view class="detailsLabel-name">
<text>{{ storeinfo.address }}</text> <text>{{ storeinfo.address }}</text>
距您 {{ distance }} 距您 {{ distance }}
</view> </view>
</view> </view>
<image class="detailsLabel-tel" src="/static/icon/tel.png" @tap="tel"></image> <image class="detailsLabel-tel" src="/static/icon/tel.png" @tap="tel"></image>
</view> </view>
<view class="detailsLabel"> <view class="detailsLabel">
<view class="detailsLabel-left"> <view class="detailsLabel-left">
<image src="/static/icon/time_icon.png"></image> <image src="/static/icon/time_icon.png"></image>
<view class="detailsLabel-name"> <view class="detailsLabel-name">
<text>营业时间</text> <text>营业时间</text>
<block v-if="storeinfo.open_time != null">{{ storeinfo.open_time }}</block> <block v-if="storeinfo.open_time != null">{{ storeinfo.open_time }}</block>
<block v-else>0000</block> <block v-else>0000</block>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 按钮 --> <!-- 按钮 -->
<view class="detailsBtn"> <view class="detailsBtn">
<view class="detailsBtn-cont" @tap="siteMap"> <view class="detailsBtn-cont" @tap="siteMap">
去导航 去导航
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { storesShow } from '@/apis/interfaces/user' import { storesShow } from '@/apis/interfaces/user'
export default { export default {
data() { data() {
return { return {
storeinfo : '', // 门店详情 storeinfo : '', // 门店详情
distance : 0, // 门店距离换算 distance : 0, // 门店距离换算
longitude : 0, // 门店详情 longitude : 0, // 门店详情
latitude : 0, // 门店详情 latitude : 0, // 门店详情
}; };
}, },
onLoad(options){ onLoad(options){
storesShow({ storesShow({
store_id: options.store_id, store_id: options.store_id,
user_lng: options.user_lng, user_lng: options.user_lng,
user_lat: options.user_lat user_lat: options.user_lat
}).then(res => { }).then(res => {
let distance = res.distance; let distance = res.distance;
if (distance > 1000) { if (distance > 1000) {
distance = distance / 1000 + "km"; distance = distance / 1000 + "km";
} else { } else {
distance = distance + "m"; distance = distance + "m";
} }
this.storeinfo = res this.storeinfo = res
this.distance = distance this.distance = distance
}).catch(err => { }).catch(err => {
if (!err.login) { if (!err.login) {
if(options.type == 'campus') { if(options.type == 'campus') {
uni.showModal({ uni.showModal({
title: '用户登录已过期', title: '用户登录已过期',
content: '请重新登录', content: '请重新登录',
showCancel: false, showCancel: false,
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/campus/signin' url: '/pages/campus/signin'
}); });
} }
} }
}) })
}else { }else {
uni.showModal({ uni.showModal({
title: '用户登录已过期', title: '用户登录已过期',
content: '请重新登录', content: '请重新登录',
showCancel: false, showCancel: false,
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/auth/login' url: '/pages/auth/login'
}); });
} }
} }
}) })
} }
} }
}) })
}, },
methods:{ methods:{
// 拨打电话 // 拨打电话
tel(e) { tel(e) {
let tel = this.storeinfo.mobile let tel = this.storeinfo.mobile
uni.showActionSheet({ uni.showActionSheet({
itemList : ['呼叫商家'], itemList : ['呼叫商家'],
success : res =>{ success : res =>{
if(res.tapIndex==0){ if(res.tapIndex==0){
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: tel phoneNumber: tel
}) })
} }
} }
}) })
}, },
// 导航 // 导航
siteMap(){ siteMap(){
uni.openLocation({ // uni.openLocation({
latitude : parseFloat(this.storeinfo.latitude), // latitude : parseFloat(this.storeinfo.latitude),
longitude : parseFloat(this.storeinfo.longitude), // longitude : parseFloat(this.storeinfo.longitude),
address : this.storeinfo.address // address : this.storeinfo.address
}) // })
} let key = '34ea3d2958aee3ffc154738551a976f9',//高德地图key
} latitude = parseFloat(this.storeinfo.latitude),
longitude = parseFloat(this.storeinfo.longitude)
window.location.href = "http://uri.amap.com/marker?position="+ longitude +","+latitude +"&name="+ name +"&coordinate=gaode&callnative=1";
}
}
} }
</script> </script>
<style> <style>
/* 门店详情 */ /* 门店详情 */
.detailsImg { .detailsImg {
position: relative; position: relative;
width: 100%; width: 100%;
padding-top: 60%; padding-top: 60%;
} }
.detailsImg image { .detailsImg image {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.detailsCont { .detailsCont {
background: #fff; background: #fff;
} }
.detailsName { .detailsName {
font-size: 34rpx; font-size: 34rpx;
padding: 30rpx; padding: 30rpx;
font-weight: 600; font-weight: 600;
box-sizing: border-box; box-sizing: border-box;
} }
.detailsLabel { .detailsLabel {
display: flex; display: flex;
padding: 30rpx; padding: 30rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
} }
.detailsLabel::after { .detailsLabel::after {
position: absolute; position: absolute;
content: ''; content: '';
left: 0; left: 0;
top: 0; top: 0;
background: #e7e7e7; background: #e7e7e7;
width: 100%; width: 100%;
height: 2rpx; height: 2rpx;
} }
.detailsLabel-left { .detailsLabel-left {
width: calc(100%- 40rpx); width: calc(100%- 40rpx);
display: flex; display: flex;
flex: 1; flex: 1;
color: #5e5e5e; color: #5e5e5e;
} }
.detailsLabel-left image { .detailsLabel-left image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin: 20rpx 20rpx 0 0; margin: 20rpx 20rpx 0 0;
} }
.detailsLabel-tel { .detailsLabel-tel {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
margin-top: 14rpx; margin-top: 14rpx;
} }
.detailsLabel-name { .detailsLabel-name {
font-size: 26rpx; font-size: 26rpx;
width: calc(100% - 110rpx); width: calc(100% - 110rpx);
margin-right: 10rpx; margin-right: 10rpx;
} }
.detailsLabel-name text { .detailsLabel-name text {
font-weight: 600; font-weight: 600;
font-size: 30rpx; font-size: 30rpx;
display: block; display: block;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.detailsLabel-add { .detailsLabel-add {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
margin-top: 24rpx; margin-top: 24rpx;
} }
.detailsBtn { .detailsBtn {
background: #fff; background: #fff;
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
left: 0; left: 0;
bottom: 0; bottom: 0;
position: fixed; position: fixed;
padding: 20rpx; padding: 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.detailsBtn-cont { .detailsBtn-cont {
width: 100%; width: 100%;
background: #ef8e41; background: #ef8e41;
color: #fff; color: #fff;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
border-radius: 50rpx; border-radius: 50rpx;
} }
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 KiB

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/img/superRed-img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

BIN
static/img/superRed.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB