[本时生活H5]
@@ -1,78 +1,116 @@
|
||||
/**
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
import request from '../request'
|
||||
|
||||
// 月兑活动 - 首页
|
||||
const index = (data) => {
|
||||
return request({
|
||||
url: 'months'
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 商品详情
|
||||
const details = (month_id) => {
|
||||
return request({
|
||||
url : "months/" + month_id
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 确认订单
|
||||
const buy = (data) => {
|
||||
return request({
|
||||
url : "months/buy",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 提交订单
|
||||
const buySubmit = (data) => {
|
||||
return request({
|
||||
url : "months/buy",
|
||||
method : "POST",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 优惠券列表
|
||||
const logs = (data) => {
|
||||
return request({
|
||||
url : "account/logs",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 账变列表
|
||||
const coupon = (data) => {
|
||||
return request({
|
||||
url : "months/coupons",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 兑换列表
|
||||
const monthsList = (category_id) => {
|
||||
return request({
|
||||
url : "months/goods/" + category_id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 月兑活动 - 兑换列表
|
||||
const monthsChoose = (category_id) => {
|
||||
return request({
|
||||
url : "months/category/" + category_id + "/choose"
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
index,
|
||||
details,
|
||||
buy,
|
||||
buySubmit,
|
||||
coupon,
|
||||
logs,
|
||||
monthsList,
|
||||
monthsChoose
|
||||
*/
|
||||
import request from '../request'
|
||||
|
||||
// 月兑活动 - 首页
|
||||
const index = (data) => {
|
||||
return request({
|
||||
url: 'months'
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 商品详情
|
||||
const details = (month_id) => {
|
||||
return request({
|
||||
url : "months/" + month_id
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 确认订单
|
||||
const buy = (data) => {
|
||||
return request({
|
||||
url : "months/buy",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 提交订单
|
||||
const buySubmit = (data) => {
|
||||
return request({
|
||||
url : "months/buy",
|
||||
method : "POST",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 优惠券列表
|
||||
const logs = (data) => {
|
||||
return request({
|
||||
url : "account/logs",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 账变列表
|
||||
const coupon = (data) => {
|
||||
return request({
|
||||
url : "months/coupons",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 兑换列表
|
||||
const monthsList = (category_id) => {
|
||||
return request({
|
||||
url : "months/goods/" + category_id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 月兑活动 - 兑换列表
|
||||
const monthsChoose = (category_id) => {
|
||||
return request({
|
||||
url : "months/category/" + category_id + "/choose"
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 领取红包
|
||||
const monthsPacket = (data) => {
|
||||
return request({
|
||||
url : "months/red_packet",
|
||||
data : data
|
||||
})
|
||||
}
|
||||
|
||||
// 月兑活动 - 可用商家列表
|
||||
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
|
||||
}
|
||||
@@ -1,73 +1,84 @@
|
||||
|
||||
|
||||
/**
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
import request from '../request.js'
|
||||
|
||||
// 活动权益内容
|
||||
const activity = (data) => {
|
||||
return request({
|
||||
url: 'home',
|
||||
data: data
|
||||
})
|
||||
*/
|
||||
|
||||
import request from '../request.js'
|
||||
|
||||
// 活动权益内容
|
||||
const activity = (data) => {
|
||||
return request({
|
||||
url: 'home',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 钻石+白金权益内容
|
||||
const index = (data) => {
|
||||
return request({
|
||||
url: 'home/group',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 周五福利日订阅
|
||||
const subscribe = (subscribe) => {
|
||||
return request({
|
||||
url: 'wechat/' + subscribe + "/welfare_subscribe",
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
// 所有城市-最新无字母
|
||||
const newCity = () => {
|
||||
return request({
|
||||
url: 'ajax/all_right_citys'
|
||||
})
|
||||
}
|
||||
|
||||
// 市区选择-最新无字母
|
||||
const newidxCity = (data) => {
|
||||
return request({
|
||||
url: 'ajax/all_right_children',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// h5掉起微信授权的前置获取相关的签名信息前置
|
||||
const subscribeUrl = (data) => {
|
||||
return request({
|
||||
url: 'auth/jssdk',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
const subscribeH5 = (subscribe, channel) => {
|
||||
return request({
|
||||
url: "wechat/" + subscribe + "/welfare_subscribe",
|
||||
method: "POST",
|
||||
data: {
|
||||
channel: 'h5'
|
||||
}
|
||||
})
|
||||
}
|
||||
export {
|
||||
activity,
|
||||
index,
|
||||
subscribe,
|
||||
newCity,
|
||||
newidxCity,
|
||||
subscribeUrl,
|
||||
subscribeH5
|
||||
|
||||
// 钻石+白金权益内容
|
||||
const index = (data) => {
|
||||
return request({
|
||||
url: 'home/group',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 周五福利日订阅
|
||||
const subscribe = (subscribe) => {
|
||||
return request({
|
||||
url: 'wechat/' + subscribe + "/welfare_subscribe",
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
// 所有城市-最新无字母
|
||||
const newCity = () => {
|
||||
return request({
|
||||
url: 'ajax/all_right_citys'
|
||||
})
|
||||
}
|
||||
|
||||
// 市区选择-最新无字母
|
||||
const newidxCity = (data) => {
|
||||
return request({
|
||||
url: 'ajax/all_right_children',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// h5掉起微信授权的前置获取相关的签名信息前置
|
||||
const subscribeUrl = (data) => {
|
||||
return request({
|
||||
url: 'auth/jssdk',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
const subscribeH5 = (subscribe, channel) => {
|
||||
return request({
|
||||
url: "wechat/" + subscribe + "/welfare_subscribe",
|
||||
method: "POST",
|
||||
data: {
|
||||
channel: 'h5'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 营业厅列表
|
||||
const hallsIndex = (data) => {
|
||||
return request({
|
||||
url: "halls",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
activity,
|
||||
index,
|
||||
subscribe,
|
||||
newCity,
|
||||
newidxCity,
|
||||
subscribeUrl,
|
||||
subscribeH5,
|
||||
hallsIndex
|
||||
}
|
||||
@@ -1,419 +1,429 @@
|
||||
|
||||
|
||||
/**
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
import request from '../request.js'
|
||||
|
||||
// 活动权益内容
|
||||
const index = () => {
|
||||
return request({
|
||||
url: 'user'
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券详情
|
||||
const couponinfo = (data) => {
|
||||
return request({
|
||||
url: 'coupons/show',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券二维码
|
||||
const qrcode = (coupon_id) => {
|
||||
return request({
|
||||
url: 'coupons/qrcode',
|
||||
data: {
|
||||
coupon_id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券条形码
|
||||
const barcode = (coupon_id) => {
|
||||
return request({
|
||||
url: 'coupons/' + coupon_id + '/barcode'
|
||||
})
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
import request from '../request.js'
|
||||
|
||||
// 活动权益内容
|
||||
const index = () => {
|
||||
return request({
|
||||
url: 'user'
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券详情
|
||||
const couponinfo = (data) => {
|
||||
return request({
|
||||
url: 'coupons/show',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券二维码
|
||||
const qrcode = (coupon_id) => {
|
||||
return request({
|
||||
url: 'coupons/qrcode',
|
||||
data: {
|
||||
coupon_id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券条形码
|
||||
const barcode = (coupon_id) => {
|
||||
return request({
|
||||
url: 'coupons/' + coupon_id + '/barcode'
|
||||
})
|
||||
}
|
||||
|
||||
// 卡券列表
|
||||
const coupon = (status) => {
|
||||
return request({
|
||||
url: 'coupons?status=' + status
|
||||
})
|
||||
}
|
||||
const coupon = (status) => {
|
||||
return request({
|
||||
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) => {
|
||||
return request({
|
||||
url: 'coupons/list',
|
||||
data: data
|
||||
})
|
||||
// 订单收益列表-下级明细
|
||||
const profitsNext = (data) => {
|
||||
return request({
|
||||
url: 'data/profitlogs',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 积分账变记录
|
||||
const logs = (data) => {
|
||||
return request({
|
||||
url: 'account/logs',
|
||||
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 cards = (data) => {
|
||||
return request({
|
||||
url: 'user/cards/activate',
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 冻结列表
|
||||
const ungrants = (type) => {
|
||||
return request({
|
||||
url: 'account/newungrants',
|
||||
data: {
|
||||
type
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const ungrants = (type) => {
|
||||
return request({
|
||||
url: 'account/newungrants',
|
||||
data: {
|
||||
type
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 冻结列表-最新
|
||||
const ungrantsNew = (data) => {
|
||||
return request({
|
||||
url: 'account/unaccountgrants',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 洗车券-获取跳转地址
|
||||
const washcarCoupon = (coupon) => {
|
||||
return request({
|
||||
url: 'washcar/' + coupon + "/info",
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
const washcarCoupon = (coupon) => {
|
||||
return request({
|
||||
url: 'washcar/' + coupon + "/info",
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
//权益商品订单列表
|
||||
const orders = (data) => {
|
||||
return request({
|
||||
url: 'orders/index',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//权益订单列表
|
||||
const ordersCoupons = (data) => {
|
||||
return request({
|
||||
url: 'orders/coupons',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//取消兑换订单
|
||||
const cancel = (orderid) => {
|
||||
return request({
|
||||
url: 'orders/cancel?orderid=' + orderid,
|
||||
method: "POST"
|
||||
})
|
||||
const orders = (data) => {
|
||||
return request({
|
||||
url: 'orders/index',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//权益订单列表
|
||||
const ordersCoupons = (data) => {
|
||||
return request({
|
||||
url: 'orders/coupons',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//取消兑换订单
|
||||
const cancel = (orderid) => {
|
||||
return request({
|
||||
url: 'orders/cancel?orderid=' + orderid,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
// 福利商品订单列表
|
||||
const welfare = (data) => {
|
||||
return request({
|
||||
url: 'welfares/orders',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
const welfare = (data) => {
|
||||
return request({
|
||||
url: 'welfares/orders',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 福利券订单列表
|
||||
const welfareCoupons = (data) => {
|
||||
return request({
|
||||
url: 'welfares/coupons',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
const welfareCoupons = (data) => {
|
||||
return request({
|
||||
url: 'welfares/coupons',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 福利取消订单
|
||||
const welfaresCancel = (orderid) => {
|
||||
return request({
|
||||
url: 'welfares/orders/cancel?orderid=' + orderid,
|
||||
method: "POST"
|
||||
})
|
||||
const welfaresCancel = (orderid) => {
|
||||
return request({
|
||||
url: 'welfares/orders/cancel?orderid=' + orderid,
|
||||
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) => {
|
||||
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 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 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
|
||||
})
|
||||
}
|
||||
|
||||
// 2021-07-28新增
|
||||
// 我的收益
|
||||
const myProfit = () => {
|
||||
return request({
|
||||
url: 'data/index'
|
||||
})
|
||||
const myProfit = () => {
|
||||
return request({
|
||||
url: 'data/index'
|
||||
})
|
||||
}
|
||||
|
||||
// 我的收益-收益报表
|
||||
const myIncome = (month) => {
|
||||
return request({
|
||||
url: 'data/income',
|
||||
data:{
|
||||
month
|
||||
}
|
||||
})
|
||||
// 我的收益-收益报表
|
||||
const myIncome = (month) => {
|
||||
return request({
|
||||
url: 'data/income',
|
||||
data:{
|
||||
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) => {
|
||||
return request({
|
||||
url: url,
|
||||
data: data
|
||||
})
|
||||
// 转账提交表单
|
||||
const transfersForm = (data) => {
|
||||
return request({
|
||||
url: 'user/transfers',
|
||||
method: "POST",
|
||||
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 transfersForm = (data) => {
|
||||
return request({
|
||||
url: 'user/transfers',
|
||||
method: "POST",
|
||||
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 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 = () => {
|
||||
return request({
|
||||
url: 'shares/recharges'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
index,
|
||||
couponinfo,
|
||||
qrcode,
|
||||
barcode,
|
||||
coupon,
|
||||
couponArr,
|
||||
logs,
|
||||
profits,
|
||||
profitsNext,
|
||||
cards,
|
||||
ungrants,
|
||||
washcarCoupon,
|
||||
orders,
|
||||
ordersCoupons,
|
||||
cancel,
|
||||
welfare,
|
||||
welfareCoupons,
|
||||
welfaresCancel,
|
||||
show,
|
||||
welfaresShow,
|
||||
upload,
|
||||
send,
|
||||
setPassword,
|
||||
changePassword,
|
||||
resetPassword,
|
||||
stores,
|
||||
storesShow,
|
||||
areas,
|
||||
myProfit,
|
||||
myIncome,
|
||||
profitUrl,
|
||||
withdraws,
|
||||
withdrawsList,
|
||||
withdrawsForm,
|
||||
profitLogs,
|
||||
transfers,
|
||||
transfersForm,
|
||||
ajaxTel,
|
||||
productList,
|
||||
productInfo,
|
||||
productPoster,
|
||||
myshare,
|
||||
publicCode,
|
||||
storedList
|
||||
const storedList = () => {
|
||||
return request({
|
||||
url: 'shares/recharges'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
index,
|
||||
couponinfo,
|
||||
qrcode,
|
||||
barcode,
|
||||
coupon,
|
||||
couponArr,
|
||||
logs,
|
||||
profits,
|
||||
profitsNext,
|
||||
cards,
|
||||
ungrants,
|
||||
ungrantsNew,
|
||||
washcarCoupon,
|
||||
orders,
|
||||
ordersCoupons,
|
||||
cancel,
|
||||
welfare,
|
||||
welfareCoupons,
|
||||
welfaresCancel,
|
||||
show,
|
||||
welfaresShow,
|
||||
upload,
|
||||
send,
|
||||
setPassword,
|
||||
changePassword,
|
||||
resetPassword,
|
||||
stores,
|
||||
storesShow,
|
||||
areas,
|
||||
myProfit,
|
||||
myIncome,
|
||||
profitUrl,
|
||||
withdraws,
|
||||
withdrawsList,
|
||||
withdrawsForm,
|
||||
profitLogs,
|
||||
transfers,
|
||||
transfersForm,
|
||||
ajaxTel,
|
||||
productList,
|
||||
productInfo,
|
||||
productPoster,
|
||||
myshare,
|
||||
publicCode,
|
||||
storedList
|
||||
}
|
||||
268
apis/request.js
@@ -1,140 +1,140 @@
|
||||
|
||||
|
||||
/**
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
import store from '@/store'
|
||||
|
||||
// 基础配置
|
||||
|
||||
// 基础配置
|
||||
// https://lifetest.ysd-bs.com //测试地址
|
||||
// https://card.ysd-bs.com
|
||||
const config = {
|
||||
// apiUrl : 'https://lifetest.ysd-bs.com/api/',
|
||||
apiUrl : 'https://card.ysd-bs.com/api/',
|
||||
timeout: 60000
|
||||
}
|
||||
|
||||
let loginHintState = false
|
||||
|
||||
// 网络请求
|
||||
const request = (parameter) => {
|
||||
// 检查url配置
|
||||
if(parameter.url === 'undefined' || parameter.url === '') {
|
||||
uni.showToast({
|
||||
title: '请求地址不能为空',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 注入header
|
||||
config.header = {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': store.getters.getToken || ''
|
||||
}
|
||||
// 请求实例
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url : config.apiUrl + parameter.url,
|
||||
timeout : config.timeout,
|
||||
header : config.header || {},
|
||||
data : parameter.data || {},
|
||||
method : parameter.method || 'GET',
|
||||
success: res => {
|
||||
if (res.header.Authorization) {
|
||||
updateToken('token', res.header.Authorization)
|
||||
}
|
||||
if (res.statusCode === 200) {
|
||||
const resolveData = res.data
|
||||
if(resolveData.status_code === 200) {
|
||||
resolve(resolveData.data)
|
||||
return
|
||||
}
|
||||
if (resolveData.status_code === 401) {
|
||||
loginHint()
|
||||
return
|
||||
}
|
||||
reject(resolveData)
|
||||
return
|
||||
}
|
||||
errToast(res.statusCode)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 处理一些http请求错误提示
|
||||
const errToast = (code) => {
|
||||
switch (code){
|
||||
case 404:
|
||||
uni,uni.showToast({
|
||||
title: code + '接口不存在,请联系系统管理员',
|
||||
icon : none
|
||||
})
|
||||
break;
|
||||
case 405:
|
||||
uni.showToast({
|
||||
title: code + '请检查接口请求方式错误',
|
||||
icon :'none'
|
||||
})
|
||||
break;
|
||||
case 500:
|
||||
uni.showToast({
|
||||
title: code + '服务端错误,请检查服务器信息',
|
||||
icon : 'none'
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 更新token
|
||||
const updateToken = (token) => {
|
||||
store.commit('setToken', token)
|
||||
}
|
||||
|
||||
// 处理登录提示
|
||||
const loginHint = () => {
|
||||
if(loginHintState) return
|
||||
if(!loginHintState) loginHintState = true
|
||||
updateToken('')
|
||||
uni.showModal({
|
||||
title:'登录提示',
|
||||
content:'您的登录信息已过期,请重新登录',
|
||||
confirmColor:'#33f800',
|
||||
showCancel:false,
|
||||
success: res => {
|
||||
console.log(getApp().globalData.envType)
|
||||
loginHintState = false
|
||||
if(res.confirm){
|
||||
if(getApp().globalData.envType == 'campusEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/campus/signin'
|
||||
})
|
||||
} else if(getApp().globalData.envType == 'oilEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/oil/signin'
|
||||
})
|
||||
}else if(getApp().globalData.envType == 'unicomEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/unicom/signin'
|
||||
})
|
||||
}else if(getApp().globalData.envType == 'drawEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/draw/signin'
|
||||
})
|
||||
}else if(getApp().globalData.envType == 'giftPEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/giftPack/signin'
|
||||
})
|
||||
}else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/auth/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// https://card.ysd-bs.com
|
||||
const config = {
|
||||
// apiUrl : 'https://lifetest.ysd-bs.com/api/', //测试地址
|
||||
apiUrl : 'https://card.ysd-bs.com/api/', //正式地址
|
||||
timeout: 60000
|
||||
}
|
||||
|
||||
let loginHintState = false
|
||||
|
||||
// 网络请求
|
||||
const request = (parameter) => {
|
||||
// 检查url配置
|
||||
if(parameter.url === 'undefined' || parameter.url === '') {
|
||||
uni.showToast({
|
||||
title: '请求地址不能为空',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 注入header
|
||||
config.header = {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': store.getters.getToken || ''
|
||||
}
|
||||
// 请求实例
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url : config.apiUrl + parameter.url,
|
||||
timeout : config.timeout,
|
||||
header : config.header || {},
|
||||
data : parameter.data || {},
|
||||
method : parameter.method || 'GET',
|
||||
success: res => {
|
||||
if (res.header.Authorization) {
|
||||
updateToken('token', res.header.Authorization)
|
||||
}
|
||||
if (res.statusCode === 200) {
|
||||
const resolveData = res.data
|
||||
if(resolveData.status_code === 200) {
|
||||
resolve(resolveData.data)
|
||||
return
|
||||
}
|
||||
if (resolveData.status_code === 401) {
|
||||
loginHint()
|
||||
return
|
||||
}
|
||||
reject(resolveData)
|
||||
return
|
||||
}
|
||||
errToast(res.statusCode)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 处理一些http请求错误提示
|
||||
const errToast = (code) => {
|
||||
switch (code){
|
||||
case 404:
|
||||
uni,uni.showToast({
|
||||
title: code + '接口不存在,请联系系统管理员',
|
||||
icon : none
|
||||
})
|
||||
break;
|
||||
case 405:
|
||||
uni.showToast({
|
||||
title: code + '请检查接口请求方式错误',
|
||||
icon :'none'
|
||||
})
|
||||
break;
|
||||
case 500:
|
||||
uni.showToast({
|
||||
title: code + '服务端错误,请检查服务器信息',
|
||||
icon : 'none'
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 更新token
|
||||
const updateToken = (token) => {
|
||||
store.commit('setToken', token)
|
||||
}
|
||||
|
||||
// 处理登录提示
|
||||
const loginHint = () => {
|
||||
if(loginHintState) return
|
||||
if(!loginHintState) loginHintState = true
|
||||
updateToken('')
|
||||
uni.showModal({
|
||||
title:'登录提示',
|
||||
content:'您的登录信息已过期,请重新登录',
|
||||
confirmColor:'#33f800',
|
||||
showCancel:false,
|
||||
success: res => {
|
||||
console.log(getApp().globalData.envType)
|
||||
loginHintState = false
|
||||
if(res.confirm){
|
||||
if(getApp().globalData.envType == 'campusEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/campus/signin'
|
||||
})
|
||||
} else if(getApp().globalData.envType == 'oilEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/oil/signin'
|
||||
})
|
||||
}else if(getApp().globalData.envType == 'unicomEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/unicom/signin'
|
||||
})
|
||||
}else if(getApp().globalData.envType == 'drawEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/draw/signin'
|
||||
})
|
||||
}else if(getApp().globalData.envType == 'giftPEnv') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/giftPack/signin'
|
||||
})
|
||||
}else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/auth/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default request
|
||||
1
main.js
@@ -14,7 +14,6 @@ Vue.prototype.$wx = require('jweixin-module')
|
||||
App.mpType = 'app'
|
||||
|
||||
|
||||
|
||||
// jsonp
|
||||
Vue.use(VueJsonp)
|
||||
|
||||
|
||||
@@ -18,27 +18,29 @@
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Payment" : {}
|
||||
"Payment" : {},
|
||||
"Maps" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<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\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<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.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_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-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\"/>"
|
||||
]
|
||||
},
|
||||
@@ -53,7 +55,13 @@
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"ad" : {}
|
||||
"ad" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "73f1992898e143896d4529a8ffead6c3",
|
||||
"appkey_android" : "73f1992898e143896d4529a8ffead6c3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
70
package-lock.json
generated
@@ -1,69 +1,35 @@
|
||||
{
|
||||
"name": "ysdH5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"encoding": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmmirror.com/encoding/-/encoding-0.1.13.tgz",
|
||||
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
|
||||
"requires": {
|
||||
"iconv-lite": "^0.6.2"
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@vuemap/amap-jsapi-loader": "^1.0.3",
|
||||
"jweixin-module": "^1.6.0",
|
||||
"vue-jsonp": "^2.0.0",
|
||||
"weixin-js-sdk": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
}
|
||||
"node_modules/@vuemap/amap-jsapi-loader": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/@vuemap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.3.tgz",
|
||||
"integrity": "sha512-GdRWm7IAto18TJLySjm8JehNPlvYW8cNaqqnb1CQHvpr7k3zkGdvCrv+7H/Op1HaLMCt4LQsUjEAkiAqUfqZ7A=="
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ=="
|
||||
},
|
||||
"jweixin-module": {
|
||||
"node_modules/jweixin-module": {
|
||||
"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=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"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": {
|
||||
"node_modules/vue-jsonp": {
|
||||
"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=="
|
||||
},
|
||||
"weixin-js-sdk": {
|
||||
"node_modules/weixin-js-sdk": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
|
||||
"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
@@ -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"
|
||||
}
|
||||
}
|
||||
32
pages.json
@@ -10,7 +10,7 @@
|
||||
},{
|
||||
"path": "pages/giftPack/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "超级红包活动",
|
||||
"navigationBarTitleText": "联通合约送全额消费金",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
@@ -64,10 +64,22 @@
|
||||
"navigationBarTitleText": "重置密码",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/giftPack/superRed",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "领取消费金",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/giftPack/logsFrozen",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "待发放",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/giftPack/logs",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "积分记录",
|
||||
"navigationBarTitleText": "余额明细记录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
@@ -417,7 +429,7 @@
|
||||
},{
|
||||
"path": "pages/campus/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校园迎新活动",
|
||||
"navigationBarTitleText": "消费金兑换活动",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
@@ -445,7 +457,7 @@
|
||||
},{
|
||||
"path": "pages/campus/signin",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校园迎新活动 登录",
|
||||
"navigationBarTitleText": "消费金兑换活动登录",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
@@ -488,6 +500,12 @@
|
||||
"navigationBarTitleText": "重置密码",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/campus/campusPay",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "收银台",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/userGoods/index",
|
||||
"style" : {
|
||||
@@ -710,6 +728,12 @@
|
||||
"navigationBarTitleText": "兑换成功",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/business/business",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "附近营业厅",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
|
||||
@@ -106,7 +106,12 @@
|
||||
_this.disabled = true
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(err=>{})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
273
pages/business/business.vue
Normal 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>
|
||||
1344
pages/campus/buy.vue
692
pages/campus/campusPay.vue
Normal 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>
|
||||
@@ -1,109 +1,133 @@
|
||||
<template>
|
||||
<view>
|
||||
<image class="campusBanner" src="/static/img/campusIdx_back.png" mode="widthFix"></image>
|
||||
<view class="recommend">
|
||||
<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">
|
||||
<image :src="item.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="nowrap recommend-label-text">
|
||||
{{ item.title }}<text>{{ item.name }}</text>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 电影券 -->
|
||||
<view class="film">
|
||||
<view class="filmTitle">
|
||||
电影院优惠券
|
||||
</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="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 class="film">
|
||||
<view class="filmTitle">
|
||||
洗浴优惠券
|
||||
</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">
|
||||
<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 class="film">
|
||||
<view class="filmTitle">
|
||||
超市券
|
||||
</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">
|
||||
<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 class="film">
|
||||
<view class="filmTitle">
|
||||
餐饮优惠券
|
||||
</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>
|
||||
<!-- <image class="campusBanner" src="/static/img/campusIdx_back.png" mode="widthFix"></image> -->
|
||||
<view class="bottomTop">
|
||||
<!-- 卡片轮播 -->
|
||||
<view class="indexBanner">
|
||||
<view class="banner">
|
||||
<swiper class="banner-swiper" interval="5000" autoplay indicator-dots>
|
||||
<swiper-item >
|
||||
<image class="banner-img" src="https://lifetest.ysd-bs.com/storage/materials/2023/09/20/微信图片_20230919170443.jpg"></image>
|
||||
</swiper-item>
|
||||
<swiper-item >
|
||||
<image class="banner-img" src="https://lifetest.ysd-bs.com/storage/materials/2023/09/20/微信图片_20230919170449.jpg"></image>
|
||||
</swiper-item>
|
||||
<swiper-item >
|
||||
<image class="banner-img" src="https://lifetest.ysd-bs.com/storage/materials/2023/09/19/微信图片_20230919170456.jpg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="recommend">
|
||||
<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">
|
||||
<image :src="item.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="nowrap recommend-label-text">
|
||||
{{ item.title }}<text>{{ item.name }}</text>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 39元套餐包年兑换480元消费金 -->
|
||||
<view class="film">
|
||||
<view class="filmTitle">
|
||||
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="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>
|
||||
|
||||
<!-- 59元套餐包年兑换720元消费金 -->
|
||||
<view class="film">
|
||||
<view class="filmTitle">
|
||||
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="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>
|
||||
|
||||
<!-- 云盘套餐包年兑换180元消费金 -->
|
||||
<view class="film">
|
||||
<view class="filmTitle">
|
||||
云盘套餐包年兑换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="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>
|
||||
|
||||
<!-- 99元套餐包年兑换960元消费金 -->
|
||||
<view class="film">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@@ -186,11 +210,37 @@
|
||||
.campusBanner {
|
||||
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 {
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
.recommend-label {
|
||||
@@ -306,18 +356,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 按钮
|
||||
.bottomTop {
|
||||
border-bottom: 80rpx solid transparent;
|
||||
}
|
||||
|
||||
// 按钮
|
||||
.campusBtn {
|
||||
background: linear-gradient(to right, #474d73, #28314e);
|
||||
box-shadow: 0px 6px 10px rgba(188,152,90,.5);
|
||||
border-radius: 60rpx;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
margin: 30rpx 60rpx 0;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
text {
|
||||
color: #bd9045;
|
||||
.campusBtn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding:30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #cbaf7f;
|
||||
.campusBtn-go {
|
||||
font-size: 36rpx;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="campus-header">
|
||||
<view class="logo">
|
||||
<image src="/static/img/campusLogin_logo.png" mode="aspectFill"></image>
|
||||
<view class="title">身份验证</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 class="campus-cont">
|
||||
<view class="campus-cont">
|
||||
<form @submit="forgetlogin">
|
||||
<view class="campus-inputs">
|
||||
<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>
|
||||
<button class="campus-form-code" @tap="getCode" :disabled="disabled" hover-class="none">{{ codename }}</button>
|
||||
</view>
|
||||
<button class="campus-form-btn" form-type="submit">设置新密码</button>
|
||||
<button class="campus-form-btn" form-type="submit">设置新密码</button>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { send, auth } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
codename : '获取验证码',
|
||||
mobileNo : '', // 手机号
|
||||
code : '', // 验证码
|
||||
disabled : false,
|
||||
}
|
||||
<script>
|
||||
import { send, auth } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
codename : '获取验证码',
|
||||
mobileNo : '', // 手机号
|
||||
code : '', // 验证码
|
||||
disabled : false,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
// 切换登录方式
|
||||
onCutLogin(){
|
||||
this.passwordLogin = !this.passwordLogin
|
||||
},
|
||||
// mobileNo
|
||||
getNameValue(e) {
|
||||
this.mobileNo = e.detail.value
|
||||
},
|
||||
|
||||
// 获取code
|
||||
getCode(){
|
||||
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}$$/
|
||||
|
||||
var _this = this
|
||||
if (mobileNo == "") {
|
||||
uni.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else if (!myreg.test(mobileNo)) {
|
||||
uni.showToast({
|
||||
title : '请输入正确的手机号',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
send({mobile: mobileNo, channel: 'LOGIN'}).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=>{})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取后输入code
|
||||
getCodeValue (e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
},
|
||||
// mobileNo
|
||||
getNameValue(e) {
|
||||
this.mobileNo = e.detail.value
|
||||
},
|
||||
|
||||
// 获取code
|
||||
getCode(){
|
||||
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}$$/
|
||||
|
||||
var _this = this
|
||||
if (mobileNo == "") {
|
||||
uni.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else if (!myreg.test(mobileNo)) {
|
||||
uni.showToast({
|
||||
title : '请输入正确的手机号',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
send({mobile: mobileNo, channel: 'LOGIN'}).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=>{})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取后输入code
|
||||
getCodeValue (e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
forgetlogin(e){
|
||||
let mobileNo = e.detail.value.mobile || '',
|
||||
let mobileNo = e.detail.value.mobile || '',
|
||||
code = this.code || ''
|
||||
|
||||
auth({
|
||||
@@ -113,8 +113,8 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
|
||||
<view class="title">用户注册</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 class="campus-cont">
|
||||
<form @submit="submitRegister">
|
||||
@@ -29,71 +29,71 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { send, register } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
codename : '获取验证码',
|
||||
mobileNo : '', // 手机号
|
||||
<script>
|
||||
import { send, register } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
codename : '获取验证码',
|
||||
mobileNo : '', // 手机号
|
||||
code : '', // 验证码
|
||||
disabled : false,
|
||||
}
|
||||
},
|
||||
disabled : false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// mobileNo
|
||||
getNameValue(e) {
|
||||
this.mobileNo = e.detail.value
|
||||
},
|
||||
|
||||
// 获取code
|
||||
getCode(){
|
||||
let mobileNo = this.mobileNo
|
||||
|
||||
var _this = this
|
||||
if (mobileNo == "") {
|
||||
uni.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
send({mobile: mobileNo, channel: 'LOGIN'}).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({
|
||||
title : err.message,
|
||||
icon :'none',
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取后输入code
|
||||
getCodeValue (e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
// mobileNo
|
||||
getNameValue(e) {
|
||||
this.mobileNo = e.detail.value
|
||||
},
|
||||
|
||||
// 获取code
|
||||
getCode(){
|
||||
let mobileNo = this.mobileNo
|
||||
|
||||
var _this = this
|
||||
if (mobileNo == "") {
|
||||
uni.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
send({mobile: mobileNo, channel: 'LOGIN'}).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({
|
||||
title : err.message,
|
||||
icon :'none',
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取后输入code
|
||||
getCodeValue (e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
submitRegister(e){
|
||||
let formValue = e.detail.value
|
||||
|
||||
@@ -124,8 +124,8 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="campus-header">
|
||||
<view class="logo">
|
||||
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
|
||||
<view class="title">设置新密码</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 class="campus-cont">
|
||||
<view class="campus-cont">
|
||||
<form @submit="forgetlogin">
|
||||
<view class="campus-inputs">
|
||||
<input class="campus-form-input" type="password" placeholder="设置新的登录密码" name="password"></input>
|
||||
@@ -15,23 +15,23 @@
|
||||
<view class="campus-inputs">
|
||||
<input class="campus-form-input" type="password" placeholder="确认新的登录密码" name="newpassword"></input>
|
||||
</view>
|
||||
<button class="campus-form-btn" form-type="submit">找回</button>
|
||||
<button class="campus-form-btn" form-type="submit">找回</button>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { passSetup } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
<script>
|
||||
import { passSetup } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 立即登录
|
||||
// 立即登录
|
||||
forgetlogin(e){
|
||||
let newPass = e.detail.value.newpassword || '',
|
||||
let newPass = e.detail.value.newpassword || '',
|
||||
password = e.detail.value.password || ''
|
||||
|
||||
passSetup({
|
||||
@@ -51,8 +51,8 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="campus-header">
|
||||
<view class="logo">
|
||||
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
|
||||
<view class="title">中石油活动登录</view>
|
||||
<view class="title">消费金兑换活动登录</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 class="campus-cont">
|
||||
<view class="campus-cont">
|
||||
<form @submit="forgetlogin">
|
||||
<view class="campus-inputs">
|
||||
<image class="campus-form-icon" src="/static/img/campus_login_02.png" mode="aspectFill"></image>
|
||||
@@ -25,91 +25,91 @@
|
||||
<view class="resPassword">
|
||||
<navigator url="./password">忘记密码</navigator>
|
||||
</view>
|
||||
<button class="campus-form-btn" form-type="submit">登录</button>
|
||||
<button class="campus-form-btn" form-type="submit">登录</button>
|
||||
</form>
|
||||
<view class="login-box">
|
||||
<view @click="onCutLogin">{{passwordLogin ? '验证码登录': '密码登录'}}</view>
|
||||
<navigator url="./register">快速注册</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { send, auth, passlogin } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
codename : '获取验证码',
|
||||
mobileNo : '', // 手机号
|
||||
<script>
|
||||
import { send, auth, passlogin } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
codename : '获取验证码',
|
||||
mobileNo : '', // 手机号
|
||||
code : '', // 验证码
|
||||
passwordLogin: false, // 登录方式
|
||||
disabled : false,
|
||||
}
|
||||
},
|
||||
|
||||
passwordLogin: true, // 登录方式
|
||||
disabled : false,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 切换登录方式
|
||||
onCutLogin(){
|
||||
this.passwordLogin = !this.passwordLogin
|
||||
},
|
||||
// mobileNo
|
||||
getNameValue(e) {
|
||||
this.mobileNo = e.detail.value
|
||||
},
|
||||
|
||||
// 获取code
|
||||
getCode(){
|
||||
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}$$/
|
||||
|
||||
var _this = this
|
||||
if (mobileNo == "") {
|
||||
uni.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else if (!myreg.test(mobileNo)) {
|
||||
uni.showToast({
|
||||
title : '请输入正确的手机号',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
send({mobile: mobileNo, channel: 'LOGIN'}).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=>{})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取后输入code
|
||||
getCodeValue (e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
},
|
||||
// mobileNo
|
||||
getNameValue(e) {
|
||||
this.mobileNo = e.detail.value
|
||||
},
|
||||
|
||||
// 获取code
|
||||
getCode(){
|
||||
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}$$/
|
||||
|
||||
var _this = this
|
||||
if (mobileNo == "") {
|
||||
uni.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else if (!myreg.test(mobileNo)) {
|
||||
uni.showToast({
|
||||
title : '请输入正确的手机号',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
send({mobile: mobileNo, channel: 'LOGIN'}).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=>{})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取后输入code
|
||||
getCodeValue (e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
forgetlogin(e){
|
||||
let mobileNo = e.detail.value.mobile || '',
|
||||
let mobileNo = e.detail.value.mobile || '',
|
||||
code = this.code || '',
|
||||
password = e.detail.value.password || '',
|
||||
loginFunction
|
||||
@@ -138,8 +138,8 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -48,41 +48,31 @@
|
||||
<image src="/static/icon/arrow_left.png"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="location" v-if="longitude == 0 && latitude == 0">
|
||||
<image class="location-img" src="/static/img/location_img.jpg"></image>
|
||||
<text>您尚未授权本时生活开启定位服务</text>
|
||||
<text>不能看到附近的商家哦,点击下方按钮开启</text>
|
||||
<button class="location-btn" size="mini" open-type="openSetting">
|
||||
开启定位服务
|
||||
</button>
|
||||
</view>
|
||||
<view v-else>
|
||||
<block v-if="stores.length > 0">
|
||||
<view class="detailsStore-list" :data-id="(item.store_id)" v-for="(item, index) in stores" :key="index"
|
||||
@tap="detailsTap">
|
||||
<image :src="item.cover" class="detailsStore-logo"></image>
|
||||
<view class="detailsStore-cont">
|
||||
<view class="detailsStore-left">
|
||||
<view class="nowrap detailsStore-name">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="detailsStore-place">
|
||||
<text class="nowrap">{{ item.address }}</text>
|
||||
{{ item.km }}
|
||||
</view>
|
||||
</view>
|
||||
<image class="detailsStore-tel" src="/static/icon/tel.png" @tap.stop="tel"
|
||||
:data-tel="(item.mobile)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="pages-hint">
|
||||
<image src="/static/img/null_icon.png"></image>
|
||||
<view>暂无门店</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<block v-if="stores.length > 0">
|
||||
<view class="detailsStore-list" :data-id="(item.store_id)" v-for="(item, index) in stores" :key="index"
|
||||
@tap="detailsTap">
|
||||
<image :src="item.cover" class="detailsStore-logo"></image>
|
||||
<view class="detailsStore-cont">
|
||||
<view class="detailsStore-left">
|
||||
<view class="nowrap detailsStore-name">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="detailsStore-place">
|
||||
<text class="nowrap">{{ item.address }}</text>
|
||||
{{ item.km }}
|
||||
</view>
|
||||
</view>
|
||||
<image class="detailsStore-tel" src="/static/icon/tel.png" @tap.stop="tel"
|
||||
:data-tel="(item.mobile)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="pages-hint">
|
||||
<image src="/static/img/null_icon.png"></image>
|
||||
<view>暂无门店</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 使用须知 -->
|
||||
@@ -113,7 +103,6 @@
|
||||
<view class="detailsBottom-title">
|
||||
超级红包活动
|
||||
</view>
|
||||
亿时代 - 本时生活
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -183,7 +172,9 @@
|
||||
|
||||
// 存储环境-月兑活动
|
||||
getApp().globalData.envType = 'giftPEnv'
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取定位信息
|
||||
uni.getLocation({
|
||||
success: res => {
|
||||
@@ -204,7 +195,6 @@
|
||||
user_lng: this.longitude,
|
||||
user_lat: this.latitude
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
let stores = res.stores
|
||||
stores.map(res=>{
|
||||
let distance = res.distance
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<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="recommend"></view>
|
||||
|
||||
<!-- 卡片轮播 -->
|
||||
<view class="indexBanner">
|
||||
<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 -->
|
||||
<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)">
|
||||
@@ -74,8 +83,8 @@
|
||||
<view class="couponItem">
|
||||
<view class="couponItem-cont">
|
||||
<view class="couponItem-top">
|
||||
<view class="couponItem-cont-number">
|
||||
¥<text>{{item.price}}</text>
|
||||
<view class="couponItem-cont-image">
|
||||
<image :src="item.cover" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="couponItem-cont-name">
|
||||
<view class="nowrap couponItem-cont-title">
|
||||
@@ -86,9 +95,9 @@
|
||||
</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 class="couponItem-cont-text" v-if="item.couponShow">
|
||||
<rich-text :nodes="item.remark"></rich-text>
|
||||
@@ -130,8 +139,7 @@
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 是否兑换弹出 -->
|
||||
<view class="tipsBack" v-if="generalShow"></view>
|
||||
<view class="tipsCont" v-if="generalShow">
|
||||
@@ -157,12 +165,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
data() {
|
||||
return {
|
||||
@@ -172,11 +181,13 @@
|
||||
couponArr : [],
|
||||
numbers : '',
|
||||
count : '',
|
||||
openId : '',
|
||||
codeData : '',
|
||||
|
||||
//Tab列表
|
||||
tabList : [
|
||||
{ title : "可兑换", used: 0 },
|
||||
{ title : "已兑换", used: 1 }
|
||||
// { title : "已兑换", used: 1 }
|
||||
],
|
||||
tabType : 0, //卡券状态
|
||||
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() {
|
||||
console.log(this.codeData)
|
||||
// 存储环境-月兑活动
|
||||
getApp().globalData.envType = 'giftPEnv'
|
||||
|
||||
@@ -196,9 +243,15 @@
|
||||
this.isUser = true
|
||||
}
|
||||
|
||||
// 获取首页数据
|
||||
this.indexInfo()
|
||||
|
||||
if(this.codeData != ''){
|
||||
authInfo({
|
||||
code: this.codeData
|
||||
}).then(res=>{
|
||||
// 获取首页数据
|
||||
this.indexInfo()
|
||||
|
||||
}).catch(err=>{})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 首页数据
|
||||
@@ -210,12 +263,11 @@
|
||||
for(let val in listData){
|
||||
listData[val].schemesShow = false
|
||||
}
|
||||
|
||||
console.log(listData)
|
||||
this.giftPackArr = listData
|
||||
this.numbers = res.numbers
|
||||
this.count = res.coupons_count
|
||||
this.adverts = res.adverts
|
||||
this.openId = res.h5_openid
|
||||
}).catch(err=>{})
|
||||
} else {
|
||||
if(uni.getStorageSync("token")) {
|
||||
@@ -276,6 +328,24 @@
|
||||
uni.navigateTo({
|
||||
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
|
||||
})
|
||||
}).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>
|
||||
@@ -302,11 +388,33 @@
|
||||
.content-border {
|
||||
border-bottom: 130rpx transparent solid;
|
||||
}
|
||||
|
||||
// banner
|
||||
.campusBanner {
|
||||
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 {
|
||||
@@ -515,6 +623,19 @@
|
||||
text {
|
||||
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 {
|
||||
color: #72411f;
|
||||
|
||||
@@ -1,233 +1,267 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view v-for="(item, idx) in adverts" :key="item.cover">
|
||||
<image class="campusBanner" :src="item.cover" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="recommend"></view>
|
||||
<view class="special-list" v-if="giftPackArr.length > 0">
|
||||
<navigator hover-class="none" :url="'buy?id=' + item.activity_month_id" class="special-label" v-for="(item, index) in giftPackArr" :key="index">
|
||||
<view class="special-rebate" v-if="item.label != null">{{item.label}}</view>
|
||||
<view class="welfareCont-top" >
|
||||
<view class="welfareCont-list-img" >
|
||||
<image :src="item.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="special-text">
|
||||
<view class="nowrap special-name">{{item.title}}</view>
|
||||
<view class="special-tips">{{item.two_title}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<!-- 列表为空 -->
|
||||
<view class="campusTips" v-else>
|
||||
<view class="campusTips-cont">
|
||||
<image src="/static/img/giftPack-null.png" mode="aspectFill"></image>
|
||||
<view>抱歉,暂无可购买权益</view>
|
||||
</view>
|
||||
</view>
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- 卡片轮播 -->
|
||||
<view class="indexBanner">
|
||||
<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="special-list" v-if="giftPackArr.length > 0">
|
||||
<navigator hover-class="none" :url="'buy?id=' + item.activity_month_id" class="special-label" v-for="(item, index) in giftPackArr" :key="index">
|
||||
<view class="special-rebate" v-if="item.label != null">{{item.label}}</view>
|
||||
<view class="welfareCont-top" >
|
||||
<view class="welfareCont-list-img" >
|
||||
<image :src="item.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="special-text">
|
||||
<view class="nowrap special-name">{{item.title}}</view>
|
||||
<view class="special-tips">{{item.two_title}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { index, monthsList } from '@/apis/interfaces/giftPack'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
adverts : [],
|
||||
giftPackArr : []
|
||||
}
|
||||
},
|
||||
|
||||
// 生命周期函数--监听页面加载
|
||||
onLoad(options) {
|
||||
// 获取列表数据
|
||||
this.monthsInfo(options.id);
|
||||
},
|
||||
|
||||
// 生命周期函数--监听页面显示
|
||||
onShow() {
|
||||
// 存储环境-月兑活动
|
||||
getApp().globalData.envType = 'giftPEnv'
|
||||
|
||||
// 获取分类数据
|
||||
this.indexInfo();
|
||||
},
|
||||
methods: {
|
||||
// 分类数据
|
||||
indexInfo() {
|
||||
index().then(res=>{
|
||||
this.adverts = res.adverts
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
// 列表数据
|
||||
monthsInfo(id) {
|
||||
monthsList(id).then(res=>{
|
||||
this.giftPackArr = res
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
// 可兑换信息展开
|
||||
moreClick(index) {
|
||||
this.giftPackArr[index].schemesShow = !this.giftPackArr[index].schemesShow
|
||||
},
|
||||
|
||||
// 已兑换细信息展开
|
||||
moreCoupon(index) {
|
||||
this.couponArr[index].couponShow = !this.couponArr[index].couponShow
|
||||
},
|
||||
}
|
||||
<script>
|
||||
import { index, monthsList } from '@/apis/interfaces/giftPack'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
adverts : [],
|
||||
giftPackArr : []
|
||||
}
|
||||
},
|
||||
|
||||
// 生命周期函数--监听页面加载
|
||||
onLoad(options) {
|
||||
// 获取列表数据
|
||||
this.monthsInfo(options.id);
|
||||
},
|
||||
|
||||
// 生命周期函数--监听页面显示
|
||||
onShow() {
|
||||
// 存储环境-月兑活动
|
||||
getApp().globalData.envType = 'giftPEnv'
|
||||
|
||||
// 获取分类数据
|
||||
this.indexInfo();
|
||||
},
|
||||
methods: {
|
||||
// 分类数据
|
||||
indexInfo() {
|
||||
index().then(res=>{
|
||||
this.adverts = res.adverts
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
// 列表数据
|
||||
monthsInfo(id) {
|
||||
monthsList(id).then(res=>{
|
||||
this.giftPackArr = res
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
// 可兑换信息展开
|
||||
moreClick(index) {
|
||||
this.giftPackArr[index].schemesShow = !this.giftPackArr[index].schemesShow
|
||||
},
|
||||
|
||||
// 已兑换细信息展开
|
||||
moreCoupon(index) {
|
||||
this.couponArr[index].couponShow = !this.couponArr[index].couponShow
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
background: #fff;
|
||||
padding-bottom: 40rpx;
|
||||
height: 100vh;
|
||||
overflow-y: scroll;
|
||||
box-sizing: border-box
|
||||
}
|
||||
|
||||
// banner
|
||||
.campusBanner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// 推荐
|
||||
.recommend {
|
||||
overflow: hidden;
|
||||
margin-top: -70rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 列表
|
||||
.film {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.special-list {
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.special-label {
|
||||
margin: 10rpx;
|
||||
width: calc(50% - 20rpx);
|
||||
height: 330rpx;
|
||||
flex: 0 0 calc(50% - 20rpx);
|
||||
border: 4rpx solid #fb9b00;
|
||||
background-color: #ffe0b8;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.special-label:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.special-rebate {
|
||||
position: absolute;
|
||||
top: -30rpx;
|
||||
right: 10rpx;
|
||||
background: #fe0002;
|
||||
color: #fff;
|
||||
border-radius: 30rpx;
|
||||
line-height: 52rpx;
|
||||
height: 52rpx;
|
||||
font-size: 26rpx;
|
||||
padding: 0 20rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.welfareCont-top{
|
||||
white-space: nowrap;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.welfareCont-list-img {
|
||||
border: 2rpx solid #eccc69;
|
||||
border-radius: 50%;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
margin: 0 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.welfareCont-list-img image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.campusTips {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
.campusTips-cont {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
text-align: center;
|
||||
padding: 80rpx;
|
||||
box-sizing: border-box;
|
||||
color: #9c7557;
|
||||
image {
|
||||
width: 340rpx;
|
||||
height: 280rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.campusTips-cont-go {
|
||||
display: inline-block;
|
||||
border: #9c7557 2rpx solid;
|
||||
line-height: 66rpx;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 30rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 90rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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 lang="scss" scoped>
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
background: #fff;
|
||||
padding-bottom: 40rpx;
|
||||
height: 100vh;
|
||||
overflow-y: scroll;
|
||||
box-sizing: border-box
|
||||
}
|
||||
|
||||
// banner
|
||||
.campusBanner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// 推荐
|
||||
.recommend {
|
||||
overflow: hidden;
|
||||
margin-top: -70rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 列表
|
||||
.film {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.special-list {
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
padding: 0 30rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.special-label {
|
||||
margin: 10rpx;
|
||||
width: calc(50% - 20rpx);
|
||||
height: 330rpx;
|
||||
flex: 0 0 calc(50% - 20rpx);
|
||||
border: 4rpx solid #fb9b00;
|
||||
background-color: #ffe0b8;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.special-label:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.special-rebate {
|
||||
position: absolute;
|
||||
top: -30rpx;
|
||||
right: 10rpx;
|
||||
background: #fe0002;
|
||||
color: #fff;
|
||||
border-radius: 30rpx;
|
||||
line-height: 52rpx;
|
||||
height: 52rpx;
|
||||
font-size: 26rpx;
|
||||
padding: 0 20rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.welfareCont-top{
|
||||
white-space: nowrap;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.welfareCont-list-img {
|
||||
border: 2rpx solid #eccc69;
|
||||
border-radius: 50%;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
margin: 0 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.welfareCont-list-img image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.campusTips {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
.campusTips-cont {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
text-align: center;
|
||||
padding: 80rpx;
|
||||
box-sizing: border-box;
|
||||
color: #9c7557;
|
||||
image {
|
||||
width: 340rpx;
|
||||
height: 280rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.campusTips-cont-go {
|
||||
display: inline-block;
|
||||
border: #9c7557 2rpx solid;
|
||||
line-height: 66rpx;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 30rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 90rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
@@ -1,187 +1,325 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
积分记录
|
||||
</view>
|
||||
<view class="list" v-if="accounts.length > 0">
|
||||
<view class="item" v-for="(item, index) in accounts" :key="index">
|
||||
<image class="item-img" src="@/static/img/giftPack-img09.png" mode="widthFix"></image>
|
||||
<view class="item-cont">
|
||||
<view class="item-cont-top">
|
||||
<div class="item-cont-name">{{item.title}}</div>
|
||||
<div class="item-cont-number">{{item.variable}}</div>
|
||||
</view>
|
||||
<view class="item-cont-bottom">
|
||||
<div class="item-cont-total" v-if="userData.gold">余额:{{userData.gold.balance}}</div>
|
||||
<div class="item-cont-time">{{item.created_at}}</div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pagesLoding" v-if="lodingStats">
|
||||
<block v-if="page.has_more">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block v-else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</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>
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
<view class="title-name">消费金账户余额</view>
|
||||
</view>
|
||||
|
||||
<view class="redBack">
|
||||
<view class="list">
|
||||
<view class="label">
|
||||
<view class="label-title">可用余额<image src="/static/icon/giftPack-show.png" mode="widthFix"></image></view>
|
||||
<view class="label-number">{{account.gold}}</view>
|
||||
<view class="label-go">可用余额,入账记录 </view>
|
||||
</view>
|
||||
<view class="label">
|
||||
<view class="label-title">待发放</view>
|
||||
<view class="label-number">{{blockeds}}</view>
|
||||
<navigator hover-class="none" :url="'/pages/giftPack/logsFrozen?type=gold' + '&blockeds=' + blockeds" class="label-go">立即查询 > </navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="integra-cont">
|
||||
<view class="integra-title">
|
||||
<view class="integra-title-name">明细记录</view>
|
||||
<view class="integra-title-picker">
|
||||
<picker @change="screenBind" :value="screenIndex" :range-key="'name'" :range="screenArray">
|
||||
{{screenArray[screenIndex].name}}
|
||||
</picker>
|
||||
<image class="integra-title-icon" src="/static/icon/arrow_down.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="integra-cont-list" v-if="accounts.length > 0">
|
||||
<view class="integra-cont-label" v-for="(item, index) in accounts" :key="index">
|
||||
<view class="integra-cont-title">
|
||||
<view class="integra-cont-name">{{item.title}}</view>
|
||||
<view class="integra-cont-tips">消费金余额</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { logs } from '@/apis/interfaces/giftPack'
|
||||
import { index } from '@/apis/interfaces/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userData : '', //用户
|
||||
accounts : '', // 账户列表
|
||||
page: {
|
||||
has_more: false
|
||||
}, // 下一页
|
||||
lodingStats: false // 数据加载完渲染
|
||||
}
|
||||
},
|
||||
|
||||
// 生命周期函数--监听页面显示
|
||||
onShow() {
|
||||
// 存储环境-月兑活动
|
||||
getApp().globalData.envType = 'giftPEnv'
|
||||
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
|
||||
// 获取用户接口
|
||||
this.userInfo();
|
||||
},
|
||||
methods: {
|
||||
// 用户接口
|
||||
userInfo() {
|
||||
// 获取用户信息
|
||||
index().then(res => {
|
||||
this.userData = res
|
||||
}).catch(err => {
|
||||
if (!err.login) {
|
||||
uni.showModal({
|
||||
title: '用户登录已过期',
|
||||
content: '请重新登录',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/giftPack/signin'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 账变记录
|
||||
accountInfo(page) {
|
||||
logs({
|
||||
type : 'gold',
|
||||
page : page,
|
||||
channel : 'all'
|
||||
}).then(res=>{
|
||||
let newStores = this.accounts,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) newStores = []
|
||||
newData = newStores.concat(res.data)
|
||||
this.accounts = newData
|
||||
this.page = res.page
|
||||
this.lodingStats = false
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
}
|
||||
<script>
|
||||
import { logs } from '@/apis/interfaces/giftPack'
|
||||
import { index } from '@/apis/interfaces/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
blockeds : '',
|
||||
account : '',
|
||||
accounts : '', // 账户列表
|
||||
screenArray : [
|
||||
{
|
||||
channel: 'all',
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
channel: 'in',
|
||||
name: '入账'
|
||||
},
|
||||
{
|
||||
channel: 'out',
|
||||
name: '出账'
|
||||
}
|
||||
], //账变记录筛选数组
|
||||
screenChannel: '', //账变记录筛选数组标识
|
||||
screenIndex : 0 , //账变记录筛选index
|
||||
page : 1, //分页
|
||||
lodingStats : false //加载状态
|
||||
}
|
||||
},
|
||||
|
||||
// 生命周期函数--监听页面显示
|
||||
onShow() {
|
||||
// 存储环境-月兑活动
|
||||
getApp().globalData.envType = 'giftPEnv'
|
||||
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
methods: {
|
||||
// 账变记录
|
||||
accountInfo(page) {
|
||||
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
|
||||
this.blockeds = res.blockeds
|
||||
this.account = res.account
|
||||
this.page = res.page
|
||||
this.lodingStats = false
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
|
||||
// 筛选账变记录-条件
|
||||
screenBind(e) {
|
||||
this.screenIndex = e.detail.value,
|
||||
this.screenChannel= this.screenArray[e.detail.value].channel
|
||||
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
// 页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh() {
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
// 上拉加载
|
||||
onReachBottom(){
|
||||
this.lodingStats = true
|
||||
let pageNumber = this.page.current
|
||||
if(this.page.has_more){
|
||||
pageNumber++
|
||||
// 获取账变记录
|
||||
this.accountInfo(pageNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-top: 30rpx;
|
||||
.item {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
.item-img {
|
||||
width: 54rpx;
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
.item-cont {
|
||||
width: calc(100% - 54rpx);
|
||||
padding-left: 30rpx;
|
||||
box-sizing: border-box;
|
||||
.item-cont-top {
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20rpx;
|
||||
.item-cont-name {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.item-cont-bottom {
|
||||
font-size: 28rpx;
|
||||
color: #a4a4a4;
|
||||
display: flex;
|
||||
.item-cont-total {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.campusTips {
|
||||
margin-top: 40rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
.campusTips-cont {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
text-align: center;
|
||||
padding: 80rpx;
|
||||
box-sizing: border-box;
|
||||
color: #9c7557;
|
||||
image {
|
||||
width: 340rpx;
|
||||
height: 280rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.campusTips-cont-go {
|
||||
display: inline-block;
|
||||
border: #9c7557 2rpx solid;
|
||||
line-height: 66rpx;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 30rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 90rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff9f9;
|
||||
height: 100vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
.title-name {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
width: 440rpx;
|
||||
margin: 0 auto;
|
||||
color: #f25448;
|
||||
line-height: 60rpx;
|
||||
&::after,
|
||||
&::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
top: calc(50% - 14rpx);
|
||||
background-image: url('/static/img/giftPackArrow.png');
|
||||
background-size: 100%;
|
||||
background-position: center;
|
||||
width: 80rpx;
|
||||
height: 28rpx;
|
||||
display: block;
|
||||
}
|
||||
&::after {
|
||||
left: 0;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
&::before {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.redBack {
|
||||
background-image: linear-gradient(to top, #fe796f, #f25549);
|
||||
border-radius: 30rpx;
|
||||
padding: 30rpx 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 30rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
.redBack::after,
|
||||
.redBack::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 20rpx;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
}
|
||||
.redBack::after {
|
||||
background-color: rgba(243, 85, 73, .4);
|
||||
z-index: 2;
|
||||
width: calc(100% - 40rpx);
|
||||
left: 20rpx;
|
||||
bottom: -14px;
|
||||
height: 14px;
|
||||
}
|
||||
.redBack::before {
|
||||
background-color: rgba(243, 85, 73, .2);
|
||||
z-index: 1;
|
||||
width: calc(100% - 80rpx);
|
||||
left: 40rpx;
|
||||
bottom: -50rpx;
|
||||
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>
|
||||
341
pages/giftPack/logsFrozen.vue
Normal 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>
|
||||
@@ -154,7 +154,7 @@
|
||||
border: none;
|
||||
}
|
||||
&[disabled]{
|
||||
color: rgba($color: white, $alpha: .5);
|
||||
color: rgba($color: #f25448, $alpha: .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="campus-header">
|
||||
<view class="logo">
|
||||
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
|
||||
<view class="title">超级红包活动用户注册</view>
|
||||
<view class="title">联通全额消费金活动用户注册</view>
|
||||
</view>
|
||||
<image class="cover" src="@/static/img/campusLogin_back_red.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
@@ -165,8 +165,8 @@
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
&[disabled]{
|
||||
color: rgba($color: white, $alpha: .5);
|
||||
&[disabled]{
|
||||
color: rgba($color: #f25448, $alpha: .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
&[disabled]{
|
||||
color: rgba($color: white, $alpha: .5);
|
||||
&[disabled]{
|
||||
color: rgba($color: #f25448, $alpha: .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="campus-header">
|
||||
<view class="logo">
|
||||
<image src="@/static/img/campusLogin_logo.png" mode="aspectFill"></image>
|
||||
<view class="title">超级红包活动登录</view>
|
||||
<view class="title">联通全额消费金活动登录</view>
|
||||
</view>
|
||||
<image class="cover" src="@/static/img/campusLogin_back_red.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
@@ -98,7 +98,12 @@
|
||||
_this.disabled = true
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(err=>{})
|
||||
}).catch(err=>{
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -179,8 +184,8 @@
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
&[disabled]{
|
||||
color: rgba($color: white, $alpha: .5);
|
||||
&[disabled]{
|
||||
color: rgba($color: #f25448, $alpha: .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
389
pages/giftPack/superRed -备份.vue
Normal 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
@@ -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>
|
||||
@@ -33,14 +33,14 @@
|
||||
<view class="userItem-label-number">
|
||||
<block v-if="isUser">
|
||||
<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 v-else>
|
||||
<image class="userItem-label-img" src="@/static/img/giftPack-img03.png" mode="widthFix"></image>
|
||||
<text>0</text>
|
||||
</block>
|
||||
</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 class="userList" @click="userNav('/pages/giftPack/logs')">
|
||||
@@ -65,6 +65,13 @@
|
||||
<image class="userCoupon-arrow" src="@/static/icon/rightsArrow.png" mode="widthFix"></image>
|
||||
</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-title">
|
||||
@@ -107,11 +114,14 @@
|
||||
|
||||
<script>
|
||||
import { index } from '@/apis/interfaces/user'
|
||||
import { logs } from '@/apis/interfaces/giftPack'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isUser : false, // 用户是否登录
|
||||
userData: '', //用户
|
||||
screenChannel: '', //账变记录筛选数组标识
|
||||
blockeds : ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -127,8 +137,10 @@
|
||||
this.isUser = true
|
||||
// 获取用户接口
|
||||
this.userInfo();
|
||||
|
||||
// 获取首页数据
|
||||
this.accountInfo();
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 用户接口
|
||||
@@ -154,6 +166,19 @@
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 账变记录
|
||||
accountInfo(page) {
|
||||
logs({
|
||||
type : 'gold',
|
||||
page : page || '',
|
||||
channel : this.screenChannel
|
||||
}).then(res=>{
|
||||
this.blockeds = res.blockeds
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 处理未登录时的转跳
|
||||
userNav(url){
|
||||
let pageUrl = url
|
||||
|
||||
@@ -1,363 +1,363 @@
|
||||
<template>
|
||||
<view>
|
||||
<image class="packetCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet.png"></image>
|
||||
|
||||
<view class="packetCont-title">
|
||||
<image src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet_title.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="packetText">
|
||||
<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-title">
|
||||
<view class="packetText-title-name">请输入办理业务手机号</view>
|
||||
<text>例:185XXXX0001</text>
|
||||
</view>
|
||||
<form action="" bindsubmit="forgetlogin">
|
||||
<view class="packetText-label">
|
||||
<image src="/static/img/packetText_icon.png"></image>
|
||||
<input class="inputs-input" type="text" placeholder="请输入手机号领取红包" @input="getNameValue"
|
||||
:value="mobile"></input>
|
||||
</view>
|
||||
<view class="packetText-label">
|
||||
<input class="inputs-code" placeholder="请输入验证码" @input="getCodeValue" :value="code"></input>
|
||||
<button class="packetText-code" @click="codeBind" hover-class="none">{{codename}}</button>
|
||||
</view>
|
||||
<view class="packetText-cozy">
|
||||
<view class="packetText-cozy-name">温馨提示:</view>
|
||||
<text>消费红包仅在本系统内使用,有效期12个月</text>
|
||||
<text>消费红包不找零,不兑现</text>
|
||||
<text>消费红包兑换成电子券后,不支持退货</text>
|
||||
<text>如出现电子券核销问题,请致电咨询0451-88895511(9:00-20:00)</text>
|
||||
</view>
|
||||
<view class="packetText-btn">
|
||||
<button type="default" form-type="submit"><text>立即领取</text><image src="/static/img/packet_arr.png"></image></button>
|
||||
</view>
|
||||
</form>
|
||||
</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>
|
||||
<template>
|
||||
<view>
|
||||
<image class="packetCont-img" src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet.png"></image>
|
||||
|
||||
<view class="packetCont-title">
|
||||
<image src="https://card.ysd-bs.com/storage/materials/2021/09/01/packet_title.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="packetText">
|
||||
<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-title">
|
||||
<view class="packetText-title-name">请输入办理业务手机号</view>
|
||||
<text>例:185XXXX0001</text>
|
||||
</view>
|
||||
<form action="" @submit="forgetlogin">
|
||||
<view class="packetText-label">
|
||||
<image src="/static/img/packetText_icon.png"></image>
|
||||
<input class="inputs-input" type="text" placeholder="请输入手机号领取红包" @input="getNameValue"
|
||||
:value="mobile"></input>
|
||||
</view>
|
||||
<view class="packetText-label">
|
||||
<input class="inputs-code" placeholder="请输入验证码" @input="getCodeValue" :value="code"></input>
|
||||
<button class="packetText-code" @click="codeBind" hover-class="none">{{codename}}</button>
|
||||
</view>
|
||||
<view class="packetText-cozy">
|
||||
<view class="packetText-cozy-name">温馨提示:</view>
|
||||
<text>消费红包仅在本系统内使用,有效期12个月</text>
|
||||
<text>消费红包不找零,不兑现</text>
|
||||
<text>消费红包兑换成电子券后,不支持退货</text>
|
||||
<text>如出现电子券核销问题,请致电咨询0451-88895511(9:00-20:00)</text>
|
||||
</view>
|
||||
<view class="packetText-btn">
|
||||
<button type="default" form-type="submit"><text>立即领取</text><image src="/static/img/packet_arr.png"></image></button>
|
||||
</view>
|
||||
</form>
|
||||
</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, unicom } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mobile : '', // 手机号码
|
||||
code : '', // 验证码
|
||||
iscode : null, // 用于存放验证码接口里获取到的code
|
||||
codename : '获取验证码', // 验证码-文字提示
|
||||
countDownNum: '', // 提示信息
|
||||
popContHide : false, // 领取成功弹出
|
||||
popData : '' // 领取金额
|
||||
}
|
||||
},
|
||||
onLoad(options) {},
|
||||
methods:{
|
||||
// 获取手机号码
|
||||
getNameValue(e) {
|
||||
this.mobile = e.detail.value
|
||||
},
|
||||
|
||||
// 获取验证码
|
||||
getCodeValue(e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// code发送
|
||||
codeBind(e){
|
||||
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 :'unicom'
|
||||
}).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,
|
||||
code = this.code,
|
||||
that = this,
|
||||
countDownNum = 5 //获取倒计时初始值
|
||||
that.countDownNum = countDownNum
|
||||
unicom({
|
||||
mobile: mobile,
|
||||
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)
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭弹窗
|
||||
popClick() {
|
||||
this.popContHide = !this.popContHide
|
||||
|
||||
// 跳转
|
||||
uni.switchTab({
|
||||
url: '/pages/user/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
<script>
|
||||
import { send, unicom } from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mobile : '', // 手机号码
|
||||
code : '', // 验证码
|
||||
iscode : null, // 用于存放验证码接口里获取到的code
|
||||
codename : '获取验证码', // 验证码-文字提示
|
||||
countDownNum: '', // 提示信息
|
||||
popContHide : false, // 领取成功弹出
|
||||
popData : '' // 领取金额
|
||||
}
|
||||
},
|
||||
onLoad(options) {},
|
||||
methods:{
|
||||
// 获取手机号码
|
||||
getNameValue(e) {
|
||||
this.mobile = e.detail.value
|
||||
},
|
||||
|
||||
// 获取验证码
|
||||
getCodeValue(e) {
|
||||
this.code = e.detail.value
|
||||
},
|
||||
|
||||
// code发送
|
||||
codeBind(e){
|
||||
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 :'unicom'
|
||||
}).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,
|
||||
code = this.code,
|
||||
that = this,
|
||||
countDownNum = 5 //获取倒计时初始值
|
||||
that.countDownNum = countDownNum
|
||||
unicom({
|
||||
mobile: mobile,
|
||||
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)
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭弹窗
|
||||
popClick() {
|
||||
this.popContHide = !this.popContHide
|
||||
|
||||
// 跳转
|
||||
uni.switchTab({
|
||||
url: '/pages/user/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 红包领取 */
|
||||
.packetCont-img {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
}
|
||||
.packetCont-title {
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.packetText {
|
||||
position: absolute;
|
||||
top: 16%;
|
||||
left: 40rpx;
|
||||
right: 40rpx;
|
||||
text-align: center;
|
||||
.packetText-tips {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
.packetText-form {
|
||||
background: rgba(255, 255, 255, .7);
|
||||
border-radius: 30rpx;
|
||||
padding: 40rpx 40rpx 70rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
margin-bottom: 100rpx;
|
||||
position: relative;
|
||||
.packetText-title {
|
||||
font-weight: 600;
|
||||
font-size: 26rpx;
|
||||
padding: 0 10rpx 40rpx 10rpx;
|
||||
.packetText-title-name {
|
||||
font-size: 38rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
.packetText-label {
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
margin-bottom: 60rpx;
|
||||
box-shadow: 0 10rpx 10rpx rgba(0, 0, 0, .4);
|
||||
display: flex;
|
||||
padding: 25rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-top: 2rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.packetText-code {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
width: auto !important;
|
||||
padding: 0;
|
||||
font-weight: normal;
|
||||
font-size: 32rpx;
|
||||
line-height: 40rpx !important;
|
||||
&::after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.inputs-input {
|
||||
position: relative;
|
||||
padding-left: 30rpx;
|
||||
&::after,
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
top: 0;
|
||||
background: #000;
|
||||
width: 4rpx;
|
||||
height: 100%;
|
||||
}
|
||||
&::after {
|
||||
left: 0;
|
||||
}
|
||||
&::after {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.packetText-btn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 90rpx;
|
||||
position: absolute;
|
||||
bottom: -40rpx;
|
||||
left: 0;
|
||||
button {
|
||||
width: 50%;
|
||||
line-height: 90rpx;
|
||||
border-radius: 25rpx;
|
||||
background-image: radial-gradient(#fdcf7c 50%,#fdebb8);
|
||||
border: none;
|
||||
font-size: 38rpx;
|
||||
color: #fff;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
text{
|
||||
background: linear-gradient(to bottom, #e38b3c, #cb6418);
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
image {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
vertical-align: -4rpx;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.packetText-cozy {
|
||||
font-weight: 600;
|
||||
font-size: 26rpx;
|
||||
text {
|
||||
display: block;
|
||||
margin: 15rpx 0;
|
||||
position: relative;
|
||||
padding-left: 30rpx;
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 12rpx;
|
||||
background-color: #000;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 弹出 */
|
||||
.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%;
|
||||
.popCont-name {
|
||||
margin-bottom: 50rpx;
|
||||
font-size: 30rpx;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
.popBack.active,
|
||||
.popCont.active {
|
||||
display: block;
|
||||
<style lang="scss" scoped>
|
||||
/* 红包领取 */
|
||||
.packetCont-img {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
}
|
||||
.packetCont-title {
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.packetText {
|
||||
position: absolute;
|
||||
top: 16%;
|
||||
left: 40rpx;
|
||||
right: 40rpx;
|
||||
text-align: center;
|
||||
.packetText-tips {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
.packetText-form {
|
||||
background: rgba(255, 255, 255, .7);
|
||||
border-radius: 30rpx;
|
||||
padding: 40rpx 40rpx 70rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
margin-bottom: 100rpx;
|
||||
position: relative;
|
||||
.packetText-title {
|
||||
font-weight: 600;
|
||||
font-size: 26rpx;
|
||||
padding: 0 10rpx 40rpx 10rpx;
|
||||
.packetText-title-name {
|
||||
font-size: 38rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
.packetText-label {
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
margin-bottom: 60rpx;
|
||||
box-shadow: 0 10rpx 10rpx rgba(0, 0, 0, .4);
|
||||
display: flex;
|
||||
padding: 25rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-top: 2rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.packetText-code {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
width: auto !important;
|
||||
padding: 0;
|
||||
font-weight: normal;
|
||||
font-size: 32rpx;
|
||||
line-height: 40rpx !important;
|
||||
&::after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.inputs-input {
|
||||
position: relative;
|
||||
padding-left: 30rpx;
|
||||
&::after,
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
top: 0;
|
||||
background: #000;
|
||||
width: 4rpx;
|
||||
height: 100%;
|
||||
}
|
||||
&::after {
|
||||
left: 0;
|
||||
}
|
||||
&::after {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.packetText-btn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 90rpx;
|
||||
position: absolute;
|
||||
bottom: -40rpx;
|
||||
left: 0;
|
||||
button {
|
||||
width: 50%;
|
||||
line-height: 90rpx;
|
||||
border-radius: 25rpx;
|
||||
background-image: radial-gradient(#fdcf7c 50%,#fdebb8);
|
||||
border: none;
|
||||
font-size: 38rpx;
|
||||
color: #fff;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
text{
|
||||
background: linear-gradient(to bottom, #e38b3c, #cb6418);
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
image {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
vertical-align: -4rpx;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.packetText-cozy {
|
||||
font-weight: 600;
|
||||
font-size: 26rpx;
|
||||
text {
|
||||
display: block;
|
||||
margin: 15rpx 0;
|
||||
position: relative;
|
||||
padding-left: 30rpx;
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 12rpx;
|
||||
background-color: #000;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 弹出 */
|
||||
.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%;
|
||||
.popCont-name {
|
||||
margin-bottom: 50rpx;
|
||||
font-size: 30rpx;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
.popBack.active,
|
||||
.popCont.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,230 +1,235 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 门店详情 -->
|
||||
<view class="detailsImg">
|
||||
<image :src="storeinfo.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="detailsCont">
|
||||
<view class="detailsName">
|
||||
{{ storeinfo.title }}
|
||||
</view>
|
||||
<view class="detailsLabel">
|
||||
<view class="detailsLabel-left">
|
||||
<image src="/static/static/icon/site_icon.png"></image>
|
||||
<view class="detailsLabel-name">
|
||||
<text>{{ storeinfo.address }}</text>
|
||||
距您 {{ distance }}
|
||||
</view>
|
||||
</view>
|
||||
<image class="detailsLabel-tel" src="/static/icon/tel.png" @tap="tel"></image>
|
||||
</view>
|
||||
<view class="detailsLabel">
|
||||
<view class="detailsLabel-left">
|
||||
<image src="/static/icon/time_icon.png"></image>
|
||||
<view class="detailsLabel-name">
|
||||
<text>营业时间</text>
|
||||
<block v-if="storeinfo.open_time != null">{{ storeinfo.open_time }}</block>
|
||||
<block v-else>00:00</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<view class="detailsBtn">
|
||||
<view class="detailsBtn-cont" @tap="siteMap">
|
||||
去导航
|
||||
</view>
|
||||
</view>
|
||||
<template>
|
||||
<view>
|
||||
<!-- 门店详情 -->
|
||||
<view class="detailsImg">
|
||||
<image :src="storeinfo.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="detailsCont">
|
||||
<view class="detailsName">
|
||||
{{ storeinfo.title }}
|
||||
</view>
|
||||
<view class="detailsLabel">
|
||||
<view class="detailsLabel-left">
|
||||
<image src="/static/static/icon/site_icon.png"></image>
|
||||
<view class="detailsLabel-name">
|
||||
<text>{{ storeinfo.address }}</text>
|
||||
距您 {{ distance }}
|
||||
</view>
|
||||
</view>
|
||||
<image class="detailsLabel-tel" src="/static/icon/tel.png" @tap="tel"></image>
|
||||
</view>
|
||||
<view class="detailsLabel">
|
||||
<view class="detailsLabel-left">
|
||||
<image src="/static/icon/time_icon.png"></image>
|
||||
<view class="detailsLabel-name">
|
||||
<text>营业时间</text>
|
||||
<block v-if="storeinfo.open_time != null">{{ storeinfo.open_time }}</block>
|
||||
<block v-else>00:00</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<view class="detailsBtn">
|
||||
<view class="detailsBtn-cont" @tap="siteMap">
|
||||
去导航
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storesShow } from '@/apis/interfaces/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
storeinfo : '', // 门店详情
|
||||
distance : 0, // 门店距离换算
|
||||
longitude : 0, // 门店详情
|
||||
latitude : 0, // 门店详情
|
||||
};
|
||||
},
|
||||
onLoad(options){
|
||||
storesShow({
|
||||
store_id: options.store_id,
|
||||
user_lng: options.user_lng,
|
||||
user_lat: options.user_lat
|
||||
}).then(res => {
|
||||
let distance = res.distance;
|
||||
if (distance > 1000) {
|
||||
distance = distance / 1000 + "km";
|
||||
} else {
|
||||
distance = distance + "m";
|
||||
}
|
||||
this.storeinfo = res
|
||||
this.distance = distance
|
||||
}).catch(err => {
|
||||
if (!err.login) {
|
||||
if(options.type == 'campus') {
|
||||
uni.showModal({
|
||||
title: '用户登录已过期',
|
||||
content: '请重新登录',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/campus/signin'
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
uni.showModal({
|
||||
title: '用户登录已过期',
|
||||
content: '请重新登录',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/auth/login'
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 拨打电话
|
||||
tel(e) {
|
||||
let tel = this.storeinfo.mobile
|
||||
uni.showActionSheet({
|
||||
itemList : ['呼叫商家'],
|
||||
success : res =>{
|
||||
if(res.tapIndex==0){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: tel
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导航
|
||||
siteMap(){
|
||||
uni.openLocation({
|
||||
latitude : parseFloat(this.storeinfo.latitude),
|
||||
longitude : parseFloat(this.storeinfo.longitude),
|
||||
address : this.storeinfo.address
|
||||
})
|
||||
}
|
||||
}
|
||||
<script>
|
||||
import { storesShow } from '@/apis/interfaces/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
storeinfo : '', // 门店详情
|
||||
distance : 0, // 门店距离换算
|
||||
longitude : 0, // 门店详情
|
||||
latitude : 0, // 门店详情
|
||||
};
|
||||
},
|
||||
onLoad(options){
|
||||
storesShow({
|
||||
store_id: options.store_id,
|
||||
user_lng: options.user_lng,
|
||||
user_lat: options.user_lat
|
||||
}).then(res => {
|
||||
let distance = res.distance;
|
||||
if (distance > 1000) {
|
||||
distance = distance / 1000 + "km";
|
||||
} else {
|
||||
distance = distance + "m";
|
||||
}
|
||||
this.storeinfo = res
|
||||
this.distance = distance
|
||||
}).catch(err => {
|
||||
if (!err.login) {
|
||||
if(options.type == 'campus') {
|
||||
uni.showModal({
|
||||
title: '用户登录已过期',
|
||||
content: '请重新登录',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/campus/signin'
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
uni.showModal({
|
||||
title: '用户登录已过期',
|
||||
content: '请重新登录',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/auth/login'
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 拨打电话
|
||||
tel(e) {
|
||||
let tel = this.storeinfo.mobile
|
||||
uni.showActionSheet({
|
||||
itemList : ['呼叫商家'],
|
||||
success : res =>{
|
||||
if(res.tapIndex==0){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: tel
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导航
|
||||
siteMap(){
|
||||
// uni.openLocation({
|
||||
// latitude : parseFloat(this.storeinfo.latitude),
|
||||
// longitude : parseFloat(this.storeinfo.longitude),
|
||||
// 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>
|
||||
|
||||
<style>
|
||||
/* 门店详情 */
|
||||
.detailsImg {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 60%;
|
||||
}
|
||||
|
||||
.detailsImg image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.detailsCont {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.detailsName {
|
||||
font-size: 34rpx;
|
||||
padding: 30rpx;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.detailsLabel {
|
||||
display: flex;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.detailsLabel::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #e7e7e7;
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-left {
|
||||
width: calc(100%- 40rpx);
|
||||
display: flex;
|
||||
flex: 1;
|
||||
color: #5e5e5e;
|
||||
}
|
||||
|
||||
.detailsLabel-left image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.detailsLabel-tel {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-name {
|
||||
font-size: 26rpx;
|
||||
width: calc(100% - 110rpx);
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-name text {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-add {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.detailsBtn {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
text-align: center;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.detailsBtn-cont {
|
||||
width: 100%;
|
||||
background: #ef8e41;
|
||||
color: #fff;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-radius: 50rpx;
|
||||
<style>
|
||||
/* 门店详情 */
|
||||
.detailsImg {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 60%;
|
||||
}
|
||||
|
||||
.detailsImg image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.detailsCont {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.detailsName {
|
||||
font-size: 34rpx;
|
||||
padding: 30rpx;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.detailsLabel {
|
||||
display: flex;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.detailsLabel::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #e7e7e7;
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-left {
|
||||
width: calc(100%- 40rpx);
|
||||
display: flex;
|
||||
flex: 1;
|
||||
color: #5e5e5e;
|
||||
}
|
||||
|
||||
.detailsLabel-left image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.detailsLabel-tel {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-name {
|
||||
font-size: 26rpx;
|
||||
width: calc(100% - 110rpx);
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-name text {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.detailsLabel-add {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.detailsBtn {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
text-align: center;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.detailsBtn-cont {
|
||||
width: 100%;
|
||||
background: #ef8e41;
|
||||
color: #fff;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
BIN
static/icon/giftPack-hide.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/icon/giftPack-show.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 293 KiB After Width: | Height: | Size: 290 KiB |
BIN
static/img/campus_nologo.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
static/img/draw_coupon_01.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
static/img/giftPack-img10.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
static/img/giftPackArrow.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
static/img/superRed-img.png
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
static/img/superRed.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |