Compare commits
13 Commits
aacd11356b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01eedb0b82 | ||
|
|
8f7cc986c2 | ||
|
|
540d76bdb8 | ||
|
|
c661dd0e16 | ||
|
|
bc38362878 | ||
|
|
ba6b09db50 | ||
|
|
c29fc7b5cb | ||
|
|
fc77594016 | ||
|
|
63e5206449 | ||
|
|
7cb9e1e92e | ||
|
|
34590d9f72 | ||
|
|
b5c5316f8b | ||
|
|
fa6638c90b |
@@ -17,7 +17,7 @@ const errInfo = (obj) =>{
|
||||
wx.removeStorageSync("token")
|
||||
// 返回首页
|
||||
wx.redirectTo({
|
||||
url: "/pages/index/index",
|
||||
url: "/pages/login/login",
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
import {req} from "../request"
|
||||
|
||||
//微信授权登录
|
||||
const record = (code, iv, encryptedData) => req({url: "auth/openwx", method: "POST", data: {code: code, iv: iv, encryptedData: encryptedData}})
|
||||
const record = (code, iv, encryptedData, parent_id) => req({url: "auth/openwx", method: "POST", data: {code: code, iv: iv, encryptedData: encryptedData, parent_id: parent_id || 0}})
|
||||
|
||||
//微信手机授权
|
||||
const bindmobile = (code, iv, mobile) => req({url: "auth/bindmobile", method: "POST", data: {code: code, iv: iv, mobile: mobile}})
|
||||
|
||||
//切换手机授权
|
||||
const tel = (wechatUser_id, username) => req({url: "auth/loginbymobile", method: "POST", data: {wechatUser_id: wechatUser_id,username: username}})
|
||||
const tel = (wechatUser_id, username) => req({url: "auth/loginbymobile", method: "POST", data: {wechatUser_id: wechatUser_id,username: username}}, false)
|
||||
|
||||
|
||||
export default({
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
import {req} from "../request"
|
||||
|
||||
// 是否开启沃支付
|
||||
const woPayment = () => req({url: "ajax/pays"})
|
||||
|
||||
//首页权益
|
||||
const index = (area_name, user_lng, user_lat) => req({url: "home", data: {area_name: area_name, user_lng: user_lng, user_lat:user_lat}})
|
||||
|
||||
@@ -41,7 +44,7 @@ const ordersInfo = (orderId) => req({url: "activity/orders/" + orderId + '/info'
|
||||
const rightShow = (right_id, address_id, num, is_deliver) => req({url: "orders/create/", data: {right_id: right_id, address_id: address_id || '', num: num || '', is_deliver: is_deliver}})
|
||||
|
||||
// 权益购买提交
|
||||
const rightStore = (right_id, address_id, is_deliver, qty) => req({url: "orders/store/", method: "POST", data: {right_id: right_id, address_id: address_id || '', is_deliver: is_deliver, qty: qty || ''}})
|
||||
const rightStore = (right_id, address_id, is_deliver, qty, share_user_id) => req({url: "orders/store/", method: "POST", data: {right_id: right_id, address_id: address_id || '', is_deliver: is_deliver, qty: qty || '', share_user_id: share_user_id || ''}})
|
||||
|
||||
// 微信权益购买信息
|
||||
const wechat = (trade_no) => req({url: "payments/wechat?",method: "POST", data: {trade_no: trade_no}})
|
||||
@@ -71,7 +74,10 @@ const fridayInfo = (werlfare_id, address_id, is_deliver) => req({url: "welfare/o
|
||||
const fridayPay = (trade_no) => req({url: "payments/welfare/wechat",method: "POST", data: {trade_no: trade_no}})
|
||||
|
||||
//洗车券-获取跳转地址
|
||||
const washcarUrl = (welfare_id, right_config_id) => req({url: "washcar/infourl", data: {welfare_id: welfare_id, right_config_id: right_config_id}})
|
||||
const washcarUrl = (welfare_id, right_config_id) => req({url: "washcar/infourl", data: {welfare_id: welfare_id || '', right_config_id: right_config_id}})
|
||||
|
||||
//洗车券-获取跳转地址
|
||||
const washcarCoupon = (coupon) => req({url: "washcar/" + coupon + "/info",method: "POST"})
|
||||
|
||||
//首页轮播-跳转本页面 --业务数据查看
|
||||
const busineSee = (business) => req({url: "business/" + business})
|
||||
@@ -80,7 +86,7 @@ const busineSee = (business) => req({url: "business/" + business})
|
||||
const busineForm = (business_id, business_item_id, type, mobile, username) => req({url: "business/create",method: "POST", data: {business_id: business_id, business_item_id: business_item_id, type: type, mobile: mobile, username: username}})
|
||||
|
||||
//订阅
|
||||
const subscribe = (subscribe) => req({url: "wechat/" + subscribe + "/welfare_subscribe",method: "POST"})
|
||||
const subscribe = (subscribe, channel) => req({url: "wechat/" + subscribe + "/welfare_subscribe",method: "POST", data: {channel: channel}})
|
||||
|
||||
export default({
|
||||
index,
|
||||
@@ -107,7 +113,9 @@ export default({
|
||||
fridayInfo,
|
||||
fridayPay,
|
||||
washcarUrl,
|
||||
washcarCoupon,
|
||||
busineSee,
|
||||
busineForm,
|
||||
subscribe
|
||||
subscribe,
|
||||
woPayment
|
||||
})
|
||||
|
||||
@@ -5,13 +5,13 @@ import {req} from "../request"
|
||||
const index = () => req({url: "user"})
|
||||
|
||||
//切换用户登录
|
||||
const mobiles = () => req({url: "user/mobiles"})
|
||||
const mobiles = (wechatUser_id) => req({url: "user/mobiles", data:{wechatUser_id : wechatUser_id}})
|
||||
|
||||
//卡券
|
||||
const coupon = (status) => req({url: "coupons?status=" + status})
|
||||
|
||||
//卡券分组
|
||||
const couponArr = (activityId, status, page) => req({url: "coupons/list", data:{activityId : activityId, status : status, page : page}})
|
||||
const couponArr = (activityId, status, page) => req({url: "coupons/list", data:{activityId : activityId, status : status, page : page || ''}})
|
||||
|
||||
//卡券详情
|
||||
const couponinfo = (coupon_id, user_lng, user_lat) => req({url: "coupons/show", data:{coupon_id : coupon_id, user_lng : user_lng, user_lat : user_lat}})
|
||||
@@ -23,7 +23,7 @@ const qrcode = (coupon_id) => req({url: "coupons/qrcode", data:{coupon_id : coup
|
||||
const barcode = (coupon_id) => req({url: "coupons/" + coupon_id + '/barcode'})
|
||||
|
||||
//门店列表
|
||||
const stores = (coupon_id, province_id, city_id, district_id, title, user_lng, user_lat, page) => req({url: "coupons/new_stores", method: "POST", data:{coupon_id : coupon_id, province_id : province_id || '', city_id : city_id || '', district_id : district_id || '', title : title || '', user_lng : user_lng, user_lat : user_lat, page : page}})
|
||||
const stores = (coupon_id, province_id, city_id, district_id, title, user_lng, user_lat, page) => req({url: "coupons/new_stores", method: "POST", data:{coupon_id : coupon_id, province_id : province_id || '', city_id : city_id || '', district_id : district_id || '', title : title || '', user_lng : user_lng, user_lat : user_lat, page : page || ''}})
|
||||
|
||||
//门店详情
|
||||
const storesShow = (store_id, user_lng, user_lat) => req({url: "coupons/store/show", data:{store_id : store_id, user_lng : user_lng, user_lat : user_lat}})
|
||||
@@ -38,7 +38,7 @@ const jssdk = (coupon_id) => req({url: "coupons/jssdk?coupon_id=" + coupon_id})
|
||||
const cards = (code, pass) => req({url: "user/cards/activate", method: "POST", data:{code : code, pass : pass}})
|
||||
|
||||
// 积分账变记录
|
||||
const logs = (type, channel, page) => req({url: "account/logs", data:{type : type, channel: channel, page : page}})
|
||||
const logs = (type, channel, page) => req({url: "account/logs", data:{type : type, channel: channel, page : page || ''}})
|
||||
|
||||
// 冻结列表
|
||||
const ungrants = (type,) => req({url: "account/newungrants", data:{type : type}})
|
||||
@@ -52,6 +52,81 @@ const unicom = (mobile, channel, code) => req({url: "unicom/get", method: "POST"
|
||||
// 获取商家券信息
|
||||
const merchant_card = (coupon_id) => req({url: "coupons/merchant_card", method: "GET", data:{coupon_id : coupon_id}})
|
||||
|
||||
// 获取商家券信息
|
||||
const washcarBuy = (welfare_id, right_id, qty, address_id, is_deliver) => req({url: "washcar/create", data:{welfare_id : welfare_id, right_id : right_id, qty : qty, address_id : address_id || '', is_deliver : is_deliver}})
|
||||
|
||||
// 收银台提交
|
||||
const washcarCreate = (welfare_id, right_id, qty, address_id, is_deliver) => req({url: "washcar/create", method: "POST", data:{welfare_id : welfare_id, right_id : right_id, qty : qty, address_id : address_id || '', is_deliver : is_deliver}})
|
||||
|
||||
// 我的分享
|
||||
const myshare = (channel,parent_id,url) => req({url: "user/share",data:{channel: channel,parent_id : parent_id || '', url: url}})
|
||||
|
||||
// 我的分享-展示参数
|
||||
const wechatShares = () => req({url: "ajax/wechat_shares"})
|
||||
|
||||
// 我的推荐
|
||||
const childs = (page) => req({url: "user/childs",data:{page : page || ''}})
|
||||
|
||||
// 校验转账的手机号码
|
||||
const ajaxTel = (mobile) => req({url: "ajax/user", data:{mobile : mobile}})
|
||||
|
||||
// 转账获取积分账户分类
|
||||
const transfers = () => req({url: "user/transfers"})
|
||||
|
||||
// 转账提交表单
|
||||
const transfersForm = (mobile, type, amount, paypass) => req({url: "user/transfers", method: "POST", data:{mobile : mobile, type : type, amount : amount, paypass: paypass}})
|
||||
|
||||
// 设置支付密码
|
||||
const setPassword = (password, password_confirmation) => req({url: "user/setting/set_password", method: "POST", data:{password : password, password_confirmation : password_confirmation}})
|
||||
|
||||
// 修改支付密码
|
||||
const changePassword = (old_password, password, password_confirmation) => req({url: "user/setting/change_password", method: "POST", data:{old_password : old_password, password : password, password_confirmation : password_confirmation}})
|
||||
|
||||
// 重置支付密码
|
||||
const resetPassword = (code, password, password_confirmation, mobile, channel) => req({url: "user/setting/reset_password", method: "POST", data:{code : code, password : password, password_confirmation : password_confirmation, mobile : mobile, channel : channel}})
|
||||
|
||||
// 提现前置账户信息
|
||||
const withdraws = () => req({url: "withdraws/create"})
|
||||
|
||||
// 提现记录列表
|
||||
const withdrawsList = (status, page) => req({url: "user/withdraws", data:{status: status, page : page || ''}})
|
||||
|
||||
// 提现表单填写
|
||||
const withdrawsForm = (amount, channel) => req({url: "withdraws", method: "POST", data:{amount : amount, channel: channel}})
|
||||
|
||||
// 2021-07-28新增
|
||||
// 我的收益
|
||||
const myProfit = () => req({url: "data/index"})
|
||||
|
||||
// 我的收益-收益报表
|
||||
const myIncome = (month) => req({url: "data/income", data:{month: month}})
|
||||
|
||||
// 我的收益-收益报表
|
||||
const profitOrders = (type, page) => req({url: "data/orders", data:{type: type, page : page || ''}})
|
||||
|
||||
// 我的收益-我的团队
|
||||
const profitTeam = (identity_id, sort, page) => req({url: "data/teams", data:{identity_id: identity_id, sort: sort, page : page || ''}})
|
||||
|
||||
// 权益详细列表
|
||||
const profitLogs = (name, page) => req({url: "data/logs", data:{name: name, page : page || ''}})
|
||||
|
||||
// 产品分享
|
||||
const productList = (page) => req({url: "shares/goods", data:{page : page || ''}})
|
||||
const productInfo = (right) => req({url: "shares/goods/" + right})
|
||||
const productPoster = (right) => req({url: "shares/goods/" + right + "/poster"})
|
||||
|
||||
// 储值分享
|
||||
const storedList = () => req({url: "shares/recharges"})
|
||||
|
||||
// 产品分享二维码+储值分享二维码
|
||||
const publicCode = (channel, type, url) => req({url: "user/share/goods", data:{channel: channel, type : type, url: url}})
|
||||
|
||||
// 订单收益列表
|
||||
const profits = (page) => req({url: "data/profits", data:{page : page || ''}})
|
||||
|
||||
// 订单收益列表-下级明细
|
||||
const profitsNext = (order_type, order_id, page) => req({url: "data/profitlogs", data:{order_type : order_type, order_id : order_id, page : page || ''}})
|
||||
|
||||
export default({
|
||||
index,
|
||||
mobiles,
|
||||
@@ -69,5 +144,31 @@ export default({
|
||||
ungrants,
|
||||
send,
|
||||
unicom,
|
||||
merchant_card
|
||||
merchant_card,
|
||||
washcarBuy,
|
||||
washcarCreate,
|
||||
myshare,
|
||||
wechatShares,
|
||||
childs,
|
||||
ajaxTel,
|
||||
transfers,
|
||||
transfersForm,
|
||||
setPassword,
|
||||
changePassword,
|
||||
resetPassword,
|
||||
withdraws,
|
||||
withdrawsList,
|
||||
withdrawsForm,
|
||||
myProfit,
|
||||
myIncome,
|
||||
profitOrders,
|
||||
profitTeam,
|
||||
profitLogs,
|
||||
productList,
|
||||
productInfo,
|
||||
productPoster,
|
||||
storedList,
|
||||
publicCode,
|
||||
profits,
|
||||
profitsNext
|
||||
})
|
||||
|
||||
@@ -7,17 +7,24 @@ import {updToken} from './updateToken'
|
||||
|
||||
// wx8e424dbdc443381f 测试appid
|
||||
// wxb2e3e8091d9feac3 正式appid
|
||||
const api = "https://card.ysd-bs.com/api/" //正式地址
|
||||
const api = "https://lifetest.ysd-bs.com/api/" //正式地址
|
||||
const header = {
|
||||
"Accept" : "application/json"
|
||||
}
|
||||
let isToken = true
|
||||
|
||||
/**
|
||||
* 请求
|
||||
* @property {Object} req
|
||||
*/
|
||||
|
||||
const req = (obj) => {
|
||||
const req = (obj, noToken) => {
|
||||
|
||||
// 检查是否无需要token
|
||||
if(noToken != undefined){
|
||||
isToken = noToken
|
||||
}
|
||||
|
||||
// header
|
||||
if(obj.token){
|
||||
header.Authorization = obj.token || ''
|
||||
@@ -33,6 +40,10 @@ const req = (obj) => {
|
||||
"Authorization" : wx.getStorageSync("token") || ""
|
||||
}
|
||||
|
||||
if(!isToken){
|
||||
obj.header.Authorization = ''
|
||||
}
|
||||
|
||||
wx.request({
|
||||
url : api + obj.url,
|
||||
header : obj.header || {},
|
||||
@@ -60,6 +71,9 @@ const req = (obj) => {
|
||||
icon : "none"
|
||||
})
|
||||
reject(err)
|
||||
},
|
||||
complete(){
|
||||
if(!isToken) isToken = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
20
app.js
20
app.js
@@ -9,7 +9,16 @@ var QQMapWX = require('utils/qqmap-wx-jssdk.min.js');
|
||||
var qqmapsdk;
|
||||
|
||||
App({
|
||||
onLaunch() {
|
||||
onLaunch(e) {
|
||||
// 获取打开场景值
|
||||
// this.globalData.scene = e.scene
|
||||
|
||||
// 沃支付是否开启
|
||||
api.index.woPayment().then(res=>{
|
||||
this.globalData.unicomPay = res.data.unicom_pay
|
||||
})
|
||||
|
||||
|
||||
// 获取系统信息
|
||||
this.globalData.statusBarHeight = wx.getSystemInfoSync().statusBarHeight
|
||||
|
||||
@@ -55,6 +64,7 @@ App({
|
||||
wx.$api = api
|
||||
},
|
||||
globalData: {
|
||||
scene : '',
|
||||
isUser : false,
|
||||
userInfo : null,
|
||||
token : "",
|
||||
@@ -65,6 +75,12 @@ App({
|
||||
atcity : "",
|
||||
adcode : '',
|
||||
longitude : '',
|
||||
latitude : ''
|
||||
latitude : '',
|
||||
unicomPay : '',
|
||||
shareObj : {
|
||||
type : '',
|
||||
goodsId : '',
|
||||
userId : ''
|
||||
}
|
||||
}
|
||||
})
|
||||
21
app.json
21
app.json
@@ -27,7 +27,26 @@
|
||||
"pages/welfare/welfare",
|
||||
"pages/classify/classify",
|
||||
"pages/washcar/washcar",
|
||||
"pages/makeForm/makeForm"
|
||||
"pages/makeForm/makeForm",
|
||||
"pages/car/index",
|
||||
"pages/code/code",
|
||||
"pages/myBalance/myBalance",
|
||||
"pages/password/password",
|
||||
"pages/favour/favour",
|
||||
"pages/recommend/recommend",
|
||||
"pages/withdrawal_record/withdrawal_record",
|
||||
"pages/withdrawal_form/withdrawal_form",
|
||||
"pages/password_set/password_set",
|
||||
"pages/password_forget/password_forget",
|
||||
"pages/myProfit/myProfit",
|
||||
"pages/myProfit_list/myProfit_list",
|
||||
"pages/userStored/userStored",
|
||||
"pages/userStored/storedCode/storedCode",
|
||||
"pages/userGoods/userGoods",
|
||||
"pages/userGoods/goodsCode/goodsCode",
|
||||
"pages/userGoods/goodsDet/goodsDet",
|
||||
"pages/cashier/cashier",
|
||||
"pages/myBalance/myBalance_list/myBalance_list"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
||||
@@ -71,7 +71,7 @@ Page({
|
||||
accounts : newData,
|
||||
page : res.data.page
|
||||
})
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,19 +7,25 @@
|
||||
</view>
|
||||
<view class="integra-info">
|
||||
<view class="integra-right">
|
||||
<view class="integra-title"><text>可用余额</text><image src="/static/icon/integra_icon00.png"></image></view>
|
||||
<view class="integra-title"><text>可用余额</text>
|
||||
<image src="/static/icon/integra_icon00.png"></image>
|
||||
</view>
|
||||
<view class="integra-number">{{number}}</view>
|
||||
<view class="integra-btn"><text>可用余额,入账记录</text></view>
|
||||
</view>
|
||||
<view class="integra-right">
|
||||
<view class="integra-title"><text>待发放</text><image src="/static/icon/integra_icon01.png"></image></view>
|
||||
<view class="integra-title"><text>待发放</text>
|
||||
<image src="/static/icon/integra_icon01.png"></image>
|
||||
</view>
|
||||
<view class="integra-number">{{blockeds}}</view>
|
||||
<navigator hover-class="none" url="/pages/frozen/frozen?type={{type}}&blockeds={{blockeds}}" class="integra-btn integra-blue">立即查询<image src="/static/icon/rightsArrow.png"></image></navigator>
|
||||
<navigator hover-class="none" url="/pages/frozen/frozen?type={{type}}&blockeds={{blockeds}}"
|
||||
class="integra-btn integra-blue">立即查询<image src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="integra-cont" wx:if="{{accounts != ''}}">
|
||||
<view class="integra-cont">
|
||||
<view class="integra-cont-title">
|
||||
<view class="integra-cont-name">账变记录</view>
|
||||
<view class="integra-cont-picker">
|
||||
@@ -28,12 +34,13 @@
|
||||
</picker>
|
||||
<image class="integra-cont-icon" src="/static/icon/arrow_down.png"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<block wx:if="{{accounts.length > 0}}">
|
||||
<view class="integra-list" wx:for="{{accounts}}" wx:key="integras">
|
||||
<view class="integra-text">
|
||||
<view class="integra-title">
|
||||
<view class="integra-title-tips {{item.channel == 'in' ? 'active' : ''}}">{{item.channel == 'in' ? '入' : '出'}}</view>{{item.title}}
|
||||
<view class="integra-title-tips {{item.channel == 'in' ? 'active' : ''}}">{{item.channel == 'in' ?
|
||||
'入' : '出'}}</view>{{item.title}}
|
||||
</view>
|
||||
<view class="integra-oints {{item.channel == 'in' ? 'active' : ''}}">
|
||||
{{item.variable}}
|
||||
@@ -60,10 +67,10 @@
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="https://storage.funnyzhibo.com/images/2020/05/06/staff_null.png"></image>
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/legal_tips.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -205,3 +205,15 @@
|
||||
/* .integra-time text {
|
||||
color: #000;
|
||||
} */
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ Page({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
},2000)
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,7 @@ Page({
|
||||
indexArr : res.data.data,
|
||||
page : res.data.page
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ Page({
|
||||
this.setData({
|
||||
order : res.data
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -56,7 +56,7 @@ Page({
|
||||
url: '/pages/activityOrder/activityOrder',
|
||||
})
|
||||
},2000)
|
||||
})
|
||||
}).catch(err => {});
|
||||
} else if (res.cancel) {
|
||||
wx.showToast({
|
||||
title : '取消',
|
||||
@@ -103,7 +103,7 @@ Page({
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -59,7 +59,7 @@ Page({
|
||||
|
||||
// 获取商品信息
|
||||
this.redwineInfo(res.data.data[1].id)
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -73,7 +73,7 @@ Page({
|
||||
params : res.data.params,
|
||||
paramsIndex : res.data.params.findIndex(val => val.def == 1)
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ Page({
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@ Page({
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -77,7 +77,7 @@ Page({
|
||||
title: res.data,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
} else if (res.cancel) {
|
||||
wx.showToast({
|
||||
title : '取消',
|
||||
@@ -124,7 +124,7 @@ Page({
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -32,7 +32,7 @@ Page({
|
||||
this.setData({
|
||||
addressArr: res.data
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ Page({
|
||||
})
|
||||
|
||||
wx.hideLoading()
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -81,7 +81,7 @@ Page({
|
||||
title: res.data,
|
||||
icon : "none"
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -117,7 +117,7 @@ Page({
|
||||
defaultList : res.data.address,
|
||||
isDefault : res.data.address.is_default
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -132,7 +132,7 @@ Page({
|
||||
areaSn : areaArr[areaIndex].code,
|
||||
areas : areaArr
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -165,7 +165,7 @@ Page({
|
||||
cityList : cityArr,
|
||||
cityIndex : 0
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -197,7 +197,7 @@ Page({
|
||||
regiId : res.data[0].code,
|
||||
regiIndex : 0
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -219,12 +219,12 @@ Page({
|
||||
// 编辑地址
|
||||
wx.$api.address.keep(this.data.addressId, e.detail.value.name, e.detail.value.mobile, this.data.areaSn, this.data.cityId, this.data.regiId, e.detail.value.address).then(res=>{
|
||||
wx.navigateBack()
|
||||
})
|
||||
}).catch(err => {});
|
||||
} else {
|
||||
// 创建地址
|
||||
wx.$api.address.add(e.detail.value.name, e.detail.value.mobile, this.data.areaSn, this.data.cityId, this.data.regiId, e.detail.value.address, this.data.defaultVal).then(res=>{
|
||||
wx.navigateBack()
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
293
pages/car/index.js
Normal file
293
pages/car/index.js
Normal file
@@ -0,0 +1,293 @@
|
||||
/*
|
||||
* 本时生活
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
rightId : '', //权益id
|
||||
welfareId : '', //活动id
|
||||
address : '', //默认地址
|
||||
allAddress : '', //收货地址列表
|
||||
detail : '', //权益详情
|
||||
amount : '', //总金额
|
||||
moreAmount : '', //产品金额
|
||||
platIndex : 0, //选择提交方式下标
|
||||
isdeliver : -1,
|
||||
platformCp : [], //选择提交数组
|
||||
num : 1, //购买的数量
|
||||
content : '', //内容介绍
|
||||
notification: '', //重要提示
|
||||
remark : '', //使用须知
|
||||
score : '', //应付总积分
|
||||
freight : '', //运费
|
||||
welfareType : '', //权益类型
|
||||
noticeShow : true, //须知显示状态
|
||||
addressShow : false, //收货地址显示
|
||||
payWayIndex : 0,
|
||||
unicomPay : '' //是否有沃支付
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
this.setData({
|
||||
rightId : options.right_id,
|
||||
welfareId: options.welfare_id,
|
||||
unicomPay: getApp().globalData.unicomPay
|
||||
})
|
||||
|
||||
// 获取卡券列表
|
||||
this.couponInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 卡券列表
|
||||
*/
|
||||
couponInfo() {
|
||||
wx.$api.user.washcarBuy(this.data.welfareId, this.data.rightId, this.data.num, this.data.address.id, this.data.isdeliver).then(res=>{
|
||||
let obj = res.data.detail.express
|
||||
let defGet = res.data.detail.def_get
|
||||
let arr = new Array
|
||||
arr = Object.keys(obj).map(val=>{
|
||||
return { ...obj[val], ...{key: val} }
|
||||
})
|
||||
|
||||
if(this.data.isdeliver == -1){
|
||||
if(res.data.detail.type == 'physical') {
|
||||
this.setData({
|
||||
isdeliver : res.data.detail.def_get
|
||||
})
|
||||
}
|
||||
if(res.data.detail.type == 'virtual') this.setData({isdeliver : 1})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
address : res.data.address,
|
||||
allAddress : res.data.all_address,
|
||||
detail : res.data.detail,
|
||||
num : res.data.qty,
|
||||
freight : res.data.freight,
|
||||
platformCp : arr,
|
||||
amount : res.data.total,
|
||||
moreAmount : res.data.amount,
|
||||
score : res.data.score,
|
||||
welfareType : res.data.type,
|
||||
remark : res.data.detail.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"'),
|
||||
content : res.data.detail.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 须知展开收起状态
|
||||
*/
|
||||
noticeTap() {
|
||||
this.setData({
|
||||
noticeShow : !this.data.noticeShow
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 收货地址弹出
|
||||
*/
|
||||
addressTap() {
|
||||
this.setData({
|
||||
addressShow : !this.data.addressShow
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择收货地址
|
||||
*/
|
||||
selectAddress(e){
|
||||
let new_addressId = e.currentTarget.dataset.id,
|
||||
addressId = this.data.address.id
|
||||
if (new_addressId != addressId) {
|
||||
this.setData({
|
||||
address : e.currentTarget.dataset.index,
|
||||
addressShow : false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
addressShow : false
|
||||
})
|
||||
}
|
||||
|
||||
// 获取卡券列表
|
||||
this.couponInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付选择
|
||||
*/
|
||||
payBind(e) {
|
||||
this.setData({
|
||||
payWayIndex: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品数量加减
|
||||
*/
|
||||
goodsNumber(e){
|
||||
if(this.data.welfareType == 'welfare') {
|
||||
wx.showToast({
|
||||
title : '抱歉,只能购买一张',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let num = this.data.num
|
||||
if (e.currentTarget.dataset.type == 'plus'){
|
||||
num ++;
|
||||
}else{
|
||||
if (num > 1){
|
||||
num --;
|
||||
}else{
|
||||
wx.showToast({
|
||||
title : '商品数量不能小于1',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
num : num
|
||||
})
|
||||
|
||||
// 获取详情
|
||||
this.couponInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择提交方式
|
||||
*/
|
||||
platBind(e) {
|
||||
this.setData({
|
||||
platIndex : e.detail.value,
|
||||
isdeliver : this.data.platformCp[e.detail.value].value
|
||||
})
|
||||
// 获取详情
|
||||
this.couponInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付提交
|
||||
*/
|
||||
submitOrder() {
|
||||
if(this.data.isdeliver.length == 0) {
|
||||
this.setData({
|
||||
isdeliver: this.data.detail.def_get
|
||||
})
|
||||
}
|
||||
let right_id = this.data.rightId,
|
||||
welfare_id = this.data.welfareId,
|
||||
address_id = this.data.address.id,
|
||||
is_deliver = this.data.isdeliver,
|
||||
qty = this.data.num
|
||||
|
||||
wx.$api.user.washcarCreate(welfare_id, right_id, qty, address_id, is_deliver).then(res=>{
|
||||
// payWayIndex为1的时候为沃支付-直接跳转h5
|
||||
if (this.data.payWayIndex == 1) {
|
||||
const newUrl = "https://card.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.redirectTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/webView/webView?url=${url}`
|
||||
});
|
||||
}
|
||||
|
||||
// payWayIndex为0的时候为微信支付
|
||||
if(this.data.payWayIndex == 0) {
|
||||
let dataUrl = '', //定义接口来源名称
|
||||
Newtype = res.data.type //订单来源
|
||||
// welfare为福利活动购买
|
||||
if(Newtype == 'welfare') dataUrl = wx.$api.index.fridayPay(res.data.trade_no)
|
||||
|
||||
// right为权益购买
|
||||
if(Newtype == 'right') dataUrl = wx.$api.index.wechat(res.data.trade_no)
|
||||
|
||||
// 第一步接口调取
|
||||
dataUrl.then(payEes=>{
|
||||
let payInfo = JSON.parse(payEes.data)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
nonceStr : payInfo.nonceStr,
|
||||
package : payInfo.package,
|
||||
paySign : payInfo.paySign,
|
||||
signType : payInfo.signType,
|
||||
success : res=>{
|
||||
if(res.errMsg == "requestPayment:ok"){
|
||||
wx.showToast({
|
||||
title: '支付成功',
|
||||
icon : 'success'
|
||||
})
|
||||
if(Newtype == 'welfare'){
|
||||
setTimeout(()=>{
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfareGoods'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfare'
|
||||
})
|
||||
}
|
||||
},3000)
|
||||
}
|
||||
if(Newtype == 'right'){
|
||||
setTimeout(()=>{
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights'
|
||||
})
|
||||
}
|
||||
},3000)
|
||||
}
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
if(Newtype == 'welfare'){
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfareGoods&stateType=unpay'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfare&stateType=unpay'
|
||||
})
|
||||
}
|
||||
}
|
||||
if(Newtype == 'right'){
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights&stateType=unpay'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
}).catch(err => {});
|
||||
}
|
||||
})
|
||||
3
pages/car/index.json
Normal file
3
pages/car/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
166
pages/car/index.wxml
Normal file
166
pages/car/index.wxml
Normal file
@@ -0,0 +1,166 @@
|
||||
<!-- 立即购买 -->
|
||||
<view class="newrightsBtn" bindtap="submitOrder">
|
||||
<view class="rightsBtn-text">
|
||||
<view class="rightsBtn-text-num">共:{{num}}件商品 </view>
|
||||
<view>实付:<text>¥{{amount}}</text></view>
|
||||
</view>
|
||||
<button disabled="{{disabled}}">立即购买</button>
|
||||
</view>
|
||||
|
||||
<view style="padding-bottom: 100px">
|
||||
<view class="cont">
|
||||
<view class="contBack">
|
||||
<image class="classBack" src="https://lifetest.ysd-bs.com/storage/materials/2021/08/09/class_back_02.png"
|
||||
mode="scaleToFill"></image>
|
||||
<view class="classCircle"></view>
|
||||
<view class="rightsCont">
|
||||
<scroll-view scroll-x class="welfareCont-top" scroll-with-animation>
|
||||
<view class="welfareCont-list-img" wx:for="{{detail.logos}}" wx:key="logos">
|
||||
<image src="{{item}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="nowrap rightsCont-btn">
|
||||
{{detail.title}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rightsNumber">
|
||||
<image class="rightsGoods-img" src="{{detail.goods_cover}}" mode="aspectFill"></image>
|
||||
<view class="rightsGoods">
|
||||
<view class="nowrap rightsGoods-text">
|
||||
{{detail.title}}
|
||||
</view>
|
||||
<view class="rightsGoods-price">
|
||||
<view class="rightsGoods-number"><text>¥</text>{{detail.price}}</view>
|
||||
<view class="rightsAdd">
|
||||
<view class="rightsAdd-btn rightsAdd-remove {{num != 1 ? 'active' : ''}}" bindtap="goodsNumber"
|
||||
data-type="remove">-</view>
|
||||
<input class="rightsAdd-input" data-num="{{num}}" value="{{num}}" type="number" maxlength='4'
|
||||
bindblur="goodsNumberInput" disabled></input>
|
||||
<view class="rightsAdd-btn rightsAdd-plus" bindtap="goodsNumber" data-type="plus">+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rightsList" style="padding: 0 0 2rpx">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">{{detail.attribute.form_type}}</view>
|
||||
<view class="rightsLabel-right rightsLabel-red">-¥{{score}}</view>
|
||||
</view>
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">{{detail.attribute.form_pay}}</view>
|
||||
<view class="rightsLabel-right">¥{{amount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 规格 -->
|
||||
<view class="rightsList" wx:if="{{detail.type == 'physical'}}">
|
||||
<block wx:if="{{detail.type == 'physical'}}">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">提交方式</view>
|
||||
<view class="rightsLabel-right rightsLabel-range">
|
||||
<picker range="{{platformCp}}" range-key="name" bindchange="platBind">
|
||||
<view class="tabs-text">
|
||||
{{platformCp[platIndex].name}}
|
||||
</view>
|
||||
</picker>
|
||||
<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rightsLabel rightsLabel-address" wx:if="{{platformCp[platIndex].name == '快递'}}">
|
||||
<image class="rightsLabel-icon" src="/static/img/new_rightsAddress.png"></image>
|
||||
<block wx:if="{{address != ''}}">
|
||||
<view class="rightsLabel-right" bindtap="addressTap">
|
||||
<view class="rightsLabel-address-text">
|
||||
<view class="rightsLabel-address-name">{{address.name}}<view class="rightsLabel-address-tel">{{address.mobile}}</view></view>
|
||||
<text class="nowrap">{{address.all_address}}</text>
|
||||
</view>
|
||||
<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<navigator class="rightsLabel-right" hover-class="none" url="/pages/address_form/address_form?type=Add">
|
||||
<view class="rightsLabel-address-text" style="line-height: 90rpx;">
|
||||
添加收货地址
|
||||
</view>
|
||||
<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<view class="rightsLabel" wx:if="{{platformCp[platIndex].name == '快递'}}">
|
||||
<view class="rightsLabel-left">快递运费</view>
|
||||
<view class="rightsLabel-right rightsLabel-freight">¥{{freight}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式 -->
|
||||
<view class="rightsList" style="padding: 0 0 2rpx">
|
||||
<view class="radioList" style="padding: 30rpx">
|
||||
<radio-group bindchange="payBind">
|
||||
<view class="payContList-label">
|
||||
<view class="payContList-label-name">
|
||||
<image class="payContList-label-img" src="/static/img/wx.jpg"></image>
|
||||
微信支付
|
||||
</view>
|
||||
<radio class="radio" value="0" checked></radio>
|
||||
</view>
|
||||
<view class="payContList-label" wx:if="{{unicomPay}}">
|
||||
<view class="payContList-label-name">
|
||||
<image class="payContList-label-img" src="/static/img/wqb.jpg"></image>
|
||||
沃钱包支付
|
||||
</view>
|
||||
<radio class="radio" value="1"></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 购买须知 -->
|
||||
<view class="notice">
|
||||
<view class="noticeTitle" bindtap="noticeTap">
|
||||
<view class="noticeTitle-flex">
|
||||
<image class="noticeTitle-img" src="/static/icon/notice_icon.png"></image>
|
||||
购买前请仔细阅读使用须知、内容介绍
|
||||
</view>
|
||||
<image class="noticeTitle-row {{noticeShow ? 'active' : ''}}" src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
<view class="noticeText {{noticeShow ? 'active' : ''}}">
|
||||
<view class="noticeText-top">购买须知</view>
|
||||
<view class="noticeText-cont">
|
||||
<rich-text nodes="{{remark}}"></rich-text>
|
||||
</view>
|
||||
|
||||
<view class="noticeText-top">内容介绍</view>
|
||||
<view class="noticeText-cont">
|
||||
<rich-text nodes="{{content}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 选择收货地址 -->
|
||||
<view class="addressBack {{addressShow ? 'active':''}}" bindtap="addressHide"></view>
|
||||
<view class="addressCont {{addressShow ? 'active':''}}">
|
||||
<view class="addressCont-title uni-border-bottom">
|
||||
<view class="addressCont-left">请选择收货地址</view>
|
||||
<view class="addressCont-right" bindtap="addSelect">新增收货地址</view>
|
||||
</view>
|
||||
<scroll-view class="header-classify" scroll-y="true">
|
||||
<view class="addressCont-list uni-border-bottom" wx:for="{{allAddress}}" wx:key="allAddress"
|
||||
bindtap="selectAddress" data-id="{{item.id}}" data-index="{{item}}">
|
||||
<view class="addressCont-top">
|
||||
<view class="addressCont-name">{{item.name}}</view>
|
||||
<view class="addressCont-tel">{{item.mobile}}</view>
|
||||
</view>
|
||||
<view class="addressCont-text">
|
||||
{{item.all_address}}
|
||||
</view>
|
||||
<view class="address-tool-icon">选择地址</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
747
pages/car/index.wxss
Normal file
747
pages/car/index.wxss
Normal file
@@ -0,0 +1,747 @@
|
||||
|
||||
.cont {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* 卡券权益 */
|
||||
.contBack {
|
||||
position: relative;
|
||||
width: 200%;
|
||||
height: 340rpx;
|
||||
left: -50%;
|
||||
text-align: center;
|
||||
background: #000000;
|
||||
border-radius: 0 0 100% 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.classBack {
|
||||
position: absolute;
|
||||
left: 28%;
|
||||
right: 30%;
|
||||
width: 44%;
|
||||
top: 40rpx;
|
||||
}
|
||||
|
||||
.classCircle {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.classCircle::after,
|
||||
.contBack::before {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
content: '';
|
||||
z-index: 1;
|
||||
background-color: rgba(255,255,255,.1);
|
||||
}
|
||||
|
||||
.classCircle::after {
|
||||
left: 20%;
|
||||
top: -20rpx;
|
||||
width: 260rpx;
|
||||
height: 260rpx;
|
||||
}
|
||||
|
||||
.contBack::before {
|
||||
right: 20%;
|
||||
top: 55%;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
|
||||
.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: 50rpx 0 20rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.welfareCont-list-img {
|
||||
border-radius: 50%;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
display: inline-block;
|
||||
margin: 0 15rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.welfareCont-list-img image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.rightsNumber {
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
padding: 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsGoods-img {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.rightsGoods {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 80rpx 40rpx 0 270rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsGoods-text {
|
||||
margin-bottom: 40rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rightsGoods-price {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.rightsGoods-number {
|
||||
flex: 1;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.rightsGoods-number>text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.rightsAdd {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.rightsAdd-btn {
|
||||
border-radius: 4rpx;
|
||||
text-align: center;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 45rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rightsAdd-remove {
|
||||
background: #f8f8f8;
|
||||
color: #d9d9d9;
|
||||
}
|
||||
|
||||
.rightsAdd-remove.active,
|
||||
.rightsAdd-plus {
|
||||
background: #e8e4e5;
|
||||
color: #6b6768;
|
||||
}
|
||||
|
||||
.rightsAdd-input {
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
/* 支付类型选择 */
|
||||
.radioList-label {
|
||||
padding: 20rpx 0 40rpx;
|
||||
font-size: 28rpx
|
||||
}
|
||||
|
||||
.payContList-label {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.payContList-label:last-child {
|
||||
border:none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.payContList-label-name {
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.payContList-label-img {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
radio {
|
||||
transform:scale(0.8);
|
||||
}
|
||||
|
||||
|
||||
.rightsCont {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: calc(28% - 2rpx);
|
||||
right: calc(30% - 2rpx);
|
||||
width: calc(44% + 4rpx);
|
||||
top: 50rpx;
|
||||
}
|
||||
|
||||
.rightsCont-btn {
|
||||
background: rgba(255, 255, 0255, .4);
|
||||
width: 100%;
|
||||
line-height: 70rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsCont-tips {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.rightsNumber {
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
padding: 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 购买按钮 */
|
||||
.rightsBtn,
|
||||
.newrightsBtn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
z-index: 9;
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.rightsBtn button,
|
||||
.rightsBtn text {
|
||||
display: block;
|
||||
margin: 12rpx 30rpx;
|
||||
width: calc(100% - 60rpx) !important;
|
||||
height: 74rpx !important;
|
||||
line-height: 74rpx !important;
|
||||
padding: 0;
|
||||
background: #eacf88;
|
||||
text-align: center;
|
||||
border-radius: 60rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.rightsBtn-text {
|
||||
flex: 1;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.rightsBtn-text-num {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.rightsBtn-text text {
|
||||
font-size: 38rpx;
|
||||
color: #fe2d55;
|
||||
}
|
||||
|
||||
.newrightsBtn button {
|
||||
width: 280rpx !important;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
border-radius: 80rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.rightsBtn.active text {
|
||||
background: #dedede;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
.rightsList,
|
||||
.notice,
|
||||
.detailsStore {
|
||||
background: white;
|
||||
border-radius: 10rpx;
|
||||
padding: 10rpx 0;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsLabel,
|
||||
.rightsLabel-pay {
|
||||
display: flex;
|
||||
padding: 20rpx 40rpx;
|
||||
color: #6c6c6c;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.rightsLabel .rightsLabel-left {
|
||||
flex: 1;
|
||||
color: #747d86;
|
||||
}
|
||||
|
||||
.rightsLabel .rightsLabel-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address .rightsLabel-right {
|
||||
width: calc(100% - 90rpx);
|
||||
margin-left: 20rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.rightsLabel-address .rightsLabel-row {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-name {
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-tel {
|
||||
padding-left: 30rpx;
|
||||
color: #959595;
|
||||
}
|
||||
|
||||
.rightsLabel-freight {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.rightsLabel-black {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-range {
|
||||
display: flex;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rightsLabel-row {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
margin: 0 0 0 6rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-black .rightsLabel-right,
|
||||
.rightsLabel-red {
|
||||
color: #ff5b5d;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-black .rightsLabel-left {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.rightsLabel-score {
|
||||
font-weight: 600;
|
||||
color: #000;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-pay {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.rightsLabel-pay .rightsLabel-left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.notice {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.noticeTitle {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.noticeTitle-flex {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
font-size: 30rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.noticeTitle-img {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.noticeText {
|
||||
font-size: 26rpx;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.noticeText.active {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.noticeText-top {
|
||||
margin: 30rpx 0 10rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.noticeText-cont {
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.noticeTitle-row {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
}
|
||||
|
||||
.noticeTitle-row.active {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
|
||||
.rightsLabel-address {
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin: 10rpx 0;
|
||||
padding: 25rpx 40rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address::after,
|
||||
.rightsLabel-address::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 30rpx;
|
||||
width: calc(100% - 60rpx);
|
||||
height: 2rpx;
|
||||
background-color: #bfbfbf;
|
||||
}
|
||||
|
||||
.rightsLabel-address::after {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.rightsLabel-address::before {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.rightsLabel-address text {
|
||||
display: inline-block;
|
||||
width: calc(100% - 46rpx);
|
||||
}
|
||||
|
||||
.rightsLabel-address .rightsLabel-right {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
/* 选择收货地址 */
|
||||
.addressBack {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, .4);
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.addressBack.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.addressCont {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: -1000%;
|
||||
transition: .2s;
|
||||
background: #fff;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.addressCont.active {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.addressCont-title {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.addressCont-left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.addressCont-right {
|
||||
color: #309ded;
|
||||
}
|
||||
|
||||
.header-classify {
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
height: 600rpx;
|
||||
}
|
||||
|
||||
.addressCont-list {
|
||||
padding: 30rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.addressCont-top {
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.addressCont-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.addressCont-text {
|
||||
color: #666;
|
||||
width: calc(100% - 160rpx);
|
||||
}
|
||||
|
||||
.addressCont-list:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.rightsLabel-address {
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin: 10rpx 0;
|
||||
padding: 25rpx 40rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address::after,
|
||||
.rightsLabel-address::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 30rpx;
|
||||
width: calc(100% - 60rpx);
|
||||
height: 2rpx;
|
||||
background-color: #bfbfbf;
|
||||
}
|
||||
|
||||
.rightsLabel-address::after {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.rightsLabel-address::before {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.rightsLabel-address text {
|
||||
display: inline-block;
|
||||
width: calc(100% - 46rpx);
|
||||
}
|
||||
|
||||
.rightsLabel-address .rightsLabel-right {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.address-tool {
|
||||
display: flex;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.address-tool-btn {
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
border: 2rpx solid #666;
|
||||
color: #666;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-right: 20rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.address-tool-btn-del {
|
||||
color: #dfae2e;
|
||||
border-color: #dfae2e;
|
||||
}
|
||||
|
||||
.address-tool-icon {
|
||||
width: 120rpx;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
border-radius: 4rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 45rpx;
|
||||
right: 10rpx;
|
||||
background: #dfae2e;
|
||||
transform: scale(.9, .9);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.rightsPoint {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 160rpx;
|
||||
background: #eeeeee;
|
||||
z-index: 9;
|
||||
width: 100%;
|
||||
padding: 20rpx 20rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsPoint-cont {
|
||||
width: 100%;
|
||||
background: #eeeeee;
|
||||
border-radius: 10rpx;
|
||||
position: relative;
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.rightsPoint-top {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
padding: 0 20rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rightsPoint-top image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.rightsPoint-text {
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 24rpx;
|
||||
line-height: 44rpx;
|
||||
height: 90rpx;
|
||||
transition: height 25s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.rightsPoint-text.active {
|
||||
height: auto;
|
||||
transition: 2s;
|
||||
}
|
||||
|
||||
.rightsPoint-text view {
|
||||
position: relative;
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
.rightsPoint-text view::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 10rpx;
|
||||
top: 20rpx;
|
||||
background: #000;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.rightsPoint-bolck {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: calc(100% - 40rpx);
|
||||
}
|
||||
|
||||
.pointMore {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: #eeeeee;
|
||||
height: 80rpx;
|
||||
line-height: 82rpx;
|
||||
position: relative;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.pointMore::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background: #f2ecde;
|
||||
}
|
||||
|
||||
.pointMore text {
|
||||
font-size: 28rpx;
|
||||
color: #c38e00;
|
||||
animation: dong 1.8s infinite;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pointMore image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-left: 4rpx;
|
||||
vertical-align: -4rpx;
|
||||
animation: dong 1.8s infinite;
|
||||
}
|
||||
|
||||
@keyframes dong {
|
||||
0% {
|
||||
transform: translate(0px, 0px);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translate(0px, -6rpx);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate(0px, 0px);
|
||||
}
|
||||
}
|
||||
178
pages/cashier/cashier.js
Normal file
178
pages/cashier/cashier.js
Normal file
@@ -0,0 +1,178 @@
|
||||
// pages/cashier/cashier.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
allAmount: '', //支付金额
|
||||
tradeNo : '', //支付订单
|
||||
current : '', //支付方式类型
|
||||
paytType : '', //支付来源类型 welfarePay为周五福利支付 rightsPay为权益支付
|
||||
isDeliver: '', //提货方式 1为自提 0为快递
|
||||
barHeight: getApp().globalData.statusBarHeight, //顶部菜单栏
|
||||
unicomPay: '' //是否有沃支付
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
this.setData({
|
||||
allAmount : options.amount,
|
||||
tradeNo : options.trade_no,
|
||||
paytType : options.pay_type,
|
||||
isDeliver : options.is_deliver,
|
||||
unicomPay: getApp().globalData.unicomPay
|
||||
})
|
||||
|
||||
if(getApp().globalData.unicomPay == true) {
|
||||
this.setData({
|
||||
current: 1
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
current: 2
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择支付方式
|
||||
*/
|
||||
radioChange(e) {
|
||||
this.setData({
|
||||
current : e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付提交
|
||||
*/
|
||||
submitPay() {
|
||||
// current为1的时候为沃支付-直接跳转h5
|
||||
if (this.data.current == 1) {
|
||||
const newUrl = "https://card.ysd-bs.com/unicom/payment?trade_no=" + this.data.tradeNo
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.redirectTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/webView/webView?url=${url}`
|
||||
});
|
||||
}
|
||||
|
||||
// current为2的时候为微信支付
|
||||
if(this.data.current == 2) {
|
||||
let newUrl = '' //定义接口来源名称
|
||||
|
||||
if(this.data.paytType == "welfarePay") newUrl = wx.$api.index.fridayPay
|
||||
if(this.data.paytType == "rightsPay") newUrl = wx.$api.index.wechat
|
||||
|
||||
newUrl(this.data.tradeNo).then(res=>{
|
||||
let payInfo = JSON.parse(res.data)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
nonceStr : payInfo.nonceStr,
|
||||
package : payInfo.package,
|
||||
paySign : payInfo.paySign,
|
||||
signType : payInfo.signType,
|
||||
success : res=>{
|
||||
if(res.errMsg == "requestPayment:ok"){
|
||||
wx.showToast({
|
||||
title: '支付成功',
|
||||
icon : 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
if(this.data.isDeliver == 1) {
|
||||
if( this.data.paytType == "rightsPay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons'
|
||||
})
|
||||
}
|
||||
if( this.data.paytType == "welfarePay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfareGoods'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if( this.data.paytType == "rightsPay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights'
|
||||
})
|
||||
}
|
||||
if( this.data.paytType == "welfarePay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfare'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},3000)
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
if(this.data.isDeliver == 1) {
|
||||
if( this.data.paytType == "rightsPay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay'
|
||||
})
|
||||
}
|
||||
if( this.data.paytType == "welfarePay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfareGoods&stateType=unpay'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if( this.data.paytType == "rightsPay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights&stateType=unpay'
|
||||
})
|
||||
}
|
||||
if( this.data.paytType == "welfarePay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfare&stateType=unpay'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 是否取消支付
|
||||
*/
|
||||
payReturn() {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否取消支付',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
if(this.data.isDeliver == 1) {
|
||||
if( this.data.paytType == "rightsPay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay'
|
||||
})
|
||||
}
|
||||
if( this.data.paytType == "welfarePay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfareGoods&stateType=unpay'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if( this.data.paytType == "rightsPay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights&stateType=unpay'
|
||||
})
|
||||
}
|
||||
if( this.data.paytType == "welfarePay" ) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=welfare&stateType=unpay'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/cashier/cashier.json
Normal file
4
pages/cashier/cashier.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents" : {},
|
||||
"navigationStyle" : "custom"
|
||||
}
|
||||
48
pages/cashier/cashier.wxml
Normal file
48
pages/cashier/cashier.wxml
Normal file
@@ -0,0 +1,48 @@
|
||||
<!-- 头部工具 -->
|
||||
<view class="barHeader" style="padding-top:{{barHeight}}px;" bindtap="payReturn">
|
||||
<image class="barHeader-tool-icon" src="/static/icon/arrow_right.png" mode="widthFix"></image>
|
||||
<view class="barHeader-title">订单支付</view>
|
||||
</view>
|
||||
|
||||
<view style="padding-top: {{barHeight + 45}}px">
|
||||
<!-- <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">
|
||||
<view class="cashierCont-price-title">
|
||||
付款金额
|
||||
</view>
|
||||
<view class="cashierCont-price-number">
|
||||
¥{{ allAmount }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cashierCont-pay">
|
||||
<view class="cashierCont-pay-title">
|
||||
付款方式<text>*</text>
|
||||
</view>
|
||||
<view class="cashierCont-pay-way">
|
||||
<radio-group bindchange="radioChange">
|
||||
<view class="cashierCont-way-label {{ current == 1 ? 'active' : ''}}" wx:if="{{unicomPay}}">
|
||||
<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>
|
||||
<view class="cashierCont-way-label {{ current == 2 ? 'active' : ''}}">
|
||||
<view class="payContList-label-name">
|
||||
<image class="payContList-label-img" src="/static/img/wx.jpg"></image>
|
||||
<text>微信支付</text>
|
||||
</view>
|
||||
<radio class="radio" value="2"></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<button class="payBtn" bindtap="submitPay" disabled="{{disabledOk}}">立即支付</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
140
pages/cashier/cashier.wxss
Normal file
140
pages/cashier/cashier.wxss
Normal file
@@ -0,0 +1,140 @@
|
||||
/* 头部 */
|
||||
.barHeader {
|
||||
position: fixed;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.barHeader-tool-icon {
|
||||
width: 48rpx;
|
||||
vertical-align: middle;
|
||||
margin: 32rpx 0 0 20rpx;
|
||||
}
|
||||
|
||||
.barHeader-title {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
.cashierTips 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;
|
||||
}
|
||||
|
||||
.cashierCont-pay-title 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;
|
||||
}
|
||||
|
||||
.cashierCont-way-label.active {
|
||||
border-color: #bc1d30;
|
||||
color: #bc1d30;
|
||||
box-shadow: 0 10rpx 20rpx rgba(188, 29, 48 ,.3);
|
||||
}
|
||||
|
||||
.cashierCont-way-label radio {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cashierCont-way-label image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
display: block;
|
||||
margin: 0 auto 20rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
@@ -25,14 +25,18 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
|
||||
// 登录方式-活动
|
||||
this.setData({
|
||||
way : options.way
|
||||
})
|
||||
|
||||
const wechatUserId = wx.getStorageSync("wechatUser")
|
||||
this.setData({
|
||||
wechatUserId: wechatUserId
|
||||
})
|
||||
|
||||
if(options.type == "mobiles") {
|
||||
wx.$api.user.mobiles().then(res=>{
|
||||
wx.$api.user.mobiles(this.data.wechatUserId).then(res=>{
|
||||
this.setData({
|
||||
loginTel : res.data
|
||||
})
|
||||
@@ -40,7 +44,6 @@ Page({
|
||||
}else {
|
||||
// 获取用户手机列表
|
||||
const logintel = wx.getStorageSync("users")
|
||||
|
||||
this.setData({
|
||||
loginTel : logintel
|
||||
})
|
||||
@@ -111,9 +114,10 @@ Page({
|
||||
})
|
||||
} else {
|
||||
// 回到个人中心
|
||||
wx.switchTab({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
// wx.switchTab({
|
||||
// url: '/pages/user/user'
|
||||
// })
|
||||
wx.navigateBack({delta: 2})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -122,30 +126,33 @@ Page({
|
||||
* 点击账号登录
|
||||
*/
|
||||
loginGo(e) {
|
||||
let username = e.currentTarget.dataset.name,
|
||||
wechatUser_id = app.globalData.wechatUser
|
||||
let username = e.currentTarget.dataset.name
|
||||
|
||||
wx.$api.enroll.tel(wechatUser_id, username).then(res=>{
|
||||
wx.$api.enroll.tel(this.data.wechatUserId, username).then(res=>{
|
||||
app.globalData.token = res.data.token
|
||||
app.globalData.isUser = true
|
||||
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : res.data.token
|
||||
})
|
||||
|
||||
data : res.data.token,
|
||||
success : ()=> {
|
||||
if(this.data.way == "activity") {
|
||||
// 回到活动首页
|
||||
wx.reLaunch({
|
||||
url: '/pages/activityInfo/activityInfo'
|
||||
})
|
||||
}else if(this.data.way == "shareLogin") {
|
||||
// 回到上一页面
|
||||
wx.navigateBack({delta: 2})
|
||||
}else {
|
||||
// 回到个人中心
|
||||
wx.switchTab({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
})
|
||||
@@ -34,6 +34,10 @@ Page({
|
||||
|
||||
this.indexNav(options.id,options.areaname,options.latitude,options.userlng)
|
||||
|
||||
this.setData({
|
||||
isUser : getApp().globalData.isUser
|
||||
})
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
@@ -77,19 +81,29 @@ Page({
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
userNav(e){
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.getStorage({
|
||||
key : 'token',
|
||||
success:res=>{
|
||||
let newid = e.currentTarget.dataset.id,
|
||||
canFrom = e.currentTarget.dataset.from
|
||||
if(this.data.isUser){
|
||||
if(canFrom == 'washcar') {
|
||||
wx.$api.index.washcarUrl('', newid).then(res=>{
|
||||
const newUrl = res.data
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.redirectTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/washcar/washcar?url=${url}`
|
||||
});
|
||||
}).catch(err => {});
|
||||
} else {
|
||||
// 跳转权益详情页
|
||||
wx.navigateTo({
|
||||
url: '/pages/rights/rights?rightsId=' + id
|
||||
url: '/pages/rights/rights?rightsId=' + newid
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
}
|
||||
}else{
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -30,7 +30,7 @@
|
||||
<view class="special-list">
|
||||
<block wx:if="{{infoItems.length > 0}}">
|
||||
<view bindtap="userNav" class="special-label" wx:for="{{infoItems}}" wx:key="infoItems"
|
||||
data-id="{{item.right_config_id}}">
|
||||
data-id="{{item.right_config_id}}" data-from="{{item.from}}">
|
||||
<view class="special-rebate" wx:if="{{item.label != ''}}">{{item.label}}</view>
|
||||
<scroll-view scroll-x class="welfareCont-top" scroll-with-animation>
|
||||
<view class="welfareCont-list-img" wx:for="{{item.logos}}" wx:key="logos" wx:for-item="items">
|
||||
|
||||
202
pages/code/code.js
Normal file
202
pages/code/code.js
Normal file
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* 本时生活
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
qrcode : '', //二维码
|
||||
userInfo : '', //我的信息
|
||||
isImgLay : false, //是否显示图片弹出层
|
||||
shareState : false, //显示分享朋友圈弹出层
|
||||
sharesData : '' //分享携带参数
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// if(getApp().globalData.scene === 1155 && options.type === "shareLogin"){
|
||||
// wx.switchTab({
|
||||
// url: '/pages/index/index',
|
||||
// })
|
||||
// }
|
||||
|
||||
// 获取用户信息和二维码
|
||||
wx.$api.user.myshare('mini','','pages/index/index?type=shareLogin').then(res=>{
|
||||
this.setData({
|
||||
qrcode : res.data.qrcode,
|
||||
userInfo : res.data.user
|
||||
})
|
||||
}).catch(err=>{})
|
||||
|
||||
// 获取分享好友标题
|
||||
wx.$api.user.wechatShares().then(res=>{
|
||||
this.setData({
|
||||
sharesData: res.data
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 绘图
|
||||
*/
|
||||
dowImg(){
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
|
||||
let avatarImg = new Promise(success=>{
|
||||
wx.getImageInfo({
|
||||
src : '',
|
||||
success : res => {
|
||||
success(res.path)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 下载素材
|
||||
let codeImg = new Promise(success => {
|
||||
wx.getImageInfo({
|
||||
src : this.data.qrcode,
|
||||
success : res => {
|
||||
success(res.path)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Promise.all([codeImg]).then(res => {
|
||||
// 绘制海报
|
||||
const ctx = wx.createCanvasContext('qrcodeCard')
|
||||
ctx.save()
|
||||
|
||||
// 绘制背景
|
||||
ctx.setFillStyle('#e2e2e2')
|
||||
ctx.fillRect(0, 0, 375, 603)
|
||||
|
||||
// 绘制背景
|
||||
ctx.drawImage('/static/img/user-codeImg-down.png', 0, 0, 375, 650)
|
||||
|
||||
// 绘制二维码
|
||||
ctx.drawImage(res[0], 114, 470, 150, 150)
|
||||
|
||||
// 文字
|
||||
// ctx.setFontSize(16)
|
||||
// ctx.setFillStyle("#2f3245")
|
||||
// ctx.setTextAlign('center')
|
||||
// ctx.fillText(this.data.userInfo.nickname, 194, 350 , 270)
|
||||
|
||||
// 文字
|
||||
ctx.setFontSize(40)
|
||||
ctx.setFillStyle("#222222")
|
||||
ctx.setTextAlign('center')
|
||||
ctx.fillText("扫码享福利", 188, 400 , 270)
|
||||
|
||||
// 文字
|
||||
ctx.setFontSize(18)
|
||||
ctx.setFillStyle("#222222")
|
||||
ctx.setTextAlign('center')
|
||||
ctx.fillText("扫描二维码加入本时生活", 188, 440 , 270)
|
||||
|
||||
ctx.save();
|
||||
ctx.beginPath(); //开始绘制
|
||||
ctx.arc(70 / 2 + 156, 70 / 2 + 250, 70 / 2, 0, Math.PI * 2, false);
|
||||
ctx.clip();
|
||||
// ctx.drawImage(res[1], 156, 250, 70, 70);
|
||||
|
||||
// 保存图片
|
||||
ctx.draw(true, () => {
|
||||
wx.hideLoading()
|
||||
wx.canvasToTempFilePath({
|
||||
canvasId: 'qrcodeCard',
|
||||
x: 0,
|
||||
y: 0,
|
||||
success: res => {
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success : res=>{
|
||||
wx.showToast({
|
||||
title: '分享海报已保存至相册',
|
||||
icon : 'none'
|
||||
})
|
||||
},
|
||||
fail : err=>{
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '暂未授权小程序写入您的相册,无法存储二维码海报',
|
||||
confirmColor: '#d82526',
|
||||
confirmText : '去设置',
|
||||
success : info=>{
|
||||
if (info.confirm){
|
||||
wx.openSetting()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
complete: e => {}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}).catch(err=>{
|
||||
wx.showToast({
|
||||
title: '海报下载,请检查网络',
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 图片弹出层
|
||||
*/
|
||||
removeSaveImg(){
|
||||
this.setData({
|
||||
isImgLay: !this.data.isImgLay
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存图片到本地
|
||||
*/
|
||||
saveImg(){
|
||||
this.dowImg();
|
||||
this.setData({
|
||||
isImgLay: !this.data.isImgLay
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 分享朋友圈弹出层状态
|
||||
*/
|
||||
shareShow() {
|
||||
this.setData({
|
||||
shareState: !this.data.shareState
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 分享
|
||||
*/
|
||||
onShareAppMessage(){
|
||||
return {
|
||||
title : this.data.userInfo.nickname + this.data.sharesData.title,
|
||||
path : "/pages/index/index?parent_id=" + this.data.userInfo.user_id + "&type=shareLogin",
|
||||
imageUrl: this.data.sharesData.image
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享朋友圈
|
||||
*/
|
||||
// onShareTimeline () {
|
||||
// return {
|
||||
// title : this.data.userInfo.nickname + this.data.sharesData.title,
|
||||
// query : "type=shareLogin",
|
||||
// imageUrl: this.data.sharesData.image
|
||||
// }
|
||||
// }
|
||||
})
|
||||
6
pages/code/code.json
Normal file
6
pages/code/code.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "我的邀请码",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
70
pages/code/code.wxml
Normal file
70
pages/code/code.wxml
Normal file
@@ -0,0 +1,70 @@
|
||||
<view class="codeTitle">
|
||||
<image src="/static/img/code_title.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="codeCont">
|
||||
<view class="codeCont-tisp">
|
||||
<text>每邀请一位好友注册成功后</text>
|
||||
<text>您将获得30元消费红包奖励</text>
|
||||
</view>
|
||||
<view class="codeCont-text">
|
||||
<image class="codeCont-avatar" src="{{userInfo.avatar}}" mode="aspectFill"></image>
|
||||
<view class="codeCont-name">
|
||||
{{userInfo.nickname}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="codeCont-code">
|
||||
<view class="codeCont-title">
|
||||
<view class="codeCont-title-text">邀好友享福利</view>
|
||||
<view class="codeCont-title-tips">邀请好友加入本时生活</view>
|
||||
</view>
|
||||
<image class="codeCont-img" src="{{qrcode}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="codeShare">
|
||||
<button class="codeShare-label codeShare-button" open-type="share" hover-class="none">
|
||||
<image src="/static/img/code_icon_00.png"></image>
|
||||
微信好友
|
||||
</button>
|
||||
<!-- <view class="codeShare-label" bindtap="shareShow">
|
||||
<image src="/static/img/code_icon_01.png"></image>
|
||||
朋友圈
|
||||
</view> -->
|
||||
<view class="codeShare-label" bindtap="removeSaveImg" hover-class="none">
|
||||
<image src="/static/img/code_icon_02.png"></image>
|
||||
生成海报
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 海报canvas -->
|
||||
<canvas class="canvasImg" canvas-id="qrcodeCard"></canvas>
|
||||
|
||||
<!-- 图片弹出层 -->
|
||||
<view class="user-lay sign-img-lay" wx:if="{{isImgLay}}">
|
||||
<view class="user-back">
|
||||
<image class="user-back-img" src="/static/img/code_share.png" mode="widthFix"></image>
|
||||
<view class="user-back-cont">
|
||||
<view class="codeBack-yard-name">
|
||||
<view class="codeBack-yard-title">扫码享福利</view>
|
||||
<view>识别二维码加入本时生活</view>
|
||||
</view>
|
||||
<image src="{{qrcode}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<button class="sign-img-btn" size="mini" bindtap="saveImg">保存到相册</button>
|
||||
<button class="sign-img-btn remove-btn" size="mini" bindtap="removeSaveImg">取消</button>
|
||||
</view>
|
||||
|
||||
<!-- 朋友圈提示弹出 -->
|
||||
<view class="sharePop" wx:if="{{shareState}}" bindtap="shareShow">
|
||||
<image class="sharePop-row" src="/static/img/code_share_01.png" mode="widthFix"></image>
|
||||
<view class="shareList">
|
||||
<view class="shareLabel">
|
||||
<text>1</text>
|
||||
点击右上角<image src="/static/img/code_share_00.png" mode="aspectFill"></image>打开菜单
|
||||
</view>
|
||||
<view class="shareLabel">
|
||||
<text>2</text>
|
||||
选择菜单<image src="/static/img/code_share_02.png" mode="aspectFill"></image>分享朋友圈
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
247
pages/code/code.wxss
Normal file
247
pages/code/code.wxss
Normal file
@@ -0,0 +1,247 @@
|
||||
page {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
.codeTitle {
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
border-radius: 0 0 200rpx 200rpx;
|
||||
padding: 40rpx 20rpx 160rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.codeTitle {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.codeCont {
|
||||
background-color: #ffffff;
|
||||
margin: -120rpx auto 0;
|
||||
width: 84%;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 0 20rpx rgba(0, 0, 0, .2);
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.codeCont-tisp {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: #797979;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.codeCont-tisp text {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.codeCont-text {
|
||||
text-align: center;
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
|
||||
.codeCont-avatar {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.codeCont-code {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.codeCont-img {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.codeCont-title {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.codeCont-title-text {
|
||||
font-size: 46rpx;
|
||||
font-weight: 700;
|
||||
margin-bottom: 10rpx;
|
||||
letter-spacing: 4rpx;
|
||||
}
|
||||
|
||||
.codeCont-title-tips {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.codeShare {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.codeShare {
|
||||
display: flex;
|
||||
padding: 0 50rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.codeShare-label {
|
||||
flex: 3;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.codeShare-label image {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: block;
|
||||
margin: 0 auto 20rpx;
|
||||
}
|
||||
|
||||
.codeShare-button {
|
||||
width: auto !important;
|
||||
border: none;
|
||||
background: transparent;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/* 弹窗背景图 */
|
||||
.user-lay {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* canvas */
|
||||
.canvasImg {
|
||||
position: absolute;
|
||||
left: -1000%;
|
||||
height: 650px;
|
||||
width: 375px;
|
||||
background: #fbf6f0;
|
||||
}
|
||||
|
||||
|
||||
/* 图片弹出层 */
|
||||
.sign-img-lay {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sign-img-src {
|
||||
width: 70vw;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.sign-img-btn[size="mini"] {
|
||||
margin-top: 40rpx;
|
||||
background: #f5d48f;
|
||||
font-weight: normal;
|
||||
color: #2f3245;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.remove-btn[size="mini"] {
|
||||
margin-top: 20rpx;
|
||||
background: #101010;
|
||||
color: #e5c175;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* 背景 */
|
||||
.user-back-img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.user-back {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.user-back-cont {
|
||||
text-align: center;
|
||||
background-color: #e2e2e2;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.user-back-cont image {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.codeBack-yard-name {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.codeBack-yard-title {
|
||||
font-size: 50rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 4rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 朋友圈弹出层 */
|
||||
.sharePop {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sharePop-row {
|
||||
width: 140rpx;
|
||||
position: fixed;
|
||||
right: 110rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.shareList {
|
||||
color: #ffffff;
|
||||
line-height: 60rpx;
|
||||
font-weight: 700;
|
||||
font-size: 36rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 30%;
|
||||
}
|
||||
|
||||
.shareLabel {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.shareLabel image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin: 0 20rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.shareLabel text {
|
||||
display: inline-block;
|
||||
background: #0696ca;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
border-radius: 50%;
|
||||
margin: 8rpx 10rpx 0 0;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ Page({
|
||||
count : res.data.count,
|
||||
coupons : res.data.list
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -92,5 +92,36 @@ Page({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 优惠券跳转
|
||||
couponUrl(e) {
|
||||
let newFrom = e.currentTarget.dataset.from,
|
||||
newId = e.currentTarget.dataset.id,
|
||||
newStatus = e.currentTarget.dataset.status
|
||||
if(newStatus == 0) {
|
||||
if(newFrom == 'washcar') {
|
||||
wx.$api.index.washcarCoupon(newId).then(res=>{
|
||||
const newUrl = res.data
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.redirectTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/washcar/washcar?url=${url}`
|
||||
});
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/couponDetails/couponDetails?id=' + newId
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -16,7 +16,8 @@
|
||||
<!-- 卡券列表 -->
|
||||
<view class="coupon" wx:if="{{coupons != ''}}">
|
||||
<view class="couponCont {{item.status != 0 ? 'active' : ''}}" wx:for="{{coupons}}" wx:key="coupons">
|
||||
<navigator hover-class="none" class="couponList" url="{{item.status == 0 ? '/pages/couponDetails/couponDetails?id=' + item.coupon_id : ''}}">
|
||||
<!-- url="{{item.status == 0 ? '/pages/couponDetails/couponDetails?id=' + item.coupon_id : ''}}" -->
|
||||
<view hover-class="none" class="couponList" bindtap="couponUrl" data-id="{{item.coupon_id }}" data-from="{{item.from }}" data-status="{{item.status}}">
|
||||
<view class="couponList-left">
|
||||
<image class="couponList-img" src="/static/img/coupon_img.png"></image>
|
||||
|
||||
@@ -54,7 +55,7 @@
|
||||
|
||||
<image wx:if="{{item.status == 1}}" src="/static/img/coupon_tips_00.png" class="coupoTips"></image>
|
||||
<image wx:if="{{item.status == 2}}" src="/static/img/coupon_tips_01.png" class="coupoTips"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="couponMore" wx-if="{{item.count > 1}}" >
|
||||
<view class="couponMore-text" bindtap="couponTap" data-id="{{item.activityId}}" data-status="{{item.status}}">
|
||||
<view class="couponMore-title">查看全部{{item.count}}张卡券</view>
|
||||
|
||||
@@ -41,7 +41,7 @@ Page({
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -64,6 +64,37 @@ Page({
|
||||
pageNumber++
|
||||
this.couponInfo(pageNumber)
|
||||
}
|
||||
},
|
||||
|
||||
// 优惠券跳转
|
||||
couponUrl(e) {
|
||||
let newFrom = e.currentTarget.dataset.from,
|
||||
newId = e.currentTarget.dataset.id,
|
||||
newStatus = e.currentTarget.dataset.status
|
||||
if(newStatus == 0) {
|
||||
if(newFrom == 'washcar') {
|
||||
wx.$api.index.washcarCoupon(newId).then(res=>{
|
||||
const newUrl = res.data
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.redirectTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/washcar/washcar?url=${url}`
|
||||
});
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/couponDetails/couponDetails?id=' + newId
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
<!-- 卡券列表 -->
|
||||
<view class="coupon" wx:if="couponArr != ''">
|
||||
<navigator class="couponCont {{item.status != 0 ? 'active' : ''}}" wx:for="{{couponArr}}" wx:key="couponArr" hover-class="none" url="{{item.status == 0 ? '/pages/couponDetails/couponDetails?id=' + item.id : ''}}">
|
||||
<!-- url="{{item.status == 0 ? '/pages/couponDetails/couponDetails?id=' + item.id : ''}}" -->
|
||||
<view class="couponCont {{item.status != 0 ? 'active' : ''}}" wx:for="{{couponArr}}" wx:key="couponArr" bindtap="couponUrl" data-id="{{item.id}}" data-from="{{item.from }}" data-status="{{item.status}}">
|
||||
<view class="couponList">
|
||||
<view class="couponList-left">
|
||||
<image class="couponList-img" src="/static/img/coupon_img.png"></image>
|
||||
@@ -47,7 +48,7 @@
|
||||
<image class="couponMore-arrow" src="/static/icon/arrow_left.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
|
||||
@@ -170,7 +170,7 @@ Page({
|
||||
},fail : res=> {
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -182,7 +182,7 @@ Page({
|
||||
this.setData({
|
||||
merchantcardinfo : res.data
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
116
pages/favour/favour.js
Normal file
116
pages/favour/favour.js
Normal file
@@ -0,0 +1,116 @@
|
||||
// 本市生活
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
account : '', //账户积分
|
||||
typeArr : [], //转账类型
|
||||
typeIndex: 0, //转账下标
|
||||
userInfo : '', //转账用户信息
|
||||
mobile : '', //转账手机号
|
||||
disabled : false, //支付按钮状态
|
||||
popShow : false //校验弹出层
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 获取账户下拉列表
|
||||
this.accountList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 账户下拉列表
|
||||
*/
|
||||
accountList() {
|
||||
wx.$api.user.transfers().then(res=>{
|
||||
this.setData({
|
||||
account: res.data.account,
|
||||
typeArr: res.data.accounts
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 账户下拉选择
|
||||
*/
|
||||
typeBind(e) {
|
||||
this.setData({
|
||||
typeIndex: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 转入的手机号
|
||||
*/
|
||||
bindKeyInput(val){
|
||||
this.setData({
|
||||
mobile : val.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 校验手机号码
|
||||
*/
|
||||
checkTel() {
|
||||
wx.$api.user.ajaxTel(this.data.mobile).then(res=>{
|
||||
this.setData({
|
||||
userInfo: res.data,
|
||||
popShow : !this.data.popShow
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭校验弹出
|
||||
*/
|
||||
popHide() {
|
||||
this.setData({
|
||||
popShow : !this.data.popShow
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
*/
|
||||
formSubmit(e) {
|
||||
// 检查用户登录状态
|
||||
const Paypass = wx.getStorageSync("hasPaypass")
|
||||
if(Paypass == false) {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '抱歉,您还没有设置支付密码',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/password/password?source=favourUrl'
|
||||
})
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
let newAmount = e.detail.value.amount,
|
||||
newMobile = this.data.mobile,
|
||||
newPaypass = e.detail.value.paypass,
|
||||
newType = this.data.typeArr[this.data.typeIndex].key
|
||||
|
||||
wx.$api.user.transfersForm(newMobile, newType, newAmount, newPaypass).then(res=>{
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '转入成功',
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: "/pages/account/account?type=" + newType
|
||||
})
|
||||
},2000)
|
||||
}) .catch(err=>{})
|
||||
}
|
||||
})
|
||||
6
pages/favour/favour.json
Normal file
6
pages/favour/favour.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "积分赠与",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
64
pages/favour/favour.wxml
Normal file
64
pages/favour/favour.wxml
Normal file
@@ -0,0 +1,64 @@
|
||||
<view class="favourTitle">
|
||||
<image class="favourTitle-img" src="/static/img/favour_title.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<view class="favourBack">
|
||||
<image class="favourBack-img" src="/static/img/favour_back.png" mode="widthFix"></image>
|
||||
<view class="favourBack-cont-title">我的{{typeArr[typeIndex].value}}</view>
|
||||
<view class="favourBack-cont">
|
||||
<view class="favourBack-cont-name">{{typeArr[typeIndex].value}}</view>
|
||||
<view class="favourBack-cont-number">
|
||||
<text>{{typeArr[typeIndex].key == 'silver' ? account.silver : account.drill}}</text>元
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="favourCont">
|
||||
<view class="favourBlack">
|
||||
<view class="favourCont-title">赠好友消费红包</view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">账户类型</view>
|
||||
<picker class="favourCont-picker" range="{{typeArr}}" range-key="value" bindchange="typeBind">
|
||||
<view class="tabs-text">
|
||||
{{typeArr[typeIndex].value}}
|
||||
</view>
|
||||
<image src="/static/icon/rightsArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">好友手机号</view>
|
||||
<view class="favourCont-check">
|
||||
<input type="number" bindinput="bindKeyInput" placeholder="输入好友手机号" />
|
||||
<view class="favourCont-check-btn" bindtap="checkTel">校验号码</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">转账金额</view>
|
||||
<input type="digit" name="amount" placeholder="请输入转账金额" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">支付密码</view>
|
||||
<input type="number" name="paypass" placeholder="请输入支付密码" password />
|
||||
</view>
|
||||
<button class="favourCont-btn" formType="submit" disabled="{{disabled}}">立即转入</button>
|
||||
</form>
|
||||
</view>
|
||||
<navigator class="favourCont-record" hover-class="none"
|
||||
url="/pages/account/account?type={{typeArr[typeIndex].key}}"><text>赠予记录</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 校验手机号弹出 -->
|
||||
<view class="popTel-back" wx:if="{{popShow}}"></view>
|
||||
<view class="popTel" wx:if="{{popShow}}">
|
||||
<view class="popTel-title">当前转入的账户信息</view>
|
||||
<view class="popTel-cont">
|
||||
<image class="popTel-head" src="{{userInfo.avatar}}"></image>
|
||||
<view class="popTel-name">{{userInfo.nickname}}</view>
|
||||
</view>
|
||||
<view class="popTel-btn" bindtap="popHide">知道了</view>
|
||||
</view>
|
||||
194
pages/favour/favour.wxss
Normal file
194
pages/favour/favour.wxss
Normal file
@@ -0,0 +1,194 @@
|
||||
page {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.favourTitle {
|
||||
text-align: center;
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
|
||||
.favourBack{
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.favourBack-img {
|
||||
width: 100vw;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.favourBack-cont {
|
||||
position: absolute;
|
||||
top: 100rpx;
|
||||
left: 0;
|
||||
padding-left: 14%;
|
||||
z-index: 1;
|
||||
color: #606060;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.favourBack-cont-number {
|
||||
color: #000000;
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.favourBack-cont-number text {
|
||||
font-size: 50rpx;
|
||||
font-weight: 600;
|
||||
padding-right: 10rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.favourBack-cont-title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.favourCont {
|
||||
background-color: #ffffff;
|
||||
padding: 40rpx 50rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-radius: 5rpx 5rpx 0 0;
|
||||
}
|
||||
|
||||
.favourBlack {
|
||||
background-color: #e9e9e9;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 45rpx;
|
||||
}
|
||||
|
||||
.favourCont-record {
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.favourCont-title {
|
||||
font-size: 45rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.favourCont-label {
|
||||
display: flex;
|
||||
margin-top: 40rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.favourCont-check,
|
||||
.favourCont-picker,
|
||||
.favourCont-label>input {
|
||||
background-color: #c9c9c9;
|
||||
display: flex;
|
||||
width: calc(100% - 160rpx);
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.favourCont-picker {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.favourCont-picker image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.favourCont-label input {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.favourCont-name {
|
||||
width: 160rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.favourCont-check-btn {
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
background-color: #a1a1a1;
|
||||
line-height: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.favourCont-btn {
|
||||
width: 100% !important;
|
||||
background-color: #dbc190;
|
||||
margin-top: 40rpx;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
|
||||
.tabs-text {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 校验弹出层 */
|
||||
.popTel-back {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: rgba(0, 0, 0, .7);
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.popTel {
|
||||
position: fixed;
|
||||
left: 140rpx;
|
||||
right: 140rpx;
|
||||
top: 30%;
|
||||
z-index: 11;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popTel-title {
|
||||
font-size: 32rpx;
|
||||
background-color: #ff8e65;
|
||||
color: #fff;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.popTel-cont {
|
||||
padding: 60rpx 0;
|
||||
}
|
||||
|
||||
.popTel-head {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto 20rpx;
|
||||
border: #ff8e65 solid 2rpx;
|
||||
}
|
||||
|
||||
.popTel-btn {
|
||||
border-top: 2rpx solid #dedede;
|
||||
line-height: 90rpx;
|
||||
color: #ff8e65;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ Page({
|
||||
this.setData({
|
||||
frozenData: res.data
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
// 轮播滑动
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<image src="/static/icon/frozen_arrow.png"></image>
|
||||
返回上一个权益
|
||||
</view>
|
||||
<view class="frozenArrow-right" wx:if="{{frozenData.length > 1}}">
|
||||
<view class="frozenArrow-right" wx:if="{{current == 0 || frozenData[frozenData.length - 1] > 0}}">
|
||||
<image src="/static/icon/frozen_arrow.png"></image>
|
||||
查看下一个权益
|
||||
</view>
|
||||
|
||||
@@ -35,6 +35,19 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(options.type){
|
||||
getApp().globalData.shareObj = {
|
||||
type : options.type,
|
||||
goodsId : '',
|
||||
userId : options.parent_id
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
@@ -145,7 +158,7 @@ Page({
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
* 处理权益未登录时的转跳
|
||||
*/
|
||||
userNav(e){
|
||||
let user_lng = this.data.longitude, //经度
|
||||
@@ -167,6 +180,23 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
userUrl(e){
|
||||
let pageUrl = e.currentTarget.dataset.url
|
||||
if(this.data.isUser){
|
||||
wx.navigateTo({
|
||||
url: pageUrl
|
||||
})
|
||||
}else{
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击轮播图片
|
||||
*/
|
||||
@@ -211,14 +241,14 @@ Page({
|
||||
canId = e.currentTarget.dataset.id,
|
||||
canFrom = e.currentTarget.dataset.from,
|
||||
canRightid = e.currentTarget.dataset.rightid
|
||||
if(!canBuy) {
|
||||
wx.showToast({
|
||||
title : canText,
|
||||
icon : 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
// if(!canBuy) {
|
||||
// wx.showToast({
|
||||
// title : canText,
|
||||
// icon : 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
wx.getStorage({
|
||||
key : 'token',
|
||||
@@ -332,10 +362,12 @@ Page({
|
||||
return
|
||||
}
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['6SJqWbasj42O_d7yET1s5G1eg62Z4SS3pByBeuXekSo'],
|
||||
// 6SJqWbasj42O_d7yET1s5G1eg62Z4SS3pByBeuXekSo 正式
|
||||
// g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY 测试
|
||||
tmplIds: ['g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY'],
|
||||
success: res=> {
|
||||
if(res.errMsg == "requestSubscribeMessage:ok") {
|
||||
wx.$api.index.subscribe(1).then(res=>{
|
||||
if(res["g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY"] == "accept") {
|
||||
wx.$api.index.subscribe(1, 'mini').then(res=>{
|
||||
wx.showLoading({
|
||||
title: res.data,
|
||||
icon : 'none',
|
||||
@@ -348,13 +380,10 @@ Page({
|
||||
wx.hideLoading();
|
||||
}, 1000)
|
||||
|
||||
}).catch(err=>{
|
||||
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
bindchange="swiperChange">
|
||||
<swiper-item wx:for="{{adverts}}" wx:key="adverts" bindtap="navigato" data-url="{{item.url}}">
|
||||
<image class="banner-img" src="{{item.cover}}" show-menu-by-longpress="true" mode="aspectFill"
|
||||
bindtap="clickImg" data-img="{{item.qrcode}}" data-url="{{item.url}}" data-channel="{{item.channel}}">
|
||||
bindtap="clickImg" data-img="{{item.qrcode}}" data-url="{{item.url}}"
|
||||
data-channel="{{item.channel}}">
|
||||
</image>
|
||||
<i class="light"></i>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="subscribe" bindtap="subscribeTap" wx:if="{{!subState}}">
|
||||
<view class="subscribe" bindtap="subscribeTap" wx:if="{{subState}}">
|
||||
<view class="subscribe-icon">
|
||||
<image class="subscribe-icon-one" src="/static/img/finger_00.png"></image>
|
||||
<image class="subscribe-icon-two" src="/static/img/finger_01.png"></image>
|
||||
@@ -148,3 +148,16 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 漂浮窗 -->
|
||||
<movable-area class="indexFloat">
|
||||
<movable-view y="340" direction="vertical" class="indexFloat-movable">
|
||||
<view bindtap="userUrl" data-url="/pages/favour/favour" class="indexFloat-img">
|
||||
<image src="https://lifetest.ysd-bs.com/storage/materials/2021/08/06/index_float_00.png"
|
||||
mode="aspectFill" class="indexFloat-animation"></image>
|
||||
</view>
|
||||
<view bindtap="userUrl" data-url="/pages/code/code" class="indexFloat-img">
|
||||
<image src="/static/img/index_float_01.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
@@ -686,3 +686,47 @@ page {
|
||||
25% {opacity: 0;transform: translateX(-3px);}
|
||||
75% {opacity: 1;transform: translateX(3px);}
|
||||
}
|
||||
|
||||
|
||||
/* 漂浮弹出层 */
|
||||
.indexFloat {
|
||||
position: fixed;
|
||||
height: 70%;
|
||||
width: 110rpx;
|
||||
right: 20rpx;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.indexFloat-movable {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.indexFloat-img image {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.indexFloat-animation {
|
||||
animation: shake 3s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
70%, 80% {
|
||||
transform: rotate(7deg);
|
||||
}
|
||||
75% {
|
||||
transform: rotate(-7deg);
|
||||
}
|
||||
|
||||
65%,
|
||||
85% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ Page({
|
||||
},
|
||||
fail : res => {
|
||||
//拒绝授权
|
||||
this.showErrorModal('您拒绝了请求');
|
||||
// this.showErrorModal('您拒绝了请求');
|
||||
return;
|
||||
}
|
||||
})
|
||||
@@ -90,11 +90,21 @@ Page({
|
||||
userLogin(){
|
||||
let code = this.data.loginCode,
|
||||
iv = this.data.iv,
|
||||
encryptedData = this.data.encryptedData
|
||||
encryptedData = this.data.encryptedData,
|
||||
shareObj = getApp().globalData.shareObj
|
||||
|
||||
wx.$api.enroll.record(code, iv, encryptedData).then(res=>{
|
||||
wx.$api.enroll.record(code, iv, encryptedData, shareObj.userId).then(res=>{
|
||||
getApp().globalData.token = res.data.token
|
||||
|
||||
// 清空分享信息
|
||||
if(shareObj.type == 'shareLogin'){
|
||||
getApp().globalData.shareObj = {
|
||||
type : '',
|
||||
goodsId : '',
|
||||
userId : ''
|
||||
}
|
||||
}
|
||||
|
||||
// 更新全局存储器用户状态
|
||||
getApp().globalData.isUser = true
|
||||
|
||||
@@ -107,7 +117,12 @@ Page({
|
||||
|
||||
// 存入缓存
|
||||
app.globalData.userInfo = res.data.users
|
||||
app.globalData.wechatUser = res.data.wechatUser_id
|
||||
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'wechatUser',
|
||||
data : res.data.wechatUser_id
|
||||
})
|
||||
|
||||
this.setData({
|
||||
isLogin: false
|
||||
@@ -122,7 +137,7 @@ Page({
|
||||
key : 'users',
|
||||
data : res.data.users
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
|
||||
})
|
||||
@@ -47,17 +47,10 @@ Page({
|
||||
})
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
wx.showModal({
|
||||
title : '用户登录已过期',
|
||||
content : '请重新登录',
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if (res.confirm) {
|
||||
wx.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -105,7 +98,11 @@ Page({
|
||||
}, 2000)
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
75
pages/myBalance/myBalance.js
Normal file
75
pages/myBalance/myBalance.js
Normal file
@@ -0,0 +1,75 @@
|
||||
// pages/myBalance/myBalance.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
type : "balance ", //卡类型
|
||||
number : '', //账户余额
|
||||
accounts : '', //账户列表
|
||||
page : {}, //分页信息
|
||||
lodingStats : false, //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 获取余额数量
|
||||
wx.$api.user.logs().then(res=>{
|
||||
this.setData({
|
||||
number : res.data.account.balance
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
// 获取收益订单记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 收益订单记录
|
||||
*/
|
||||
accountInfo(page) {
|
||||
wx.$api.user.profits(page).then(res=>{
|
||||
console.log(res.data.data)
|
||||
let listArr = this.data.accounts,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.data)
|
||||
|
||||
this.setData({
|
||||
accounts : newData,
|
||||
page : res.data.page
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
// 获取账变记录
|
||||
this.accountInfo(pageNumber);
|
||||
}
|
||||
}
|
||||
})
|
||||
6
pages/myBalance/myBalance.json
Normal file
6
pages/myBalance/myBalance.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTitleText": "收益账户",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
60
pages/myBalance/myBalance.wxml
Normal file
60
pages/myBalance/myBalance.wxml
Normal file
@@ -0,0 +1,60 @@
|
||||
<view class="balance">
|
||||
<image class="balanceBack" src="/static/img/balance-back.png" mode="widthFix"></image>
|
||||
<view class="balanceCont">
|
||||
<view class="balanceCont-name">余额(积分)</view>
|
||||
<view class="balanceCont-number">
|
||||
<text>¥</text>{{number}}
|
||||
</view>
|
||||
</view>
|
||||
<navigator hover-class="none" url="/pages/myProfit/myProfit" class="balanceUrl">我的收益<image src="/static/img/balance-icon-row.png" mode="aspectFill"></image></navigator>
|
||||
</view>
|
||||
|
||||
<navigator hover-class="none" url="/pages/withdrawal_form/withdrawal_form" class="label">
|
||||
<view class="labelLeft">
|
||||
<image class="labelLeft-img" src="/static/img/balance-icon-00.png"></image>
|
||||
<view class="labelLeft-name">提现</view>
|
||||
</view>
|
||||
<image class="labelLeft-arrow" src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
|
||||
<navigator hover-class="none" url="/pages/withdrawal_record/withdrawal_record?status=''&idx=0" class="label">
|
||||
<view class="labelLeft">
|
||||
<image class="labelLeft-img" src="/static/img/balance-icon-01.png"></image>
|
||||
<view class="labelLeft-name">提现记录</view>
|
||||
</view>
|
||||
<image class="labelLeft-arrow" src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
|
||||
<!-- 收益订单列表 -->
|
||||
<view class="record">
|
||||
<view class="integra-cont-title">
|
||||
<view class="record-title">收益订单列表</view>
|
||||
</view>
|
||||
<block wx:if="{{accounts.length > 0}}">
|
||||
<navigator hover-class="none" url="/pages/myBalance/myBalance_list/myBalance_list?id={{item.order_id}}&type={{item.order_type}}" class="record-list" wx:for="{{accounts}}" wx:key="accounts">
|
||||
<view class="accounts-title">{{item.right}}</view>
|
||||
<view class="accounts-user">
|
||||
<image class="accounts-user-icon" src="/static/img/accountsIcon_00.png"></image>
|
||||
<view class="accounts-user-name"><text>{{item.user.nickname}}</text>{{item.user.username}}</view>
|
||||
</view>
|
||||
<view class="accounts-user">
|
||||
<image class="accounts-user-icon" src="/static/img/accountsIcon_01.png"></image>
|
||||
<view class="accounts-user-name">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="accounts-more"><image src="/static/icon/arrow_tips.png"></image></view>
|
||||
</navigator>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/null_icon.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
</view>
|
||||
173
pages/myBalance/myBalance.wxss
Normal file
173
pages/myBalance/myBalance.wxss
Normal file
@@ -0,0 +1,173 @@
|
||||
|
||||
/* 背景 */
|
||||
.balance {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.balanceBack {
|
||||
width: 100vw;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.balanceCont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
padding: 70rpx 0 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.balanceCont-name {
|
||||
color: #717171;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.balanceCont-number {
|
||||
color: #ffd890;
|
||||
font-size: 80rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.balanceCont-number text {
|
||||
font-size: 50rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.balanceUrl {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 30rpx;
|
||||
background-color: #37332d;
|
||||
font-size: 28rpx;
|
||||
border-radius: 40rpx 0 0 40rpx;
|
||||
line-height: 68rpx;
|
||||
border: 2rpx solid #887351;
|
||||
padding-left: 30rpx;
|
||||
color: #ead2a5;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.balanceUrl image {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
margin-top: 9rpx;
|
||||
}
|
||||
|
||||
/* 提现 */
|
||||
.label {
|
||||
background-color: white;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.labelLeft {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.labelLeft-img {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
margin: 23rpx 20rpx;
|
||||
}
|
||||
|
||||
.labelLeft-arrow {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 28rpx 0;
|
||||
}
|
||||
|
||||
/* 账变记录 */
|
||||
.record-title {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
color: #404040;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
line-height: 60prx;
|
||||
margin: 40rpx 0 30rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-list {
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 50rpx;
|
||||
padding: 0 30rpx 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-top: 2rpx solid #e9e9e9;
|
||||
border-bottom: 2rpx solid #e9e9e9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.accounts-more {
|
||||
position: absolute;
|
||||
bottom: -20rpx;
|
||||
left: calc(50% - 40rpx);
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
z-index: 9;
|
||||
background-color: #ffffff;
|
||||
border: #e9e9e9 2rpx solid;
|
||||
}
|
||||
|
||||
.accounts-more image {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin: 8rpx 26rpx;
|
||||
}
|
||||
|
||||
.accounts-title {
|
||||
position: relative;
|
||||
padding: 30rpx 0 30rpx 35rpx;
|
||||
}
|
||||
|
||||
.accounts-title::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 6rpx;
|
||||
top: 37%;
|
||||
width: 8rpx;
|
||||
height: 30%;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.accounts-user {
|
||||
color: #838383;
|
||||
display: flex;
|
||||
border-top: 2rpx solid #f5f5f5;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.accounts-user text {
|
||||
display: block;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.accounts-user-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
51
pages/myBalance/myBalance_list/myBalance_list.js
Normal file
51
pages/myBalance/myBalance_list/myBalance_list.js
Normal file
@@ -0,0 +1,51 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
accounts : '' //账户列表
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 获取账变记录
|
||||
this.accountInfo(options.type, options.id);
|
||||
},
|
||||
|
||||
/**
|
||||
* 账变记录
|
||||
*/
|
||||
accountInfo(type, id, page) {
|
||||
wx.$api.user.profitsNext(type, id, page).then(res=>{
|
||||
this.setData({
|
||||
accounts : res.data
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
// 获取账变记录
|
||||
this.accountInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
// 获取账变记录
|
||||
this.accountInfo('', '', pageNumber);
|
||||
}
|
||||
}
|
||||
})
|
||||
3
pages/myBalance/myBalance_list/myBalance_list.json
Normal file
3
pages/myBalance/myBalance_list/myBalance_list.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
29
pages/myBalance/myBalance_list/myBalance_list.wxml
Normal file
29
pages/myBalance/myBalance_list/myBalance_list.wxml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!-- 收益订单列表 -->
|
||||
<view class="record" wx:if="{{accounts.length > 0}}">
|
||||
<view class="record-list" wx:for="{{accounts}}" wx:key="accounts">
|
||||
<view class="record-list-cont">
|
||||
<image class="record-list-img" src="/static/img/balance-icon-02.png"></image>
|
||||
<view class="record-list-top">
|
||||
<view class="record-list-left">
|
||||
<view class="record-list-name">
|
||||
{{item.rule.title}}
|
||||
</view>
|
||||
<view class="record-list-time">
|
||||
{{item.created_at}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-list-right">
|
||||
+{{item.bonus}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-list-remark">
|
||||
{{item.remark}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/null_icon.png"></image>
|
||||
<view>抱歉,目前暂无内容~</view>
|
||||
</view>
|
||||
84
pages/myBalance/myBalance_list/myBalance_list.wxss
Normal file
84
pages/myBalance/myBalance_list/myBalance_list.wxss
Normal file
@@ -0,0 +1,84 @@
|
||||
/* 账变记录 */
|
||||
.record {}
|
||||
|
||||
/* 记录列表 */
|
||||
|
||||
.record-list {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.record-list-img {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.record-list-cont {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.record-list-top {
|
||||
display: flex;
|
||||
padding-left: 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-list-left {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.record-list-time {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.record-list-right {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.record-list-remark {
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
margin: 30rpx 0 0;
|
||||
background-color: #f5f5f5;
|
||||
padding: 10rpx 15rpx;
|
||||
display: inline-block;
|
||||
border-radius: 4rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-list-remark::after {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: -14rpx;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 14rpx solid transparent;
|
||||
border-right: 14rpx solid transparent;
|
||||
border-bottom: 14rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
195
pages/myProfit/myProfit.js
Normal file
195
pages/myProfit/myProfit.js
Normal file
@@ -0,0 +1,195 @@
|
||||
// pages/myProfit/myProfit.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
profitCount : '', //收益数据-人数
|
||||
profitFinance : '', //收益数据-收益信息
|
||||
profitUser : '', //收益数据-用户信息
|
||||
incometCount : '', //收益统计-团队
|
||||
incometFfinance : '', //收益统计-收益
|
||||
incometOrder : '', //收益统计-订单
|
||||
incometMonths : '', //收益数据-月份列表
|
||||
monthsIndex : 1, //账变记录筛选index
|
||||
monthsValue : '', //账变记录筛选value
|
||||
changeStyle : 'report', //tab默认选择类型
|
||||
//收益订单筛选列表
|
||||
ordersWay : [
|
||||
{value: '0', name: "充值", type: 'recharge'},
|
||||
{value: '1', name: "产品", type: 'product'}
|
||||
],
|
||||
ordersIndex : 0, //收益订单筛选列表index
|
||||
ordersValue : 'recharge', //收益订单筛选列表value
|
||||
publicData : [], //订单与团队 公共数据列表
|
||||
//我的团队筛选列表
|
||||
teamWay : [
|
||||
{value: 0, name: "全部"},
|
||||
{value: 1, name: "用户"},
|
||||
{value: 2, name: "达人"}
|
||||
],
|
||||
teamIndex : 0, //我的团队筛选列表index
|
||||
teamValue : 0, //我的团队筛选列表value
|
||||
teamSort : 'asc', //我的团队排序
|
||||
page : {}, //下一页
|
||||
lodingStats : false, //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) { // })
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
// 获取我的收益数据
|
||||
this.profitInfo();
|
||||
|
||||
// 获取本月收益统计
|
||||
this.incomeInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* tab栏选择
|
||||
*/
|
||||
changeTabbar(e) {
|
||||
this.setData({
|
||||
changeStyle: e.currentTarget.dataset.style
|
||||
})
|
||||
|
||||
if(e.currentTarget.dataset.style == 'report'){
|
||||
// 获取收益统计
|
||||
this.incomeInfo();
|
||||
return
|
||||
}
|
||||
|
||||
// 获取收益订单列表 + 我的团队列表
|
||||
this.publicInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 我的收益数据
|
||||
*/
|
||||
profitInfo() {
|
||||
wx.$api.user.myProfit().then(res=>{
|
||||
this.setData({
|
||||
profitCount : res.data.count,
|
||||
profitFinance: res.data.finance,
|
||||
profitUser : res.data.user
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 收益统计
|
||||
*/
|
||||
incomeInfo() {
|
||||
wx.$api.user.myIncome(this.data.monthsValue).then(res=>{
|
||||
this.setData({
|
||||
incometCount : res.data.count,
|
||||
incometFfinance: res.data.finance,
|
||||
incometOrder : res.data.order,
|
||||
incometMonths : res.data.months,
|
||||
monthsIndex : parseInt(res.data.this_month) - 1
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 收益订单列表 + 我的团队列表
|
||||
*/
|
||||
publicInfo(page) {
|
||||
let newStyle = this.data.changeStyle
|
||||
let url = ''
|
||||
if(newStyle == 'order') url = wx.$api.user.profitOrders(this.data.ordersValue, page)
|
||||
if(newStyle == 'team') url = wx.$api.user.profitTeam(this.data.teamValue, this.data.teamSort, page)
|
||||
|
||||
url.then(res=>{
|
||||
let listArr = this.data.publicData,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.data)
|
||||
|
||||
this.setData({
|
||||
publicData : newData,
|
||||
page : res.data.page,
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 月份选择
|
||||
*/
|
||||
screenBind(val) {
|
||||
let newValue = parseInt(val.detail.value)
|
||||
this.setData({
|
||||
monthsValue : newValue + 1,
|
||||
monthsIndex : val.detail.value
|
||||
})
|
||||
|
||||
// 获取收益统计
|
||||
this.incomeInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单类型选择
|
||||
*/
|
||||
screenOrders(val) {
|
||||
this.setData({
|
||||
ordersIndex: val.detail.value,
|
||||
ordersValue: this.data.ordersWay[val.detail.value].type
|
||||
})
|
||||
// 获取收益订单列表 + 我的团队列表
|
||||
this.publicInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 团队类型选择
|
||||
*/
|
||||
screenTeam(val) {
|
||||
this.setData({
|
||||
teamIndex: val.detail.value,
|
||||
teamValue: this.data.teamWay[val.detail.value].value
|
||||
})
|
||||
// 获取收益订单列表 + 我的团队列表
|
||||
this.publicInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 销量排序
|
||||
*/
|
||||
teamTap () {
|
||||
if (this.data.teamSort == 'asc') {
|
||||
this.setData({
|
||||
teamSort : 'desc',
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
teamSort : 'asc',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取收益订单列表 + 我的团队列表
|
||||
this.publicInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
this.publicInfo(pageNumber)
|
||||
}
|
||||
}
|
||||
})
|
||||
6
pages/myProfit/myProfit.json
Normal file
6
pages/myProfit/myProfit.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "我的收益",
|
||||
"navigationBarBackgroundColor": "#d0a76c",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
355
pages/myProfit/myProfit.wxml
Normal file
355
pages/myProfit/myProfit.wxml
Normal file
@@ -0,0 +1,355 @@
|
||||
<view class="profigHead">
|
||||
<view class="profigHead-user">
|
||||
<image src="{{profitUser.avatar}}" mode="aspectFill"></image>{{profitUser.nickname}}的收益
|
||||
</view>
|
||||
<image class="profigHead-img" src="/static/img/profigLabel_back.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<view class="profigCont">
|
||||
<view class="profigLabel">
|
||||
<view class="profigLabel-top">
|
||||
我在本时生活总收益!
|
||||
</view>
|
||||
<view class="profigLabel-balance">
|
||||
<view class="profigLabel-balance-left">
|
||||
<view class="profigLabel-balance-name">余额</view>
|
||||
<view class="profigLabel-balance-price">¥<text>{{profitUser.account.balance}}</text></view>
|
||||
</view>
|
||||
<navigator hover-class="none" url="/pages/withdrawal_form/withdrawal_form" class="profigLabel-balance-withdrawal">提现</navigator>
|
||||
</view>
|
||||
<view class="profigLabel-list">
|
||||
<view class="profigLabel-list-label">
|
||||
<navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=share_product" class="profigLabel-list-name">
|
||||
分享产品收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="profigLabel-list-price">
|
||||
{{profitFinance.share_product}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-list-label">
|
||||
<navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=team_product" class="profigLabel-list-name">
|
||||
团队产品消费收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="profigLabel-list-price">
|
||||
{{profitFinance.team_product}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-list-label">
|
||||
<navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=share_Recharge" class="profigLabel-list-name">
|
||||
分享储值收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="profigLabel-list-price">
|
||||
{{profitFinance.share_Recharge}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-list-label">
|
||||
<navigator hover-class="none" url="/pages/myProfit_list/myProfit_list?name=team_recharge" class="profigLabel-list-name">
|
||||
团队储值收益<image src="/static/img/profigLabel_row.png" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="profigLabel-list-price">
|
||||
{{profitFinance.team_recharge}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-list-label">
|
||||
<view class="profigLabel-list-name">
|
||||
达人总数
|
||||
</view>
|
||||
<view class="profigLabel-list-price">
|
||||
{{profitCount.leader}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-list-label">
|
||||
<view class="profigLabel-list-name">
|
||||
用户总数
|
||||
</view>
|
||||
<view class="profigLabel-list-price">
|
||||
{{profitCount.users}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-cash">
|
||||
<view class="profigLabel-cash-label">
|
||||
<view class="profigLabel-cash-name">
|
||||
总收益
|
||||
</view>
|
||||
<view class="profigLabel-cash-price">
|
||||
{{profitFinance.all_profit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-cash-label">
|
||||
<navigator hover-class="none" url="/pages/withdrawal_record/withdrawal_record?status=end&idx=2" class="profigLabel-cash-name profigLabel-cash-active">
|
||||
已提现
|
||||
</navigator>
|
||||
<view class="profigLabel-cash-price">
|
||||
{{profitFinance.withdrawed}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigLabel-cash-label">
|
||||
<navigator hover-class="none" url="/pages/withdrawal_record/withdrawal_record?status=init&idx=1" class="profigLabel-cash-name profigLabel-cash-active">
|
||||
提现中
|
||||
</navigator>
|
||||
<view class="profigLabel-cash-price">
|
||||
{{profitFinance.withdrawing}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="profigTab">
|
||||
<view class="profigTab-nav">
|
||||
<view class="profigTab-nav-name {{changeStyle == 'report' ? 'active' : ''}}" data-style="report"
|
||||
bindtap="changeTabbar">收益报表</view>
|
||||
<view class="profigTab-nav-name {{changeStyle == 'order' ? 'active' : ''}}" data-style="order"
|
||||
bindtap="changeTabbar">收益订单</view>
|
||||
<view class="profigTab-nav-name {{changeStyle == 'team' ? 'active' : ''}}" data-style="team"
|
||||
bindtap="changeTabbar">我的团队</view>
|
||||
</view>
|
||||
<view class="profigTab-list">
|
||||
<!-- 本月收益统计 -->
|
||||
<view class="profigReport {{changeStyle == 'report' ? 'show' : ''}}">
|
||||
<view class="profigReport-module">
|
||||
<view class="profigReport-module-title">
|
||||
<view class="profigReport-module-name">
|
||||
本月收益统计
|
||||
</view>
|
||||
<view class="profigReport-module-picker">
|
||||
<picker bindchange="screenBind" value="{{monthsIndex}}" range-key="name"
|
||||
range="{{incometMonths}}">
|
||||
{{incometMonths[monthsIndex].name}}
|
||||
</picker>
|
||||
<image class="profigReport-module-icon" src="/static/icon/arrow_down.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-list">
|
||||
<view class="profigReport-list-label">
|
||||
<view class="profigReport-label-name">
|
||||
分享产品收益
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometFfinance.share_product.this_month}}
|
||||
</view>
|
||||
<view class="profigLabel-label-billie {{incometFfinance.share_product.this_month >= 0 ? '':'active'}}">
|
||||
<image
|
||||
src="{{incometFfinance.share_product.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
|
||||
mode="aspectFill"></image>
|
||||
{{incometFfinance.share_product.text}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-list-label">
|
||||
<view class="profigReport-label-name">
|
||||
团队产品消费收益
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometFfinance.team_product.this_month}}
|
||||
</view>
|
||||
<view class="profigLabel-label-billie {{incometFfinance.team_product.this_month >= 0 ? '':'active'}}">
|
||||
<image
|
||||
src="{{incometFfinance.team_product.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
|
||||
mode="aspectFill"></image>
|
||||
{{incometFfinance.team_product.text}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-list-label">
|
||||
<view class="profigReport-label-name">
|
||||
分享储值收益
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometFfinance.share_recharge.this_month}}
|
||||
</view>
|
||||
<view class="profigLabel-label-billie {{incometFfinance.share_recharge.this_month >= 0 ? '':'active'}}">
|
||||
<image
|
||||
src="{{incometFfinance.share_recharge.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
|
||||
mode="aspectFill"></image>
|
||||
{{incometFfinance.share_recharge.text}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-list-label">
|
||||
<view class="profigReport-label-name">
|
||||
团队储值收益
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometFfinance.team_recharge.this_month}}
|
||||
</view>
|
||||
<view class="profigLabel-label-billie {{incometFfinance.team_recharge.this_month >= 0 ? '':'active'}}">
|
||||
<image
|
||||
src="{{incometFfinance.team_recharge.this_month >= 0 ? '/static/img/profig_billie_icon.png' : '/static/img/profig_billie_icon_active.png'}}"
|
||||
mode="aspectFill"></image>
|
||||
{{incometFfinance.team_recharge.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-module profigReport-module-subset">
|
||||
<view class="profigReport-subset-name">
|
||||
新增团队统计
|
||||
</view>
|
||||
<view class="profigReport-list">
|
||||
<view class="profigReport-subset-label">
|
||||
<view class="profigReport-label-name">
|
||||
新增达人数
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometCount.leader}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-subset-label">
|
||||
<view class="profigReport-label-name">
|
||||
新增用户数
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometCount.users}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-module profigReport-module-subset">
|
||||
<view class="profigReport-subset-name">
|
||||
消费订单统计
|
||||
</view>
|
||||
<view class="profigReport-list">
|
||||
<view class="profigReport-subset-label">
|
||||
<view class="profigReport-label-name">
|
||||
产品消费
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometOrder.product}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigReport-subset-label">
|
||||
<view class="profigReport-label-name">
|
||||
储值消费
|
||||
</view>
|
||||
<view class="profigLabel-label-price">
|
||||
{{incometOrder.recharge}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收益订单 -->
|
||||
<view class="profigOrder {{changeStyle == 'order' ? 'show' : ''}}">
|
||||
<view class="profigOrder-module-title">
|
||||
<view class="profigOrder-module-name">
|
||||
共<text>{{publicData.length}}</text>条订单
|
||||
</view>
|
||||
<view class="profigReport-module-picker">
|
||||
<picker bindchange="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>
|
||||
<block wx:if="{{publicData.length > 0}}">
|
||||
<view class="profigOrder-list" wx:for="{{publicData}}" wx:key="publicData">
|
||||
<view class="profigOrder-no">
|
||||
<view class="profigOrder-no-name">
|
||||
<text
|
||||
class="profigOrder-no-tips {{item.type == 'recharge' ? '' : 'active'}}">{{item.type
|
||||
==
|
||||
'recharge' ? '储值' : '产品'}}</text>订单号:{{item.order.orderid}}
|
||||
<image src="/static/img/frozen_time.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="profigOrder-no-text">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigOrder-info">
|
||||
<view class="profigOrder-label">
|
||||
姓名:{{item.user.nickname}}
|
||||
</view>
|
||||
<view class="profigOrder-label">
|
||||
联系电话:{{item.user.username}}
|
||||
</view>
|
||||
<view class="profigOrder-label profigOrder-label-color">
|
||||
佣金:¥{{item.bonus}}
|
||||
</view>
|
||||
<view class="profigOrder-label">
|
||||
当前状态:{{item.order.status}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix">
|
||||
</image>
|
||||
加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="public-hint" wx:else>
|
||||
<image src="/static/img/legal_tips.png"></image>
|
||||
<view>抱歉,目前暂无数据~</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的团队 -->
|
||||
<view class="profigTeam {{changeStyle == 'team' ? 'show' : ''}}">
|
||||
<view class="profigTeam-module-title">
|
||||
<view class="profigOrder-module-title">
|
||||
<view class="profigOrder-module-name">
|
||||
共<text>{{publicData.length}}</text>人
|
||||
</view>
|
||||
<view class="profigReport-module-picker">
|
||||
<picker bindchange="screenTeam" value="{{teamIndex}}" range-key="name" range="{{teamWay}}">
|
||||
{{teamWay[teamIndex].name}}
|
||||
</picker>
|
||||
<image class="profigReport-module-icon" src="/static/icon/arrow_down.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profigTeam-ranking {{teamSort == 'asc' ? 'ascactive' : 'descactive'}}" bindtap="teamTap">
|
||||
创收排行
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{publicData.length > 0}}">
|
||||
<view class="profigTeam-list">
|
||||
<view class="profigTeam-nav">
|
||||
<view class="profigTeam-name">达人姓名</view>
|
||||
<view class="profigTeam-name">联系电话</view>
|
||||
<view class="profigTeam-name">身份</view>
|
||||
<view class="profigTeam-name">创收额</view>
|
||||
</view>
|
||||
<view class="profigTeam-label">
|
||||
<view class="profigTeam-label-list" wx:for="{{publicData}}" wx:key="publicData">
|
||||
<view class="profigTeam-label-cont profigTeam-label-head">
|
||||
<image src="{{item.user.avatar}}" mode="aspectFill"></image>
|
||||
<view class="nowrap profigTeam-label-name">{{item.user.nickname}}</view>
|
||||
</view>
|
||||
<view class="nowrap profigTeam-label-cont">
|
||||
{{item.user.username}}
|
||||
</view>
|
||||
<view class="nowrap profigTeam-label-cont">
|
||||
{{item.user.identity.identity_name}}
|
||||
</view>
|
||||
<view class="nowrap profigTeam-label-cont profigTeam-label-color">
|
||||
{{item.balance}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif"
|
||||
mode="widthFix">
|
||||
</image>
|
||||
加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="public-hint" wx:else>
|
||||
<image src="/static/img/legal_tips.png"></image>
|
||||
<view>抱歉,目前暂无数据~</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
541
pages/myProfit/myProfit.wxss
Normal file
541
pages/myProfit/myProfit.wxss
Normal file
@@ -0,0 +1,541 @@
|
||||
page {
|
||||
background-color: #ececec;
|
||||
}
|
||||
|
||||
/* 头部 */
|
||||
.profigHead {
|
||||
background: linear-gradient(to bottom, #d0a76c 50%, #ffffff);
|
||||
padding: 30rpx;
|
||||
height: 300rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.profigHead-user {
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.profigHead-user image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #ffffff;
|
||||
}
|
||||
|
||||
.profigHead-img {
|
||||
opacity: .1;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
position: absolute;
|
||||
top: -50rpx;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* 内容 */
|
||||
.profigCont {
|
||||
position: absolute;
|
||||
top: 140rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.profigLabel {
|
||||
background-color: #2f2e2c;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.profigLabel-top {
|
||||
background: linear-gradient(-250deg, #feecd4, #d5b687 90%);
|
||||
padding: 0 30rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.profigLabel-balance {
|
||||
color: #efd8b8;
|
||||
padding: 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.profigLabel-balance-left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.profigLabel-balance-name {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.profigLabel-balance-left text {
|
||||
font-size: 56rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.profigLabel-balance-withdrawal {
|
||||
background-color: #fdebd3;
|
||||
color: #000000;
|
||||
display: inline-block;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
padding: 0 40rpx;
|
||||
border-radius: 60rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
.profigLabel-list-name {
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.profigLabel-list-name image {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.profigLabel-list {
|
||||
padding: 30rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.profigLabel-list,
|
||||
.profigLabel-cash {
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.profigLabel-list::after,
|
||||
.profigLabel-list::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
border-top: 2rpx dotted #665f54;
|
||||
}
|
||||
|
||||
.profigLabel-list::after {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.profigLabel-list::before {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.profigLabel-list-label {
|
||||
width: 50%;
|
||||
float: left;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.profigLabel-cash {
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.profigLabel-cash-label {
|
||||
width: 33.33%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
.profigLabel-cash-name {
|
||||
margin-bottom: 10rpx;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.profigLabel-cash-active::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
bottom: 4rpx;
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* tab选项卡 */
|
||||
.profigTab-nav {
|
||||
display: flex;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
|
||||
.profigTab-nav-name {
|
||||
width: 33.33%;
|
||||
flex: 3;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.profigTab-nav-name.active {
|
||||
color: #ffa30a;
|
||||
}
|
||||
|
||||
.profigTab-nav-name.active::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: calc(50% - 30rpx);
|
||||
bottom: 15rpx;
|
||||
width: 60rpx;
|
||||
height: 8rpx;
|
||||
background-color: #ffa30a;
|
||||
}
|
||||
|
||||
|
||||
/* tab收益报表内容 */
|
||||
.profigReport,
|
||||
.profigOrder,
|
||||
.profigTeam {
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profigReport.show,
|
||||
.profigOrder.show,
|
||||
.profigTeam.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.profigReport {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.profigReport-module {
|
||||
padding: 30rpx 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.profigReport-module-title {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.profigReport-module-name {
|
||||
flex: 1;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.profigReport-module-picker {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
font-size: 28rpx;
|
||||
padding-top: 4rpx;
|
||||
}
|
||||
|
||||
.profigReport-module-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin: 6rpx 0 0 10rpx;
|
||||
}
|
||||
|
||||
.profigLabel-label-billie {
|
||||
background-color: #fcf6ea;
|
||||
border: 2rpx solid #f7e5db;
|
||||
color: #f2863b;
|
||||
padding-right: 20rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
font-size: 22rpx;
|
||||
display: inline-flex;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.profigLabel-label-billie image {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
margin: 12rpx 10rpx;
|
||||
}
|
||||
|
||||
.profigLabel-label-billie.active {
|
||||
color: #00a915;
|
||||
background-color: #efffec;
|
||||
border: 2rpx solid #c9fbbf;
|
||||
}
|
||||
|
||||
.profigReport-list {
|
||||
padding: 0 -20rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.profigReport-list-label {
|
||||
width: calc(50% - 40rpx);
|
||||
float: left;
|
||||
margin: 40rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.profigReport-label-name {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.profigLabel-label-price {
|
||||
margin: 10rpx 0;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.profigReport-module-subset {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.profigReport-module-subset::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
border-top: 2rpx solid #e4e4e4;
|
||||
}
|
||||
|
||||
.profigReport-subset-name {
|
||||
text-align: center;
|
||||
margin: 0 auto 40rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: #f1f1f1;
|
||||
padding: 0 30rpx;
|
||||
line-height: 64rpx;
|
||||
display: inline-block;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.profigReport-subset-label {
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
float: left;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
/* tab收益订单内容 */
|
||||
.profigOrder-list {
|
||||
background-color: white;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.profigOrder-no {
|
||||
position: relative;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.profigOrder-no::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
border-top: 2rpx dotted #e7e7e7;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.profigOrder-no-name {
|
||||
display: flex;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.profigOrder-no-name image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.profigOrder-no-text {
|
||||
color: #515151;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.profigOrder-label {
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.profigOrder-label-color {
|
||||
color: #ffa30a;
|
||||
}
|
||||
|
||||
.profigOrder-no-tips {
|
||||
background-color: green;
|
||||
font-size: 22rpx;
|
||||
color: #ffffff;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 30rpx;
|
||||
margin: 5rpx 10rpx 0 0;
|
||||
}
|
||||
|
||||
.profigOrder-no-tips.active {
|
||||
background-color: #ffa30a;
|
||||
}
|
||||
|
||||
.profigOrder-module-title {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.profigOrder-module-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.profigOrder-module-name text {
|
||||
color: #ffa30a;
|
||||
padding: 0 5rpx;
|
||||
}
|
||||
|
||||
.profigOrder-module-title .profigReport-module-picker {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.profigOrder-module-title .profigReport-module-icon {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
/* tab我的团队内容 */
|
||||
.profigTeam-module-title {
|
||||
display: flex;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.profigTeam .profigOrder-module-title {
|
||||
flex: 1;
|
||||
margin: 0 30rpx 0 0;
|
||||
}
|
||||
|
||||
.profigTeam-ranking {
|
||||
width: 180rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
position: relative;
|
||||
background-color: #ffffff;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
color: green;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.profigTeam-ranking::after,
|
||||
.profigTeam-ranking::before {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 8rpx solid transparent;
|
||||
border-right: 8rpx solid transparent;
|
||||
}
|
||||
|
||||
.profigTeam-ranking::after {
|
||||
bottom: 28rpx;
|
||||
border-top: 8rpx solid grey;
|
||||
}
|
||||
|
||||
.profigTeam-ranking::before {
|
||||
top: 28rpx;
|
||||
border-bottom: 8rpx solid grey;
|
||||
}
|
||||
|
||||
.profigTeam-ranking.ascactive::after {
|
||||
border-top: 8rpx solid green;
|
||||
}
|
||||
|
||||
.profigTeam-ranking.descactive::before {
|
||||
border-bottom: 8rpx solid green;
|
||||
}
|
||||
|
||||
.profigTeam-list {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.profigTeam-nav {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.profigTeam-name {
|
||||
flex: 4;
|
||||
text-align: center;
|
||||
width: 25%;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.profigTeam-label {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.profigTeam-label-list {
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid #e8e8e8;
|
||||
}
|
||||
|
||||
.profigTeam-label-list:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.profigTeam-label-cont {
|
||||
line-height: 110rpx;
|
||||
flex: 4;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.profigTeam-label-head {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.profigTeam-label-head image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
margin: 30rpx 20rpx;
|
||||
}
|
||||
|
||||
.profigTeam-label-name {
|
||||
width: calc(100% - 90rpx);
|
||||
}
|
||||
|
||||
.profigTeam-label-color {
|
||||
color: #ffa30a;
|
||||
}
|
||||
|
||||
.public-hint {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 60rpx 0;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.public-hint image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
}
|
||||
61
pages/myProfit_list/myProfit_list.js
Normal file
61
pages/myProfit_list/myProfit_list.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
name : '', //权益名
|
||||
profitData : [], //权益列表
|
||||
page : {}, //下一页
|
||||
lodingStats : false, //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
this.setData({
|
||||
name: options.name
|
||||
})
|
||||
|
||||
// 获取收益列表
|
||||
this.profitInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 收益列表
|
||||
*/
|
||||
profitInfo(page) {
|
||||
wx.$api.user.profitLogs(this.data.name, page).then(res=>{
|
||||
let listArr = this.data.publicData,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.data)
|
||||
this.setData({
|
||||
publicData : newData,
|
||||
page : res.data.page,
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
this.profitInfo(pageNumber)
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/myProfit_list/myProfit_list.json
Normal file
4
pages/myProfit_list/myProfit_list.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "权益列表"
|
||||
}
|
||||
41
pages/myProfit_list/myProfit_list.wxml
Normal file
41
pages/myProfit_list/myProfit_list.wxml
Normal file
@@ -0,0 +1,41 @@
|
||||
<block wx:if="{{publicData.length > 0}}">
|
||||
<view class="record-list" wx:for="{{publicData}}" wx:key="publicData">
|
||||
<view class="record-top">
|
||||
<view class="record-way">{{item.name}}</view>
|
||||
<view class="record-label-status">¥{{item.bonus}}</view>
|
||||
</view>
|
||||
<view class="record-cont">
|
||||
<view class="record-label">
|
||||
<view class="record-label-name">时间</view>
|
||||
<view class="record-label-time">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="record-label">
|
||||
<view class="record-label-name">状态</view>
|
||||
<view class="record-label-time">{{item.order.status}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-source">
|
||||
<view class="record-source-name">收益来源</view>
|
||||
<view class="record-source-cont">
|
||||
<image class="record-source-img" src="{{item.source.avatar}}" mode="aspectFill"></image>
|
||||
<view class="record-source-info">
|
||||
<view class="record-source-nickname">{{item.source.nickname}}</view>
|
||||
<view class="record-source-tel">{{item.source.username}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 暂无内容 -->
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="/static/img/legal_tips.png"></image>
|
||||
<view>抱歉,目前暂无记录~</view>
|
||||
</view>
|
||||
82
pages/myProfit_list/myProfit_list.wxss
Normal file
82
pages/myProfit_list/myProfit_list.wxss
Normal file
@@ -0,0 +1,82 @@
|
||||
/* 记录列表 */
|
||||
.record-list {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
margin: 30rpx;
|
||||
}
|
||||
|
||||
.record-top {
|
||||
display: flex;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-way {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-take {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.record-cont {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.record-label {
|
||||
display: flex;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
|
||||
.record-label-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-label-status {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.record-source {
|
||||
border-top: 10rpx solid #f7f7f7;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.record-source-name {
|
||||
background: #f7f7f7;
|
||||
color: #000;
|
||||
width: 140rpx;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.record-source-cont {
|
||||
position: relative;
|
||||
padding: 40rpx 30rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.record-source-img {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.record-source-info {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 40rpx 30rpx 20rpx 120rpx;
|
||||
box-sizing: border-box;
|
||||
line-height: 70rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.record-source-nickname {
|
||||
flex: 1;
|
||||
}
|
||||
@@ -15,7 +15,8 @@ Page({
|
||||
payTips : 1, //支付方式
|
||||
payState : false, //支付状态
|
||||
orderId : '', //支付订单
|
||||
}
|
||||
},
|
||||
unicomPay : '' //是否有沃支付
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -24,7 +25,8 @@ Page({
|
||||
onLoad (options) {
|
||||
this.setData({
|
||||
orderType: options.orderType,
|
||||
stateType: options.stateType
|
||||
stateType: options.stateType,
|
||||
unicomPay: getApp().globalData.unicomPay
|
||||
})
|
||||
},
|
||||
|
||||
@@ -55,7 +57,7 @@ Page({
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -98,7 +100,7 @@ Page({
|
||||
title: res.data,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}) .catch(err => {});
|
||||
} else if (res.cancel) {
|
||||
wx.showToast({
|
||||
title : '取消',
|
||||
@@ -148,7 +150,7 @@ Page({
|
||||
this.orderInfo();
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
// payTips为2的时候为沃钱包支付
|
||||
if(this.data.pay.payTips == 2) {
|
||||
@@ -163,7 +165,7 @@ Page({
|
||||
this.setData({
|
||||
['pay.payState']: false
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</view>
|
||||
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="https://storage.funnyzhibo.com/images/2020/05/06/null_icon.png"></image>
|
||||
<image src="/static/img/staff_null.png"></image>
|
||||
<view>暂无订单</view>
|
||||
</view>
|
||||
|
||||
@@ -95,13 +95,13 @@
|
||||
</view>
|
||||
<radio class="radio" value="1" checked></radio>
|
||||
</view>
|
||||
<!-- <view class="payContList-label">
|
||||
<view class="payContList-label" wx:if="{{unicomPay}}">
|
||||
<view class="payContList-label-name">
|
||||
<image class="payContList-label-img" src="/static/img/wqb.jpg"></image>
|
||||
沃钱包支付
|
||||
</view>
|
||||
<radio class="radio" value="2"></radio>
|
||||
</view> -->
|
||||
</view>
|
||||
</radio-group>
|
||||
<button class="payWayBtn" bindtap="orderPay">确认</button>
|
||||
</view>
|
||||
@@ -41,7 +41,7 @@ Page({
|
||||
this.setData({
|
||||
order : res.data
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ Page({
|
||||
title: res.data,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
} else if (res.cancel) {
|
||||
wx.showToast({
|
||||
title : '取消',
|
||||
@@ -97,9 +97,17 @@ Page({
|
||||
* 支付提交
|
||||
*/
|
||||
orderPay(e) {
|
||||
let url = ''
|
||||
let orderid = e.currentTarget.dataset.id
|
||||
wx.$api.exchange.payments(orderid).then(res=>{
|
||||
wx.$api.index.wechat(res.data.trade_no).then(res=>{
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') url = wx.$api.exchange.welfarePay
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') url = wx.$api.exchange.rightsPay
|
||||
url(orderid).then(res=>{
|
||||
// payTips为1的时候为微信支付
|
||||
if(this.data.pay.payTips == 1) {
|
||||
let wechaUrl = ''
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') wechaUrl = wx.$api.index.fridayPay
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') wechaUrl = wx.$api.index.wechat
|
||||
wechaUrl(res.data.trade_no).then(res=>{
|
||||
let payInfo = JSON.parse(res.data)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
@@ -114,18 +122,30 @@ Page({
|
||||
icon : 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/coupon/coupon?type=couponPublic'
|
||||
})
|
||||
// 获取商品活动订单
|
||||
this.orderInfo();
|
||||
},2000)
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?stateType=unpay'
|
||||
})
|
||||
// 获取商品活动订单
|
||||
this.orderInfo();
|
||||
}
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
// payTips为2的时候为沃钱包支付
|
||||
if(this.data.pay.payTips == 2) {
|
||||
const newUrl = "https://lifetest.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.navigateTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/webView/webView?url=${url}`
|
||||
});
|
||||
}
|
||||
|
||||
this.setData({
|
||||
['pay.payState']: false
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -59,5 +59,5 @@
|
||||
<view class="order-data-footer {{statusHeight > 30 ? 'iphoneX':''}}">
|
||||
<view class="order-btn" bindtap="orderRun">返回订单</view>
|
||||
<view class="order-btn" bindtap="orderDelete" data-id="{{order.orderid}}" wx:if="{{order.canCancel || order.can.cancel}}">取消订单</view>
|
||||
<view class="order-btn order-btn-back" bindtap="orderPay" wx:if="{{order.canPay || order.can.pay}}" data-id="{{order.orderid}}">立即支付</view>
|
||||
<!-- <view class="order-btn order-btn-back" bindtap="orderPay" wx:if="{{order.canPay || order.can.pay}}" data-id="{{order.orderid}}">立即支付</view> -->
|
||||
</view>
|
||||
@@ -86,7 +86,7 @@ Page({
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -123,7 +123,7 @@ Page({
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
72
pages/password/password.js
Normal file
72
pages/password/password.js
Normal file
@@ -0,0 +1,72 @@
|
||||
// pages/password/password.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
passSource : '', //设置密码跳转来源favourUrl为转账跳转
|
||||
passType : '', //是否是首次设置密码
|
||||
disabled : false, //设置支付密码
|
||||
password : '', //支付密码
|
||||
confirmation: '' //确认密码
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 检查用户登录状态
|
||||
const Paypass = wx.getStorageSync("hasPaypass")
|
||||
|
||||
this.setData({
|
||||
passType : Paypass,
|
||||
passSource: options.source
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置密码
|
||||
*/
|
||||
formSubmit(e) {
|
||||
let newoldPassword= e.detail.value.oldPassword,
|
||||
newPassword = e.detail.value.password,
|
||||
newFormSubmit = e.detail.value.confirmation
|
||||
|
||||
let newUrl = '' //定义接口来源名称
|
||||
|
||||
if(this.data.passType == false) newUrl = wx.$api.user.setPassword(newPassword, newFormSubmit)
|
||||
if(this.data.passType == true) newUrl = wx.$api.user.changePassword(newoldPassword, newPassword, newFormSubmit)
|
||||
|
||||
newUrl.then(res=>{
|
||||
// 已设置密码缓存
|
||||
wx.setStorage({
|
||||
key : 'hasPaypass',
|
||||
data : true
|
||||
})
|
||||
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '设置成功',
|
||||
})
|
||||
|
||||
// 只有从转账页面跳转才回到上一页
|
||||
if(this.data.passSource == "favourUrl") {
|
||||
setTimeout(()=>{
|
||||
wx.navigateBack({delta: 1})
|
||||
},2000)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// 其他跳转回到用户中心
|
||||
setTimeout(()=>{
|
||||
wx.switchTab({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
},2000)
|
||||
}).catch(err => {});
|
||||
}
|
||||
})
|
||||
6
pages/password/password.json
Normal file
6
pages/password/password.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "支付密码",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
20
pages/password/password.wxml
Normal file
20
pages/password/password.wxml
Normal file
@@ -0,0 +1,20 @@
|
||||
<view class="pass">
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="favourCont-label" wx:if="{{passType}}">
|
||||
<view class="favourCont-name">旧密码:</view>
|
||||
<input type="number" password name="oldPassword" placeholder="请输入旧密码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">{{passType ? '新密码' : '输入密码'}}:</view>
|
||||
<input type="number" password name="password" placeholder="请输入支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">确认密码:</view>
|
||||
<input type="number" password name="confirmation" placeholder="请再次输入支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-btn">
|
||||
<button formType="submit" disabled="{{disabled}}">确认设置</button>
|
||||
<navigator hover-class="none" url="/pages/password_forget/password_forget" class="forget" wx:if="{{passType}}">忘记密码, 立即找回?</navigator>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
48
pages/password/password.wxss
Normal file
48
pages/password/password.wxss
Normal file
@@ -0,0 +1,48 @@
|
||||
.favourCont-label {
|
||||
background-color: #fff;
|
||||
height: 120rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.favourCont-label input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
padding-left: 220rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.favourCont-name {
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.favourCont-btn {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 50rpx;
|
||||
|
||||
}
|
||||
|
||||
.favourCont-btn button {
|
||||
background-color: #3a3b3e;
|
||||
color: #fff;
|
||||
width: 100% !important;
|
||||
line-height: 60rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.forget {
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
color: #d6571f;
|
||||
font-weight: 600;
|
||||
}
|
||||
90
pages/password_forget/password_forget.js
Normal file
90
pages/password_forget/password_forget.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// pages/password_forget/password_forget.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
mobileNo : '', //手机号
|
||||
codename : '获取验证码',
|
||||
senddisabled: false, //获取验证码-按钮提交状态
|
||||
disabled : false //按钮提交状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* mobileNo
|
||||
*/
|
||||
getNameValue(e) {
|
||||
this.setData({
|
||||
mobileNo: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
*/
|
||||
sendOut(e) {
|
||||
var _this = this
|
||||
wx.$api.user.send(this.data.mobileNo,'PAYPASS').then(res=>{
|
||||
wx.showToast({
|
||||
title : '发送成功',
|
||||
icon : 'success',
|
||||
duration: 2000
|
||||
})
|
||||
var num = 61;
|
||||
var timer = setInterval(function () {
|
||||
num--;
|
||||
if (num <= 0) {
|
||||
clearInterval(timer);
|
||||
_this.setData({
|
||||
codename : '重新发送',
|
||||
senddisabled: false
|
||||
})
|
||||
|
||||
} else {
|
||||
_this.setData({
|
||||
codename : num + "s后重新获取",
|
||||
senddisabled: true
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置密码
|
||||
*/
|
||||
formSubmit(e) {
|
||||
let newMobile = this.data.mobileNo,
|
||||
newCode = e.detail.value.code,
|
||||
newPassword = e.detail.value.password,
|
||||
newFormSubmit = e.detail.value.confirmation
|
||||
wx.$api.user.resetPassword(newCode, newPassword, newFormSubmit, newMobile, 'PAYPASS').then(res=>{
|
||||
// 已设置密码缓存
|
||||
wx.setStorage({
|
||||
key : 'hasPaypass',
|
||||
data : true
|
||||
})
|
||||
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '设置成功',
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
wx.switchTab({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
},2000)
|
||||
}).catch(err=>{})
|
||||
}
|
||||
})
|
||||
6
pages/password_forget/password_forget.json
Normal file
6
pages/password_forget/password_forget.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "重置密码",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
24
pages/password_forget/password_forget.wxml
Normal file
24
pages/password_forget/password_forget.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<view class="pass">
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">手机号:</view>
|
||||
<input type="number" name="mobile" placeholder="请输入手机号" bindinput="getNameValue" />
|
||||
<button bindtap="sendOut" class="obtain" disabled="{{senddisabled}}" hover-class="none">{{codename}}</button>
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">验证码</view>
|
||||
<input type="number" name="code" placeholder="请输入验证码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">新密码:</view>
|
||||
<input type="number" password name="password" placeholder="请输入新的支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-label">
|
||||
<view class="favourCont-name">确认密码:</view>
|
||||
<input type="number" password name="confirmation" placeholder="请再次输入支付密码" />
|
||||
</view>
|
||||
<view class="favourCont-btn">
|
||||
<button formType="submit" disabled="{{disabled}}">确认设置</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
62
pages/password_forget/password_forget.wxss
Normal file
62
pages/password_forget/password_forget.wxss
Normal file
@@ -0,0 +1,62 @@
|
||||
.favourCont-label {
|
||||
background-color: #fff;
|
||||
height: 120rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.favourCont-label input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
padding-left: 220rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.favourCont-name {
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.favourCont-btn {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 50rpx;
|
||||
|
||||
}
|
||||
|
||||
.favourCont-btn button {
|
||||
background-color: #3a3b3e;
|
||||
color: #fff;
|
||||
width: 100% !important;
|
||||
line-height: 60rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.forget {
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.obtain {
|
||||
color: #d6571f;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 30rpx;
|
||||
position: absolute;
|
||||
width: auto !important;
|
||||
text-align: right;
|
||||
line-height: 100rpx;
|
||||
z-index: 9;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
right: 20rpx;
|
||||
top: 0;
|
||||
}
|
||||
23
pages/password_set/password_set.js
Normal file
23
pages/password_set/password_set.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 本时生活
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
passType : '', //是否是首次设置密码
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 检查用户登录状态
|
||||
const Paypass = wx.getStorageSync("hasPaypass")
|
||||
|
||||
this.setData({
|
||||
passType: Paypass
|
||||
})
|
||||
}
|
||||
})
|
||||
3
pages/password_set/password_set.json
Normal file
3
pages/password_set/password_set.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
8
pages/password_set/password_set.wxml
Normal file
8
pages/password_set/password_set.wxml
Normal file
@@ -0,0 +1,8 @@
|
||||
<navigator url="/pages/password/password?passType={{passType}}" class="label">
|
||||
<view class="label-name">
|
||||
支付密码
|
||||
</view>
|
||||
<view class="label-more">
|
||||
{{ passType ? '已设置' : '未设置'}}<image src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
</navigator>
|
||||
23
pages/password_set/password_set.wxss
Normal file
23
pages/password_set/password_set.wxss
Normal file
@@ -0,0 +1,23 @@
|
||||
.label {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.label-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.label-more {
|
||||
display: flex;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.label-more image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: 28rpx 0 0 10rpx;
|
||||
}
|
||||
56
pages/recommend/recommend.js
Normal file
56
pages/recommend/recommend.js
Normal file
@@ -0,0 +1,56 @@
|
||||
// 本时生活
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
recomNumber : '', //推荐好友数量
|
||||
recomArr : [], //推荐好友列表
|
||||
page : {}, //下一页
|
||||
lodingStats : false //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow () {
|
||||
// 获取列表
|
||||
this.recomInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品活动订单
|
||||
*/
|
||||
recomInfo(page) {
|
||||
wx.$api.user.childs(page).then(res=>{
|
||||
let listArr = this.data.recomArr,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
|
||||
newData = listArr.concat(res.data.lists.data)
|
||||
this.setData({
|
||||
recomNumber : res.data.all,
|
||||
recomArr : newData,
|
||||
page : res.data.lists.page,
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
this.recomInfo(pageNumber)
|
||||
}
|
||||
}
|
||||
})
|
||||
3
pages/recommend/recommend.json
Normal file
3
pages/recommend/recommend.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
25
pages/recommend/recommend.wxml
Normal file
25
pages/recommend/recommend.wxml
Normal file
@@ -0,0 +1,25 @@
|
||||
<view class="recommend">
|
||||
<image class="recommend-img" src="/static/img/recommend_img.png" mode="widthFix"></image>
|
||||
<view class="recommend-cont">
|
||||
<view class="recommend-cont-number">{{recomNumber}}</view>
|
||||
<view class="recommend-cont-name">推荐好友人数(人)</view>
|
||||
</view>
|
||||
<view class="recommend-list">
|
||||
<view class="recommendIf" wx:if="{{recomArr.length > 0}}">
|
||||
<view class="recommend-label" wx:for="{{recomArr}}" wx:key="recomArr">
|
||||
<image class="recommend-head" src="{{item.avatar}}" mode="aspectFill"></image>
|
||||
<view class="recommend-text">
|
||||
<view class="recommend-text-top">
|
||||
<view class="recommend-text-name">{{item.nickname}}</view>
|
||||
<view class="recommend-text-tel">{{item.username}}</view>
|
||||
</view>
|
||||
<view class="recommend-text-identity">{{item.identity_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recommend-hint" wx:else>
|
||||
<image src="/static/img/staff_null.png"></image>
|
||||
<view>暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
104
pages/recommend/recommend.wxss
Normal file
104
pages/recommend/recommend.wxss
Normal file
@@ -0,0 +1,104 @@
|
||||
page {
|
||||
background: linear-gradient(to right, #fa603f, #fc963f);
|
||||
}
|
||||
|
||||
.recommend {
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.recommend-cont {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 90rpx;
|
||||
right: 100rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.recommend-cont-number {
|
||||
font-size: 70rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 列表 */
|
||||
.recommend-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 20rpx 40rpx;
|
||||
}
|
||||
|
||||
.recommend-label {
|
||||
position: relative;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.recommend-label::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.recommend-label:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.recommend-label:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.recommend-head {
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 60%;
|
||||
}
|
||||
|
||||
.recommend-text {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 0 0 0 140rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.recommend-text-top {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.recommend-text-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.recommend-text-tel {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.recommend-text-identity {
|
||||
font-size: 24rpx;
|
||||
color: #7b7b7b;
|
||||
border-radius: 20rpx;
|
||||
border: #d4d4d4 2rpx solid;
|
||||
display: inline-block;
|
||||
padding: 4rpx 15rpx;
|
||||
}
|
||||
|
||||
/* 暂无内容 */
|
||||
.recommend-hint {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.recommend-hint image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
@@ -4,6 +4,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
parentId : '', //分享者ID
|
||||
address : '', //默认收货地址
|
||||
allAddress : '', //收货地址列表
|
||||
groupId : '', //权益id
|
||||
@@ -16,7 +17,7 @@ Page({
|
||||
content : '', //内容介绍
|
||||
notification: '', //重要提示
|
||||
remark : '', //使用须知
|
||||
noticeShow : false, //须知显示状态
|
||||
noticeShow : true, //须知显示状态
|
||||
addressShow : false, //收货地址显示
|
||||
getType : '', //是否显示自提
|
||||
platIndex : 0, //选择提交方式下标
|
||||
@@ -32,9 +33,10 @@ Page({
|
||||
disabled : false,
|
||||
payWayIndex : 0,
|
||||
payWay :[
|
||||
{value: 0, name: "微信支付"}
|
||||
// {value: 1, name: "沃钱包支付"}
|
||||
]
|
||||
{value: 0, name: "微信支付"},
|
||||
{value: 1, name: "沃钱包支付"}
|
||||
],
|
||||
orderType : '' //订单类型
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -45,7 +47,8 @@ Page({
|
||||
groupId : options.rightsId || options.id,
|
||||
typeWeb : options.type,
|
||||
getType : options.getType,
|
||||
openid : options.openid || ''
|
||||
openid : options.openid || '',
|
||||
orderType : options.orderType
|
||||
})
|
||||
},
|
||||
|
||||
@@ -78,7 +81,6 @@ Page({
|
||||
}
|
||||
if(res.data.detail.type == 'virtual') this.setData({isdeliver : 1})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
address : res.data.address,
|
||||
allAddress : res.data.all_address,
|
||||
@@ -108,25 +110,10 @@ Page({
|
||||
this.setData({
|
||||
uniUrl : encodeURIComponent(res.data)
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
}
|
||||
}
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
wx.showModal({
|
||||
title : '用户登录已过期',
|
||||
content : '请重新登录',
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if (res.confirm) {
|
||||
wx.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(err=>{})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -273,12 +260,23 @@ Page({
|
||||
isdeliver: this.data.detail.def_get
|
||||
})
|
||||
}
|
||||
|
||||
let right_id = this.data.detail.right_id,
|
||||
address_id = this.data.address.id,
|
||||
is_deliver = this.data.isdeliver,
|
||||
qty = this.data.num
|
||||
qty = this.data.num,
|
||||
newParent = '',
|
||||
shareObj = getApp().globalData.shareObj
|
||||
|
||||
wx.$api.index.rightStore(right_id, address_id, is_deliver, qty).then(res=>{
|
||||
if(shareObj.type == 'shareStored' && shareObj.type == this.data.orderType){
|
||||
newParent = shareObj.userId
|
||||
}
|
||||
|
||||
if(shareObj.type == 'shareGoods' && shareObj.goodsId == right_id){
|
||||
newParent = shareObj.userId
|
||||
}
|
||||
|
||||
wx.$api.index.rightStore(right_id, address_id, is_deliver, qty, newParent).then(res=>{
|
||||
if(res.data.canPay == false) {
|
||||
wx.showToast({
|
||||
title : '支付成功',
|
||||
@@ -300,66 +298,30 @@ Page({
|
||||
rightsTap: true
|
||||
})
|
||||
}else {
|
||||
// payWayIndex为0的时候为微信支付
|
||||
if(this.data.payWayIndex == 0) {
|
||||
wx.$api.index.wechat(res.data.trade_no).then(res=>{
|
||||
let payInfo = JSON.parse(res.data)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
nonceStr : payInfo.nonceStr,
|
||||
package : payInfo.package,
|
||||
paySign : payInfo.paySign,
|
||||
signType : payInfo.signType,
|
||||
success : res=>{
|
||||
if(res.errMsg == "requestPayment:ok"){
|
||||
wx.showToast({
|
||||
title: '支付成功',
|
||||
icon : 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights'
|
||||
})
|
||||
}
|
||||
// wx.reLaunch({
|
||||
// url: '/pages/coupon/coupon?type=couponPublic'
|
||||
// })
|
||||
},3000)
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
if(this.data.isdeliver == 1) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay'
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/order/order?orderType=rights&stateType=unpay'
|
||||
})
|
||||
}
|
||||
// wx.reLaunch({
|
||||
// url: '/pages/order/order?stateType=unpay'
|
||||
// })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// payWayIndex为1的时候为沃钱包支付
|
||||
if(this.data.payWayIndex == 1) {
|
||||
const newUrl = "https://lifetest.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no
|
||||
let url= encodeURIComponent(newUrl)
|
||||
wx.redirectTo({
|
||||
// 跳转到webview页面
|
||||
url: `/pages/webView/webView?url=${url}`
|
||||
});
|
||||
// 储值
|
||||
if(shareObj.type == 'shareStored'){
|
||||
getApp().globalData.shareObj = {
|
||||
type : '',
|
||||
goodsId : '',
|
||||
userId : ''
|
||||
}
|
||||
}
|
||||
|
||||
// 商品
|
||||
if(shareObj.type == 'shareGoods' && shareObj.goodsId == right_id){
|
||||
getApp().globalData.shareObj = {
|
||||
type : '',
|
||||
goodsId : '',
|
||||
userId : ''
|
||||
}
|
||||
}
|
||||
|
||||
// 跳转收银台
|
||||
wx.navigateTo({
|
||||
url: "/pages/cashier/cashier?trade_no=" + res.data.trade_no + "&amount=" + this.data.amount + "&is_deliver=" + is_deliver + "&pay_type=rightsPay"
|
||||
})
|
||||
}
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
<text wx:else bindtap="unionOrder">立即购买</text>
|
||||
</view>
|
||||
</block>
|
||||
<view class="rightsBtn" bindtap="ordinary" wx:else>
|
||||
<view class="newrightsBtn" bindtap="ordinary" wx:else>
|
||||
<view class="rightsBtn-text">
|
||||
<view class="rightsBtn-text-num">共:{{num}}件商品 </view>
|
||||
<view>实付:<text>¥{{amount}}</text></view>
|
||||
</view>
|
||||
<button disabled="{{disabled}}">立即购买</button>
|
||||
</view>
|
||||
|
||||
@@ -35,12 +39,9 @@
|
||||
<view style="padding-bottom: 220px">
|
||||
<view class="cont">
|
||||
<view class="contBack">
|
||||
<image class="classBack" src="/static/img/class_back_01.png" mode="scaleToFill"></image>
|
||||
<image class="classBack" src="https://lifetest.ysd-bs.com/storage/materials/2021/08/09/class_back_02.png" mode="scaleToFill"></image>
|
||||
<view class="classCircle"></view>
|
||||
<view class="rightsCont">
|
||||
<view class="rightsCont-tips">
|
||||
{{detail.four_title}}
|
||||
</view>
|
||||
<scroll-view scroll-x class="welfareCont-top" scroll-with-animation>
|
||||
<view class="welfareCont-list-img" wx:for="{{detail.logos}}" wx:key="logos">
|
||||
<image src="{{item}}" mode="aspectFill"></image>
|
||||
@@ -54,40 +55,41 @@
|
||||
</view>
|
||||
|
||||
<view class="rightsNumber">
|
||||
<text>数量</text>
|
||||
<image class="rightsGoods-img" src="{{detail.goods_cover}}" mode="aspectFill"></image>
|
||||
<view class="rightsGoods">
|
||||
<view class="nowrap rightsGoods-text">
|
||||
{{detail.title}}
|
||||
</view>
|
||||
<view class="rightsGoods-price">
|
||||
<view class="rightsGoods-number"><text>¥</text>{{detail.amount}}</view>
|
||||
<view class="rightsAdd">
|
||||
<view class="rightsAdd-btn" bindtap="goodsNumber" data-type="remove">-</view>
|
||||
<view class="rightsAdd-btn rightsAdd-remove {{num != 1 ? 'active' : ''}}" bindtap="goodsNumber" data-type="remove">-</view>
|
||||
<input class="rightsAdd-input" data-num="{{num}}" value="{{num}}" type="number" maxlength='4'
|
||||
bindblur="goodsNumberInput"></input>
|
||||
<view class="rightsAdd-btn" bindtap="goodsNumber" data-type="plus">+</view>
|
||||
bindblur="goodsNumberInput" disabled></input>
|
||||
<view class="rightsAdd-btn rightsAdd-plus" bindtap="goodsNumber" data-type="plus">+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 抵扣 -->
|
||||
<view class="rightsList" style="padding: 0 0 2rpx">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">{{detail.attribute.form_type}}</view>
|
||||
<view class="rightsLabel-right rightsLabel-red">-¥{{score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 规格 -->
|
||||
<view class="rightsList" style="margin-top:50rpx">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">{{detail.attribute.form_price}}</view>
|
||||
<view class="rightsLabel-right">¥{{moreAmount}}</view>
|
||||
</view>
|
||||
<view class="rightsList" wx:if="{{detail.type == 'physical'}}">
|
||||
<view class="rightsLabel" wx:if="{{platIndex == 1}}">
|
||||
<view class="rightsLabel-left">电子券</view>
|
||||
<view class="rightsLabel-right">{{detail.qty}}张</view>
|
||||
</view>
|
||||
<!-- <view class="rightsLabel">
|
||||
<view class="rightsLabel-left">需要兑换的积分</view>
|
||||
<view class="rightsLabel-right">{{detail.score}}</view>
|
||||
</view> -->
|
||||
<!-- <view class="rightsLabel">
|
||||
<view class="rightsLabel-left">卡余额抵扣</view>
|
||||
<view class="rightsLabel-right">-¥0.00</view>
|
||||
</view> -->
|
||||
<!-- <view class="rightsLabel">
|
||||
<view class="rightsLabel-left">总金额</view>
|
||||
<view class="rightsLabel-right">¥{{detail.price}}</view>
|
||||
</view> -->
|
||||
|
||||
<block wx:if="{{detail.type == 'physical'}}">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">请选择提交方式</view>
|
||||
<view class="rightsLabel-left">提交方式</view>
|
||||
<view class="rightsLabel-right rightsLabel-range">
|
||||
<picker range="{{platformCp}}" range-key="name" bindchange="platBind">
|
||||
<view class="tabs-text">
|
||||
@@ -98,68 +100,32 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="rightsLabel rightsLabel-address" wx:if="{{platformCp[platIndex].name == '快递'}}">
|
||||
<view class="rightsLabel-left">收货地址</view>
|
||||
<image class="rightsLabel-icon" src="/static/img/new_rightsAddress.png"></image>
|
||||
<block wx:if="{{address != ''}}">
|
||||
<view class="rightsLabel-right" bindtap="addressTap">
|
||||
<view class="rightsLabel-address-text">
|
||||
<view class="rightsLabel-address-name">{{address.name}}<view class="rightsLabel-address-tel">{{address.mobile}}</view></view>
|
||||
<text class="nowrap">{{address.all_address}}</text>
|
||||
</view>
|
||||
<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<navigator class="rightsLabel-right" hover-class="none"
|
||||
url="/pages/address_form/address_form?type=Add">
|
||||
添加收货地址<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
<navigator class="rightsLabel-right" hover-class="none" url="/pages/address_form/address_form?type=Add">
|
||||
<view class="rightsLabel-address-text" style="line-height: 90rpx;">
|
||||
添加收货地址
|
||||
</view>
|
||||
<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<view class="rightsLabel" wx:if="{{platformCp[platIndex].name == '快递'}}">
|
||||
<view class="rightsLabel-left">快递运费</view>
|
||||
<view class="rightsLabel-right">¥{{freight}}</view>
|
||||
<view class="rightsLabel-right rightsLabel-freight">¥{{freight}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="rightsList" style="padding: 0 0 2rpx">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">{{detail.attribute.form_type}}</view>
|
||||
<view class="rightsLabel-right rightsLabel-red">¥{{detail.score}}</view>
|
||||
</view>
|
||||
<view class="rightsLabel uni-border-top">
|
||||
<view class="rightsLabel-left">{{detail.attribute.form_pay}}</view>
|
||||
<view class="rightsLabel-right rightsLabel-score">¥{{amount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式 -->
|
||||
<view class="rightsList">
|
||||
<view class="rightsLabel">
|
||||
<view class="rightsLabel-left">请选择支付方式</view>
|
||||
<view class="rightsLabel-right rightsLabel-range">
|
||||
<picker range="{{payWay}}" range-key="name" bindchange="payBind">
|
||||
<view class="tabs-text">
|
||||
{{payWay[payWayIndex].name}}
|
||||
</view>
|
||||
</picker>
|
||||
<image class="rightsLabel-row" src="/static/icon/rightsArrow.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rightsLabel-pay">
|
||||
<view class="rightsLabel-left">支付方式</view>
|
||||
<view class="rightsLabel-right">{{payWay[payWayIndex].name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 自提商家 -->
|
||||
<!-- <view class="detailsStore" wx:if="{{platIndex == 0}}">
|
||||
<view class="detailsStore-top">
|
||||
自提门店
|
||||
</view>
|
||||
<view class="detailsStore-see">
|
||||
<text>查看提货点信息</text>
|
||||
<image src="/static/icon/storeArrow.png"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 购买须知 -->
|
||||
<view class="notice">
|
||||
<view class="noticeTitle" bindtap="noticeTap">
|
||||
@@ -201,14 +167,6 @@
|
||||
{{item.all_address}}
|
||||
</view>
|
||||
<view class="address-tool-icon">选择地址</view>
|
||||
<!-- <view class="address-tool">
|
||||
<view class="address-tool-btn" bindtap="addressEdit" data-id="">编辑地址</view>
|
||||
<view class="address-tool-btn address-tool-btn-del">删除地址</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="webBack {{webShow == true ? '' : 'active'}}">
|
||||
获取失败,请重新获取
|
||||
</view> -->
|
||||
@@ -1,5 +1,5 @@
|
||||
page {
|
||||
background-color: #f7f7f7;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.cont {
|
||||
@@ -12,7 +12,7 @@ page {
|
||||
.contBack {
|
||||
position: relative;
|
||||
width: 200%;
|
||||
height: 400rpx;
|
||||
height: 340rpx;
|
||||
left: -50%;
|
||||
text-align: center;
|
||||
background: #000000;
|
||||
@@ -20,22 +20,11 @@ page {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* .contBack::after {
|
||||
width: 100%;
|
||||
height: 30rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
content: '';
|
||||
background-image: linear-gradient(transparent, rgba(0,0,0,.25));
|
||||
} */
|
||||
|
||||
.classBack {
|
||||
position: absolute;
|
||||
left: 30%;
|
||||
left: 28%;
|
||||
right: 30%;
|
||||
width: 40%;
|
||||
width: 44%;
|
||||
top: 40rpx;
|
||||
}
|
||||
|
||||
@@ -69,18 +58,19 @@ page {
|
||||
.rightsCont {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: calc(30% - 2rpx);
|
||||
left: calc(28% - 2rpx);
|
||||
right: calc(30% - 2rpx);
|
||||
width: calc(40% + 4rpx);
|
||||
top: 58rpx;
|
||||
width: calc(44% + 4rpx);
|
||||
top: 50rpx;
|
||||
}
|
||||
|
||||
.rightsCont-btn {
|
||||
background-color: #f4dfcc;
|
||||
background: rgba(255, 255, 0255, .4);
|
||||
width: 100%;
|
||||
line-height: 70rpx;
|
||||
font-size: 38rpx;
|
||||
color: #694425;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -90,16 +80,43 @@ page {
|
||||
}
|
||||
|
||||
.rightsNumber {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin: 30px 0 20px;
|
||||
padding: 0 30rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
padding: 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsNumber text {
|
||||
display: inline-block;
|
||||
.rightsGoods-img {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.rightsGoods {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 80rpx 40rpx 0 270rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rightsGoods-text {
|
||||
margin-bottom: 40rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rightsGoods-price {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.rightsGoods-number {
|
||||
flex: 1;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.rightsGoods-number>text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.rightsAdd {
|
||||
@@ -107,9 +124,7 @@ page {
|
||||
}
|
||||
|
||||
.rightsAdd-btn {
|
||||
background: #eaeaea;
|
||||
color: #535353;
|
||||
border-radius: 50%;
|
||||
border-radius: 4rpx;
|
||||
text-align: center;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
@@ -118,6 +133,17 @@ page {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rightsAdd-remove {
|
||||
background: #f8f8f8;
|
||||
color: #d9d9d9;
|
||||
}
|
||||
|
||||
.rightsAdd-remove.active,
|
||||
.rightsAdd-plus {
|
||||
background: #e8e4e5;
|
||||
color: #6b6768;
|
||||
}
|
||||
|
||||
.rightsAdd-input {
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
@@ -136,18 +162,18 @@ page {
|
||||
.notice,
|
||||
.detailsStore {
|
||||
background: white;
|
||||
margin: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 10rpx 0;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 30rpx rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
.rightsLabel,
|
||||
.rightsLabel-pay {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
color: #6f7880;
|
||||
padding: 20rpx 40rpx;
|
||||
color: #6c6c6c;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
@@ -156,6 +182,37 @@ page {
|
||||
color: #747d86;
|
||||
}
|
||||
|
||||
.rightsLabel .rightsLabel-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address .rightsLabel-right {
|
||||
width: calc(100% - 90rpx);
|
||||
margin-left: 20rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.rightsLabel-address .rightsLabel-row {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-name {
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-tel {
|
||||
padding-left: 30rpx;
|
||||
color: #959595;
|
||||
}
|
||||
|
||||
.rightsLabel-freight {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.rightsLabel-black {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
@@ -167,9 +224,9 @@ page {
|
||||
}
|
||||
|
||||
.rightsLabel-row {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin: 2rpx 0 0 6rpx;
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
margin: 0 0 0 6rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-black .rightsLabel-right,
|
||||
@@ -198,7 +255,7 @@ page {
|
||||
}
|
||||
|
||||
.notice {
|
||||
padding: 20rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.noticeTitle {
|
||||
@@ -279,14 +336,18 @@ page {
|
||||
}
|
||||
|
||||
/* 购买按钮 */
|
||||
.rightsBtn {
|
||||
.rightsBtn,
|
||||
.newrightsBtn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
height: 160rpx;
|
||||
z-index: 9;
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.rightsBtn button,
|
||||
@@ -303,6 +364,33 @@ page {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.rightsBtn-text {
|
||||
flex: 1;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.rightsBtn-text-num {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.rightsBtn-text text {
|
||||
font-size: 38rpx;
|
||||
color: #fe2d55;
|
||||
}
|
||||
|
||||
.newrightsBtn button {
|
||||
width: 280rpx !important;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
border-radius: 80rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.rightsBtn.active text {
|
||||
background: #dedede;
|
||||
@@ -391,6 +479,27 @@ page {
|
||||
|
||||
.rightsLabel-address {
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin: 10rpx 0;
|
||||
padding: 25rpx 40rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address::after,
|
||||
.rightsLabel-address::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 30rpx;
|
||||
width: calc(100% - 60rpx);
|
||||
height: 2rpx;
|
||||
background-color: #bfbfbf;
|
||||
}
|
||||
|
||||
.rightsLabel-address::after {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.rightsLabel-address::before {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.rightsLabel-address text {
|
||||
@@ -403,6 +512,10 @@ page {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.rightsLabel-address-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.address-tool {
|
||||
display: flex;
|
||||
float: right;
|
||||
@@ -445,8 +558,8 @@ page {
|
||||
.rightsPoint {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 100rpx;
|
||||
background: #fff;
|
||||
bottom: 160rpx;
|
||||
background: #eeeeee;
|
||||
z-index: 9;
|
||||
width: 100%;
|
||||
padding: 20rpx 20rpx 10rpx;
|
||||
@@ -455,8 +568,7 @@ page {
|
||||
|
||||
.rightsPoint-cont {
|
||||
width: 100%;
|
||||
background: #fff8e5;
|
||||
border: 2rpx solid #f2ecde;
|
||||
background: #eeeeee;
|
||||
border-radius: 10rpx;
|
||||
position: relative;
|
||||
max-height: 50vh;
|
||||
@@ -466,7 +578,7 @@ page {
|
||||
.rightsPoint-top {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
padding: 0 20rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -518,7 +630,7 @@ page {
|
||||
.pointMore {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: #fff8e5;
|
||||
background: #eeeeee;
|
||||
height: 80rpx;
|
||||
line-height: 82rpx;
|
||||
position: relative;
|
||||
@@ -589,6 +701,7 @@ page {
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 50rpx 0 20rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.welfareCont-list-img {
|
||||
|
||||
@@ -106,7 +106,6 @@ Page({
|
||||
cityList = this.data.cityList,
|
||||
areas = this.data.areas,
|
||||
regiList = this.data.regiList
|
||||
|
||||
if(!addressInfo){
|
||||
province_id = areas[areaIndex].code
|
||||
city_id = cityList[cityIndex].code
|
||||
@@ -149,7 +148,7 @@ Page({
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -166,7 +165,7 @@ Page({
|
||||
regiList : regiList,
|
||||
regiIndex : regiIndex
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ Page({
|
||||
storeinfo : res.data,
|
||||
distance : distance
|
||||
})
|
||||
})
|
||||
}).catch(err => {});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,10 +26,16 @@ Page({
|
||||
type : 'silver'
|
||||
},
|
||||
{
|
||||
id : 2,
|
||||
id : 1,
|
||||
src : '/static/img/user_card_02.png',
|
||||
color : '#192b4c',
|
||||
type : 'drill'
|
||||
},
|
||||
{
|
||||
id : 2,
|
||||
src : '/static/img/user_card_01.png',
|
||||
color : '#ff8f00',
|
||||
type : 'balance'
|
||||
}
|
||||
],
|
||||
autoplay: false,
|
||||
@@ -43,6 +49,11 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'parentId',
|
||||
data : options.parent_id
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
@@ -77,6 +88,12 @@ Page({
|
||||
*/
|
||||
userInfo() {
|
||||
wx.$api.user.index().then(res=>{
|
||||
// 是否设置过密码缓存
|
||||
wx.setStorage({
|
||||
key : 'hasPaypass',
|
||||
data : res.data.info.has_paypass
|
||||
})
|
||||
|
||||
this.setData({
|
||||
infos : res.data.info,
|
||||
order : res.data.order,
|
||||
@@ -94,6 +111,30 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理账户积分跳转
|
||||
*/
|
||||
swiperNav(e) {
|
||||
let newType = e.currentTarget.dataset.type
|
||||
if(this.data.isUser){
|
||||
if(newType == "balance"){
|
||||
wx.navigateTo({
|
||||
url: '/pages/myBalance/myBalance'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
wx.navigateTo({
|
||||
url: "/pages/account/account?type=" + newType
|
||||
})
|
||||
}else{
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,15 @@
|
||||
<view class="userHead">
|
||||
<view class="userHead-img">
|
||||
<image src="{{infos.avatar}}" mode="aspectFill"></image>
|
||||
<view class="userHead-tips {{infos.identity.identity_id == 0 ? '' : 'active'}}">{{infos.identity.identity_id == 0 ? '普通用户':'惠生活会员'}}</view>
|
||||
<view class="userHead-tips default" wx:if="{{infos.identity.identity_id == 0}}">
|
||||
{{infos.identity.name}}
|
||||
</view>
|
||||
<view class="userHead-tips super" wx:elif="{{infos.identity.identity_id == 1}}">
|
||||
<image src="/static/img/user_identity_00.png"></image><text>{{infos.identity.name}}</text>
|
||||
</view>
|
||||
<view class="userHead-tips sage" wx:else>
|
||||
<image src="/static/img/user_identity_01.png"></image><text>{{infos.identity.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="userHead-text">
|
||||
<view class="userHead-name">
|
||||
@@ -36,23 +44,26 @@
|
||||
<view class="userCard-cont">
|
||||
<view class="userCard-clip">
|
||||
<swiper class="userCard-swiper" autoplay="{{swiper.autoplay}}" interval="{{swiper.interval}}" duration="{{swiper.duration}}" current="{{currentId}}">
|
||||
<swiper-item class="userCard-item" bindtap="userNav" data-url="/pages/account/account?type={{item.type}}" wx:for="{{swiper.imgUrls}}" wx:key="swiper">
|
||||
<!-- <swiper-item class="userCard-item" bindtap="swiperNav" data-type="{{item.type}}" wx:for="{{swiper.imgUrls}}" wx:key="swiper">
|
||||
<image class="userCard-img" src="{{item.src}}" mode="scaleToFill" bindtap="bannerTap" data-id="{{item.id}}"></image>
|
||||
<view class="userCard-parice" style="color:{{item.color}}" wx:if="{{isUser}}"><text>可用余额:</text>
|
||||
<block wx:if="{{item.id == 0}}">{{account.silver}}</block>
|
||||
<block wx:if="{{item.id == 1}}">{{account.gold}}</block>
|
||||
<block wx:if="{{item.id == 2}}">{{account.drill}}</block>
|
||||
<!-- 0.00 -->
|
||||
<block wx:if="{{item.id == 2}}">{{account.balance}}</block>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<!-- <swiper-item class="userCard-item" bindtap="userNav" data-url="">
|
||||
<image class="userCard-img" src="/static/img/user_card_01.png" mode="scaleToFill" bindtap="bannerTap" data-id="{{item.goods_id}}"></image>
|
||||
<view class="userCard-parice" style="color: #f79210" wx:if="{{isUser}}"><text>余额:</text>{{infos.account.gold}}</view>
|
||||
</swiper-item>
|
||||
<swiper-item class="userCard-item" bindtap="userNav" data-url="">
|
||||
<image class="userCard-img" src="/static/img/user_card_02.png" mode="scaleToFill" bindtap="bannerTap" data-id="{{item.goods_id}}"></image>
|
||||
<view class="userCard-parice" style="color: #192b4c" wx:if="{{isUser}}"><text>余额:</text>{{infos.account.drill}}</view>
|
||||
</swiper-item> -->
|
||||
<swiper-item class="userCard-item" bindtap="swiperNav" data-type="silver">
|
||||
<image class="userCard-img" src="/static/img/user_card_00.png" mode="scaleToFill" bindtap="bannerTap" data-id="0"></image>
|
||||
<view class="userCard-parice" style="color: #676869" wx:if="{{isUser}}"><text>可用余额:</text>{{account.silver}}</view>
|
||||
</swiper-item>
|
||||
<swiper-item class="userCard-item" bindtap="swiperNav" data-type="drill">
|
||||
<image class="userCard-img" src="/static/img/user_card_02.png" mode="scaleToFill" bindtap="bannerTap" data-id="1"></image>
|
||||
<view class="userCard-parice" style="color: #192b4c" wx:if="{{isUser}}"><text>可用余额:</text>{{account.drill}}</view>
|
||||
</swiper-item>
|
||||
<swiper-item class="userCard-item" bindtap="swiperNav" data-type="balance" wx:if="{{infos.identity.identity_id != 0}}">
|
||||
<image class="userCard-img" src="/static/img/user_card_01.png" mode="scaleToFill" bindtap="bannerTap" data-id="2"></image>
|
||||
<view class="userCard-parice" style="color: #ff8f00" wx:if="{{isUser}}"><text>可用余额:</text>{{account.balance}}</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<image src="/static/icon/arrow_left.png" class='userCard-arrow-left' bindtap='nextImg'></image>
|
||||
@@ -169,3 +180,34 @@
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 我的工具 -->
|
||||
<view class="userCard" wx:if="{{isUser}}">
|
||||
<view class="userCard-title">我的工具</view>
|
||||
<view class="userOrder">
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/userStored/userStored" wx:if="{{infos.identity.identity_id != 0}}">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_07.png"></image>
|
||||
</view>
|
||||
<text>储值分享</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/userGoods/userGoods" wx:if="{{infos.identity.identity_id != 0}}">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_08.png"></image>
|
||||
</view>
|
||||
<text>产品分享</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/favour/favour">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_09.png"></image>
|
||||
</view>
|
||||
<text>红包赠予</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/password_set/password_set">
|
||||
<view class="userOrder-icon active">
|
||||
<image src="/static/img/userOrder_10.png"></image>
|
||||
</view>
|
||||
<text>支付密码</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -7,18 +7,18 @@
|
||||
}
|
||||
|
||||
.userHead-img {
|
||||
width: 135rpx;
|
||||
height: 135rpx;
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userHead-img image {
|
||||
.userHead-img>image {
|
||||
position: absolute;
|
||||
left: 22rpx;
|
||||
left: 10rpx;
|
||||
top: 0;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@@ -27,27 +27,53 @@
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.userHead-img view {
|
||||
display: inline-block;
|
||||
.userHead-img .userHead-tips {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 10rpx;
|
||||
background: #c6c6c6;
|
||||
border-radius: 30rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
padding: 4rpx 0;
|
||||
width: 140rpx;
|
||||
text-align: center;
|
||||
width: 130rpx;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: #c6c6c6;
|
||||
color: #fff;
|
||||
border-radius: 30rpx;
|
||||
height: 42rpx;
|
||||
line-height: 40rpx;
|
||||
display: inline-block;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.userHead-img view.active {
|
||||
width: 144rpx;
|
||||
left: 8rpx;
|
||||
|
||||
.userHead-img .userHead-tips.super,
|
||||
.userHead-img .userHead-tips.sage {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.userHead-img .userHead-tips.default {
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userHead-img text {
|
||||
font-size: 22rpx;
|
||||
color: transparent;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.userHead-img view.super text {
|
||||
background-image: linear-gradient(135deg,#bcbcbc,#f1f1f1, #bcbcbc);
|
||||
-webkit-background-clip:text;
|
||||
}
|
||||
|
||||
.userHead-img view.sage text {
|
||||
background-image: linear-gradient(135deg,#d4ac02,#fffa9a, #e0b500);
|
||||
-webkit-background-clip:text;
|
||||
}
|
||||
|
||||
.userHead-tips image {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 5rpx;
|
||||
vertical-align: -2rpx;
|
||||
}
|
||||
|
||||
.userHead-text {
|
||||
@@ -74,7 +100,7 @@
|
||||
|
||||
.userHead-name {
|
||||
margin: 10rpx 0 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -89,7 +115,7 @@
|
||||
}
|
||||
|
||||
.userHead-tel {
|
||||
font-size: 28rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
/* 轮播图 */
|
||||
|
||||
218
pages/userGoods/goodsCode/goodsCode.js
Normal file
218
pages/userGoods/goodsCode/goodsCode.js
Normal file
@@ -0,0 +1,218 @@
|
||||
// pages/userGoods/goodsCode/goodsCode.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
qrcode : '', //二维码
|
||||
Picture : 'https://lifetest.ysd-bs.com/storage/materials/2021/08/06/shareImg.jpg', //海报图片
|
||||
rightId : '', //产品id
|
||||
userInfo : '', //我的信息
|
||||
isImgLay : false, //是否显示图片弹出层
|
||||
parentId : '', //是否分享进入
|
||||
shareState : false, //显示分享朋友圈弹出层
|
||||
pageDown : '', //下载海报和展示海报
|
||||
pageShare : '', //分享好友朋友圈海报
|
||||
profitText : '', //奖励文字
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
this.setData({
|
||||
rightId : options.rightid,
|
||||
parentId: options.parent_id
|
||||
})
|
||||
|
||||
// 获取二维码
|
||||
wx.$api.user.publicCode('mini', 'goods', 'pages/userGoods/goodsDet/goodsDet?rightid=' + options.rightid + '&type=shareGoods').then(res=>{
|
||||
this.setData({
|
||||
qrcode : res.data.qrcode,
|
||||
userInfo : res.data.user
|
||||
})
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 获取分享海报图
|
||||
this.posterShow();
|
||||
},
|
||||
|
||||
/**
|
||||
* 分享海报图
|
||||
*/
|
||||
posterShow(){
|
||||
wx.$api.user.productPoster(this.data.rightId).then(res=>{
|
||||
this.setData({
|
||||
pageDown : res.data.cover,
|
||||
pageShare : res.data.wechat_cover,
|
||||
profitText: res.data.profit_text
|
||||
})
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 预览图片
|
||||
*/
|
||||
bigPicture(e) {
|
||||
wx.previewImage({
|
||||
current : e.currentTarget.dataset.src,
|
||||
urls : [e.currentTarget.dataset.src]
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 分享朋友圈弹出层状态
|
||||
*/
|
||||
shareShow() {
|
||||
this.setData({
|
||||
shareState: !this.data.shareState
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 绘图
|
||||
*/
|
||||
dowImg(){
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
|
||||
let downImg = new Promise(success=>{
|
||||
wx.getImageInfo({
|
||||
src : this.data.pageDown,
|
||||
success : res => {
|
||||
success(res.path)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 下载素材
|
||||
let codeImg = new Promise(success => {
|
||||
wx.getImageInfo({
|
||||
src : this.data.qrcode,
|
||||
success : res => {
|
||||
success(res.path)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Promise.all([codeImg, downImg]).then(res => {
|
||||
// 绘制海报
|
||||
const ctx = wx.createCanvasContext('qrcodeCard')
|
||||
ctx.save()
|
||||
|
||||
// 绘制背景
|
||||
ctx.drawImage(res[1], 0, 0, 375, 650)
|
||||
|
||||
// 绘制白色背景
|
||||
ctx.drawImage('/static/img/goodsCode_white.png', 30, 460, 120, 120)
|
||||
|
||||
// 绘制二维码
|
||||
ctx.drawImage(res[0], 40, 470, 100, 100)
|
||||
|
||||
ctx.save();
|
||||
ctx.beginPath(); //开始绘制
|
||||
ctx.arc(70 / 2 + 156, 70 / 2 + 250, 70 / 2, 0, Math.PI * 2, false);
|
||||
ctx.clip();
|
||||
|
||||
// 保存图片
|
||||
ctx.draw(true, () => {
|
||||
wx.hideLoading()
|
||||
wx.canvasToTempFilePath({
|
||||
canvasId: 'qrcodeCard',
|
||||
x: 0,
|
||||
y: 0,
|
||||
success: res => {
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success : res=>{
|
||||
wx.showToast({
|
||||
title: '分享海报已保存至相册',
|
||||
icon : 'none'
|
||||
})
|
||||
},
|
||||
fail : err=>{
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '暂未授权小程序写入您的相册,无法存储二维码海报',
|
||||
confirmColor: '#d82526',
|
||||
confirmText : '去设置',
|
||||
success : info=>{
|
||||
if (info.confirm){
|
||||
wx.openSetting()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
complete: e => {}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}).catch(err=>{
|
||||
wx.showToast({
|
||||
title: '海报下载,请检查网络',
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 图片弹出层
|
||||
*/
|
||||
removeSaveImg(){
|
||||
this.setData({
|
||||
isImgLay: !this.data.isImgLay
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存图片到本地
|
||||
*/
|
||||
saveImg(){
|
||||
this.dowImg();
|
||||
this.setData({
|
||||
isImgLay: !this.data.isImgLay
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 分享
|
||||
*/
|
||||
onShareAppMessage(){
|
||||
return {
|
||||
title : this.data.userInfo.nickname + "邀请您进入本时生活",
|
||||
path : "/pages/userGoods/goodsDet/goodsDet?parent_id=" + this.data.userInfo.user_id + "&rightid=" + this.data.rightId + "&type=shareGoods",
|
||||
imageUrl: this.data.pageShare
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享朋友圈
|
||||
*/
|
||||
// onShareTimeline: function () {
|
||||
// return {
|
||||
// title : this.data.userInfo.nickname + "邀请您进入本时生活",
|
||||
// path : "/pages/userGoods/goodsDet/goodsDet?parent_id=" + this.data.userInfo.user_id + "&rightid=" + this.data.rightId + "&type=shareGoods",
|
||||
// imageUrl: this.data.pageShare
|
||||
// }
|
||||
// }
|
||||
})
|
||||
3
pages/userGoods/goodsCode/goodsCode.json
Normal file
3
pages/userGoods/goodsCode/goodsCode.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
69
pages/userGoods/goodsCode/goodsCode.wxml
Normal file
69
pages/userGoods/goodsCode/goodsCode.wxml
Normal file
@@ -0,0 +1,69 @@
|
||||
<view class="codeTitle">
|
||||
<image src="/static/img/userGoods_title.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<!-- 分享弹出 -->
|
||||
<view class="goodsBack"></view>
|
||||
<view class="goodsPop">
|
||||
<view class="goodsTab">
|
||||
<navigator hover-class="none" url="/pages/userGoods/goodsDet/goodsDet" class="goodsTab-label">产品海报</navigator>
|
||||
<!-- <view class="goodsTab-label">产品海报</view> -->
|
||||
<!-- <view class="goodsTab-label active">产品图片</view> -->
|
||||
</view>
|
||||
<view class="goodsTitle">
|
||||
<image src="/static/img/shareTitle.png" mode="aspectFill"></image>{{profitText}}
|
||||
</view>
|
||||
<view class="goodsPoster">
|
||||
<image bindtap="bigPicture" data-src="{{pageDown}}" src="{{pageDown}}" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="goodsScroll-text">29.9元享39元【清雅水境养生沐浴】门票一张!静心,浴享,保健。尊享洗浴,尽在清雅水境!</view>
|
||||
|
||||
<view class="goodsTool">
|
||||
<button class="codeShare-label codeShare-button" open-type="share" hover-class="none">
|
||||
<image src="/static/img/code_icon_00.png"></image>
|
||||
微信好友
|
||||
</button>
|
||||
<!-- <view class="codeShare-label" bindtap="shareShow">
|
||||
<image src="/static/img/code_icon_01.png"></image>
|
||||
朋友圈
|
||||
</view> -->
|
||||
<view class="codeShare-label" bindtap="removeSaveImg" hover-class="none">
|
||||
<image src="/static/img/code_icon_02.png"></image>
|
||||
生成海报
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 朋友圈提示弹出 -->
|
||||
<view class="sharePop" wx:if="{{shareState}}" bindtap="shareShow">
|
||||
<image class="sharePop-row" src="/static/img/code_share_01.png" mode="widthFix"></image>
|
||||
<view class="shareList">
|
||||
<view class="shareLabel">
|
||||
<text>1</text>
|
||||
点击右上角<image src="/static/img/code_share_00.png" mode="aspectFill"></image>打开菜单
|
||||
</view>
|
||||
<view class="shareLabel">
|
||||
<text>2</text>
|
||||
选择菜单<image src="/static/img/code_share_02.png" mode="aspectFill"></image>分享朋友圈
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 海报canvas -->
|
||||
<canvas class="canvasImg" canvas-id="qrcodeCard"></canvas>
|
||||
|
||||
<!-- 图片弹出层 -->
|
||||
<view class="user-lay sign-img-lay" wx:if="{{isImgLay}}">
|
||||
<view class="user-back">
|
||||
<image class="user-back-img" src="{{pageDown}}" mode="widthFix"></image>
|
||||
<view class="user-back-cont">
|
||||
<image src="{{qrcode}}" mode="aspectFill"></image>
|
||||
<!-- <view class="codeBack-yard-name">
|
||||
扫码进入
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<button class="sign-img-btn" size="mini" bindtap="saveImg">保存到相册</button>
|
||||
<button class="sign-img-btn remove-btn" size="mini" bindtap="removeSaveImg">取消</button>
|
||||
</view>
|
||||
279
pages/userGoods/goodsCode/goodsCode.wxss
Normal file
279
pages/userGoods/goodsCode/goodsCode.wxss
Normal file
@@ -0,0 +1,279 @@
|
||||
.codeTitle {
|
||||
width: 100%;
|
||||
background-color: #222222;
|
||||
border-radius: 0 0 300rpx 300rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 20rpx 0;
|
||||
}
|
||||
|
||||
.codeTitle image {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
border-radius: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
.goodsBack {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
||||
.goodsPop {
|
||||
height: 84vh;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.goodsTab {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.goodsTab-label {
|
||||
background-color: #dadada;
|
||||
flex: 2;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
line-height: 90rpx;
|
||||
border-radius: 40rpx 40rpx 0 0;
|
||||
/* border-radius: 0 40rpx 0 30rpx; */
|
||||
}
|
||||
|
||||
.goodsTab-label.active {
|
||||
background-color: #ffffff;
|
||||
border-radius: 40rpx 30rpx 0 0;
|
||||
margin-top: -20rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.goodsTitle {
|
||||
background-color: #1f1f1f;
|
||||
color: #eed4ae;
|
||||
border-radius: 25rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
margin: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goodsTitle image {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin: 22rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.goodsTitle::after {
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: calc(50% - 20rpx);
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 20rpx solid transparent;
|
||||
border-right: 20rpx solid transparent;
|
||||
border-top: 16rpx solid #1f1f1f;
|
||||
}
|
||||
|
||||
.goodsPoster {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 50vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.goodsPoster image {
|
||||
width: 55%;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.goodsScroll-text {
|
||||
background-color: #ffffff;
|
||||
position: absolute;
|
||||
bottom: 160rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 20rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.goodsTool {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
background-color: #ffffff;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.codeShare-label {
|
||||
flex: 3;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 0 !important;
|
||||
width: 33.33%;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.codeShare-label image {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
display: block;
|
||||
margin: 0 auto 10rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 朋友圈弹出层 */
|
||||
.sharePop {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sharePop-row {
|
||||
width: 140rpx;
|
||||
position: fixed;
|
||||
right: 110rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.shareList {
|
||||
color: #ffffff;
|
||||
line-height: 60rpx;
|
||||
font-weight: 700;
|
||||
font-size: 36rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 30%;
|
||||
}
|
||||
|
||||
.shareLabel {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.shareLabel image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin: 0 20rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.shareLabel text {
|
||||
display: inline-block;
|
||||
background: #0696ca;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
border-radius: 50%;
|
||||
margin: 8rpx 10rpx 0 0;
|
||||
}
|
||||
|
||||
/* canvas */
|
||||
.canvasImg {
|
||||
position: absolute;
|
||||
left: -1000%;
|
||||
height: 650px;
|
||||
width: 375px;
|
||||
background: #e3e2e2;
|
||||
}
|
||||
|
||||
|
||||
/* 弹窗背景图 */
|
||||
.user-lay {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 图片弹出层 */
|
||||
.sign-img-lay {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sign-img-src {
|
||||
width: 70vw;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.sign-img-btn[size="mini"] {
|
||||
margin-top: 40rpx;
|
||||
background: #f5d48f;
|
||||
font-weight: normal;
|
||||
color: #2f3245;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.remove-btn[size="mini"] {
|
||||
margin-top: 20rpx;
|
||||
background: #101010;
|
||||
color: #e5c175;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* 背景 */
|
||||
.user-back-img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.user-back {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.user-back-cont {
|
||||
background: #ffffff;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
bottom: 120rpx;
|
||||
left: 40rpx;
|
||||
}
|
||||
|
||||
.user-back-cont image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.codeBack-yard-name {
|
||||
width: 100%;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
91
pages/userGoods/goodsDet/goodsDet.js
Normal file
91
pages/userGoods/goodsDet/goodsDet.js
Normal file
@@ -0,0 +1,91 @@
|
||||
// pages/userGoods/goodsDet/goodsDet.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
isUser : false, //用户登录状态
|
||||
qrcode : '', //二维码
|
||||
userInfo : '', //我的信息
|
||||
current : 1, //产品轮播index
|
||||
rightId : '', //产品id
|
||||
parentId : '', //分享人id
|
||||
productData : '', //详情数据
|
||||
productStores : [], //门店列表
|
||||
productContent : '', //图文详情
|
||||
canShare : '' //分享按钮状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad (options) {
|
||||
if(options.type){
|
||||
getApp().globalData.shareObj = {
|
||||
type : options.type,
|
||||
goodsId : options.rightid,
|
||||
userId : options.parent_id
|
||||
}
|
||||
}
|
||||
|
||||
this.setData({
|
||||
rightId : options.rightid
|
||||
})
|
||||
},
|
||||
|
||||
onShow(){
|
||||
// 获取产品详情
|
||||
this.goodsShow();
|
||||
|
||||
this.setData({
|
||||
isUser : getApp().globalData.isUser
|
||||
})
|
||||
},
|
||||
|
||||
// 商品轮播
|
||||
swiperChange(e) {
|
||||
this.setData({
|
||||
current: e.detail.current + 1
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 产品详情
|
||||
*/
|
||||
goodsShow(){
|
||||
wx.$api.user.productInfo(this.data.rightId).then(res=>{
|
||||
this.setData({
|
||||
canShare : res.data.canShare,
|
||||
productData : res.data.info,
|
||||
productStores : res.data.stores,
|
||||
productContent: res.data.info.share.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
|
||||
})
|
||||
}).catch(err=>{
|
||||
if(!err.login){
|
||||
// 写入缓存
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
data : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
userNav(e){
|
||||
let pageUrl = e.currentTarget.dataset.url
|
||||
if(this.data.isUser){
|
||||
wx.navigateTo({
|
||||
url: pageUrl
|
||||
})
|
||||
}else{
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/login?way=shareLogin"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/userGoods/goodsDet/goodsDet.json
Normal file
4
pages/userGoods/goodsDet/goodsDet.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "产品详情"
|
||||
}
|
||||
66
pages/userGoods/goodsDet/goodsDet.wxml
Normal file
66
pages/userGoods/goodsDet/goodsDet.wxml
Normal file
@@ -0,0 +1,66 @@
|
||||
<!-- 轮播 -->
|
||||
<view class="banner">
|
||||
<swiper class="swiperCont" interval="3000" autoplay circular bindchange="swiperChange">
|
||||
<swiper-item wx:for="{{productData.share.pictures}}" wx:key="banner">
|
||||
<image class="swiperImg" src="{{item}}" mode="aspectFill"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="swiperDot" wx:if="{{productData.share.pictures.length > 0}}">
|
||||
{{current}}/{{productData.share.pictures.length}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 权益介绍 -->
|
||||
<view class="content">
|
||||
<view class="contentText">
|
||||
<view class="contentText-title">{{productData.title}}</view>
|
||||
<view class="contentText-text">{{productData.share.description}}</view>
|
||||
<view class="contentText-price">
|
||||
<view class="contentText-price-primary"><text>¥</text>{{productData.price}}</view>
|
||||
<view class="contentText-price-close">门市价¥{{productData.share.cost}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtap="userNav"
|
||||
data-url="/pages/rights/rights?rightsId={{productData.right_config_id}}&parent_id={{parentId}}&type=share"
|
||||
class="contentBuy">立即购买</view>
|
||||
</view>
|
||||
|
||||
<!-- 规格 -->
|
||||
<view class="specs">
|
||||
<view class="specs-label">
|
||||
<text>规格</text>
|
||||
{{productData.share.type_name}}
|
||||
</view>
|
||||
<view class="specs-label">
|
||||
<text>门店</text>
|
||||
<view class="specs-site">
|
||||
<view class="specs-site-list" wx:for="{{productStores}}" wx:key="productStores">
|
||||
<view class="specs-site-name">{{item.title}}</view>
|
||||
{{item.address}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 规格 -->
|
||||
<view class="imageText">
|
||||
<view class="imageText-title">
|
||||
图文详情
|
||||
</view>
|
||||
<view class="imageText-text" wx:if="{{productContent}}">
|
||||
<rich-text nodes="{{productContent}}"></rich-text>
|
||||
</view>
|
||||
<view class="imageText-end">
|
||||
END
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 漂浮窗 -->
|
||||
<movable-area class="indexFloat" wx:if="{{canShare}}">
|
||||
<movable-view y="400" direction="vertical" class="indexFloat-movable">
|
||||
<navigator hover-class="none" url="/pages/userGoods/goodsCode/goodsCode?rightid={{rightId}}"
|
||||
class="indexFloat-img">
|
||||
<image src="/static/img/index_float_01.png" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user