Compare commits
2 Commits
32cc588ae7
...
b4d5b974e1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4d5b974e1 | ||
|
|
0f7c37d548 |
14
api/index.js
@@ -24,6 +24,15 @@ import site from "./interfaces/site"
|
||||
// 个人中心
|
||||
import user from "./interfaces/user"
|
||||
|
||||
// 支付收银台
|
||||
import pay from "./interfaces/pay"
|
||||
|
||||
// 身份认证
|
||||
import idcard from "./interfaces/idcard"
|
||||
|
||||
// 身份认证
|
||||
import withdraw from "./interfaces/withdraw"
|
||||
|
||||
export default {
|
||||
auth,
|
||||
bank,
|
||||
@@ -31,5 +40,8 @@ export default {
|
||||
mall,
|
||||
order,
|
||||
site,
|
||||
user
|
||||
user,
|
||||
pay,
|
||||
idcard,
|
||||
withdraw
|
||||
}
|
||||
@@ -4,29 +4,37 @@
|
||||
*/
|
||||
|
||||
import { req } from "../request"
|
||||
//登录
|
||||
// 登录
|
||||
const Login = data => req({
|
||||
url: "user/auth/login",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
|
||||
//注册
|
||||
// 注册
|
||||
const register = data => req({
|
||||
url: "user/auth/register",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
|
||||
//获取验证码
|
||||
// 获取验证码
|
||||
const getSms = data => req({
|
||||
url: "user/auth/verify",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
|
||||
// 找回密码
|
||||
const resetPassword = data => req({
|
||||
url : "user/auth/reset_password",
|
||||
method : "POST",
|
||||
data
|
||||
})
|
||||
|
||||
export default ({
|
||||
Login,
|
||||
register,
|
||||
getSms
|
||||
getSms,
|
||||
resetPassword
|
||||
})
|
||||
45
api/interfaces/idcard.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
import { req, upload } from "../request"
|
||||
|
||||
// 上传身份证
|
||||
const updIdcard = (path, data) => upload({
|
||||
key : "upload",
|
||||
url : "user/certification/upload",
|
||||
path,
|
||||
data
|
||||
})
|
||||
|
||||
// 提交身份信息
|
||||
const ocr = data => req({
|
||||
url : "user/certification",
|
||||
data,
|
||||
method : "POST"
|
||||
})
|
||||
|
||||
// 获取认证信息
|
||||
const getInfo = () => req({
|
||||
url : "user/certification",
|
||||
})
|
||||
|
||||
// 获取认证地址
|
||||
const signUrl = data => req({
|
||||
url : "user/certification/go_real",
|
||||
data
|
||||
})
|
||||
|
||||
// 获取签约地址
|
||||
const pactUrl = () => req({
|
||||
url : "user/certification/go_contract"
|
||||
})
|
||||
|
||||
export default ({
|
||||
updIdcard,
|
||||
ocr,
|
||||
getInfo,
|
||||
signUrl,
|
||||
pactUrl
|
||||
})
|
||||
@@ -10,6 +10,12 @@ const Banner = () => req({
|
||||
url: "mall/banners"
|
||||
})
|
||||
|
||||
// 身份产品包
|
||||
|
||||
const idpackage = () => req({
|
||||
url: "new/index"
|
||||
})
|
||||
|
||||
//商品分类
|
||||
const Categorie = data => req({
|
||||
url: "mall/categories",
|
||||
@@ -52,6 +58,7 @@ const articlesSee = (article_id) => req({
|
||||
|
||||
export default ({
|
||||
Banner,
|
||||
idpackage,
|
||||
Categorie,
|
||||
Goods,
|
||||
goodsSee,
|
||||
|
||||
26
api/interfaces/pay.js
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
import { req } from "../request"
|
||||
|
||||
// 订单信息
|
||||
const info = data => req({
|
||||
url : "payments/cashier_desk",
|
||||
data: data
|
||||
})
|
||||
|
||||
// 获取支付信息
|
||||
const wechatPay = data => req({
|
||||
url: "payments/cashier_desk/wechat",
|
||||
data
|
||||
})
|
||||
|
||||
// 查询支付结果
|
||||
const payState = trade_id => req({
|
||||
url: "payments/cashier_desk/show",
|
||||
data: { trade_id }
|
||||
})
|
||||
|
||||
export default ({
|
||||
info,
|
||||
wechatPay,
|
||||
payState
|
||||
})
|
||||
@@ -22,8 +22,9 @@ const setting = (key, data) => req({
|
||||
})
|
||||
|
||||
//我的余额首页
|
||||
const account = () => req({
|
||||
url: "user/account/index"
|
||||
const account = data => req({
|
||||
url: "user/account/index",
|
||||
data
|
||||
})
|
||||
|
||||
// 小程序码
|
||||
|
||||
23
api/interfaces/withdraw.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
import { req } from "../request"
|
||||
|
||||
// 账户提现前置
|
||||
const create = () => req({
|
||||
url: "withdraws/index/create",
|
||||
})
|
||||
|
||||
// 提现
|
||||
const withdraws = data => req({
|
||||
url : 'withdraws/index',
|
||||
method : 'POST',
|
||||
data
|
||||
})
|
||||
|
||||
export default ({
|
||||
create,
|
||||
withdraws
|
||||
})
|
||||
@@ -3,8 +3,8 @@
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
import {errInfo} from './err'
|
||||
import {updToken} from './updateToken'
|
||||
import { errInfo } from './err'
|
||||
import { updToken } from './updateToken'
|
||||
|
||||
// 请求方式配置
|
||||
// //正式地址
|
||||
|
||||
3
app.js
@@ -48,6 +48,7 @@ App({
|
||||
},
|
||||
globalData: {
|
||||
isUser : false,
|
||||
barHeight : ''
|
||||
barHeight : '',
|
||||
invite : ''
|
||||
}
|
||||
})
|
||||
10
app.json
@@ -24,7 +24,15 @@
|
||||
"pages/user/team/index",
|
||||
"pages/user/code/code",
|
||||
"pages/bankCard/index",
|
||||
"pages/bankCard/bankAdd/bankAdd"
|
||||
"pages/bankCard/bankAdd/bankAdd",
|
||||
"pages/sign/sign",
|
||||
"pages/idcard/idcard",
|
||||
"pages/idcard/signUrl/signUrl",
|
||||
"pages/idcard/success/success",
|
||||
"pages/idcard/eSign/eSign",
|
||||
"pages/withdraw/withdraw",
|
||||
"pages/pay/success/success",
|
||||
"pages/resetPassword/resetPassword"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
||||
@@ -9,23 +9,26 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
logsArr : [], //列表数据
|
||||
score : '', //数据
|
||||
page : {}, //分页信息
|
||||
lodingStats : false, //加载状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
account : {
|
||||
all_in : '0.00',
|
||||
balance : '0.00',
|
||||
frozen : '0.00'
|
||||
},
|
||||
logsArr : [],
|
||||
page : { current: 1 },
|
||||
pageLoding : false,
|
||||
needSign : false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// 页面数据
|
||||
this.setData({
|
||||
logsArr: [],
|
||||
page : { current: 1 }
|
||||
})
|
||||
// 获取账户信息
|
||||
this.accountInfo()
|
||||
},
|
||||
@@ -33,32 +36,20 @@ Page({
|
||||
/**
|
||||
* 获取账户信息
|
||||
*/
|
||||
accountInfo(page) {
|
||||
accountInfo() {
|
||||
wx.$api.user.account({
|
||||
page: page
|
||||
page: this.data.page.current
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
let listArr = this.data.logsArr,
|
||||
newData = []
|
||||
if(page == 1 || page == undefined) listArr = []
|
||||
newData = listArr.concat(res.data.logs.data)
|
||||
let { all_in, balance, frozen, need_sign, logs } = res.data
|
||||
this.setData({
|
||||
score : res.data,
|
||||
logsArr : newData,
|
||||
page : res.data.logs.page,
|
||||
lodingStats : false
|
||||
account : { all_in, balance, frozen },
|
||||
needSign : need_sign,
|
||||
logsArr : logs.page.current == 1 ? logs.data : this.data.logsArr.concat(logs.data),
|
||||
page : logs.page,
|
||||
pageLoding : !logs.page.has_more
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
}).catch(err => { })
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
// 获取账户信息
|
||||
this.accountInfo();
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -66,13 +57,42 @@ Page({
|
||||
*/
|
||||
onReachBottom(){
|
||||
this.setData({
|
||||
lodingStats: true
|
||||
pageLoding: true
|
||||
})
|
||||
let pageNumber = this.data.page.current
|
||||
if(this.data.page.has_more){
|
||||
pageNumber++
|
||||
// 获取账户信息
|
||||
this.accountInfo(pageNumber);
|
||||
let atpage = this.data.page
|
||||
atpage.current += 1
|
||||
this.setData({
|
||||
page: atpage
|
||||
})
|
||||
this.accountInfo()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 提现
|
||||
*/
|
||||
onWithdraw(){
|
||||
console.log(this.data.needSign)
|
||||
|
||||
if(this.data.needSign){
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '您还未完成实名认证与签约成为VIP用户,暂时无法提现',
|
||||
cancelText : '稍后完成',
|
||||
confirmText : '立即完善',
|
||||
confirmColor : '#da2b54',
|
||||
complete : res => {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/idcard/idcard'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/withdraw/withdraw'
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,50 +1,37 @@
|
||||
<view class="top">
|
||||
<view class="topSee">
|
||||
<view class="topSee-name">账户余额(元)<image src="/static/icons/see_active.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="topSee-number">{{score.balance}}</view>
|
||||
<view class="topSee-name">账户余额(元)</view>
|
||||
<view class="topSee-number">{{account.balance}}</view>
|
||||
</view>
|
||||
<view class="topBtn" wx:if="{{score.can_withdraw}}">提现</view>
|
||||
<view class="topBtn" bind:tap="onWithdraw">提现</view>
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="tab">
|
||||
<view class="tab-item">
|
||||
<view class="tab-name">待发放(元)</view>
|
||||
<view class="tab-number">{{score.frozen}}</view>
|
||||
</view>
|
||||
<view class="tab-item">
|
||||
<view class="tab-name">总收入(元)</view>
|
||||
<view class="tab-number">{{score.all_in}}</view>
|
||||
</view>
|
||||
<!-- 账户统计 -->
|
||||
<view class="tab">
|
||||
<view class="tab-item">
|
||||
<view class="tab-name">待发放(元)</view>
|
||||
<view class="tab-number">{{account.frozen}}</view>
|
||||
</view>
|
||||
<view class="tab-item">
|
||||
<view class="tab-name">总收入(元)</view>
|
||||
<view class="tab-number">{{account.all_in}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收益明细 -->
|
||||
<view class="detailed active">
|
||||
<view class="listTitle">
|
||||
收益明细
|
||||
</view>
|
||||
<view class="listTitle">收益明细</view>
|
||||
<view class="list" wx:if="{{logsArr.length > 0}}">
|
||||
<view class="list-item" wx:for="{{logsArr}}" wx:key="logsArr">
|
||||
<view class="item-top">
|
||||
<view class="item-name">
|
||||
当月贡献发放
|
||||
</view>
|
||||
<view class="item-time">
|
||||
2023-05-22
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-number">
|
||||
+100
|
||||
<view class="item-text">
|
||||
<view class="item-name">{{item.remark}}</view>
|
||||
<view class="item-time">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="item-number">{{item.amount}}</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 class="pagesLoding" wx:if="{{pageLoding}}">
|
||||
<view wx:if="{{page.has_more}}"><image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...</view>
|
||||
<view wx:else>没有更多了~</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pages-no" wx:else>
|
||||
|
||||
@@ -1,126 +1,27 @@
|
||||
page {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
page { background-color: #f6f6f6; }
|
||||
|
||||
.top {
|
||||
background-image: linear-gradient(to bottom, #dc3159, #f46284);
|
||||
color: #ffffff;
|
||||
padding: 40rpx 40rpx 120rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
/* 账户余额 */
|
||||
.top { background-image: linear-gradient(to bottom, #dc3159, #f46284); color: #ffffff; padding: 40rpx 40rpx 120rpx; box-sizing: border-box; display: flex; align-items: center; }
|
||||
.topSee { width: calc(100% - 180rpx); padding-right: 30rpx; box-sizing: border-box; }
|
||||
.topSee-name { line-height: 40rpx; font-size: 30rpx; align-items: center; }
|
||||
.topSee-number { font-size: 64rpx; letter-spacing: 2rpx; font-weight: bold; }
|
||||
.topBtn { background-color: #ffffff; display: inline-block; color: #da2b54; line-height: 74rpx; border-radius: 37rpx; width: 180rpx; text-align: center; font-weight: bold; font-size: 32rpx; }
|
||||
|
||||
.topSee {
|
||||
flex: 1;
|
||||
}
|
||||
/* 账户统计 */
|
||||
.tab { background-color: #ffffff; border-radius: 20rpx; padding: 40rpx 30rpx; box-sizing: border-box; display: flex; margin: -70rpx 30rpx 0; }
|
||||
.tab-item { text-align: center; width: 50%; }
|
||||
.tab-name{ font-size: 28rpx; color: gray; }
|
||||
.tab-number { font-size: 34rpx; font-weight: bold; margin-top: 5rpx; }
|
||||
|
||||
.topSee-name {
|
||||
display: flex;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.topSee-name image {
|
||||
width: 34rpx;
|
||||
margin: 5rpx 20rpx;
|
||||
filter: grayscale(100%);
|
||||
-webkit-filter: grayscale(100%);
|
||||
filter: brightness(0%) invert(100%);
|
||||
-webkit-filter: brightness(0%) invert(100%);
|
||||
}
|
||||
|
||||
.topSee-number {
|
||||
font-size: 60rpx;
|
||||
margin-top: 20rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
.topBtn {
|
||||
background-color: #ffffff;
|
||||
display: inline-block;
|
||||
color: #da2b54;
|
||||
padding: 0 50rpx;
|
||||
border-radius: 80rpx;
|
||||
height: 68rpx;
|
||||
line-height: 68rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: -70rpx;
|
||||
}
|
||||
|
||||
.tab {
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
text-align: center;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.tab-number {
|
||||
font-size: 44rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.listTitle {
|
||||
padding: 30rpx 30rpx 0;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.item-top {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.item-number {
|
||||
color: #da2b54;
|
||||
font-weight: 600;
|
||||
font-size: 38rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.item-time {
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
/* 收益明细 */
|
||||
.listTitle { padding: 30rpx 30rpx 0; font-weight: 600; box-sizing: border-box; font-size: 30rpx; }
|
||||
.list { padding: 30rpx; box-sizing: border-box;}
|
||||
.list-item { background-color: #fff; border-radius: 20rpx; margin-bottom: 20rpx; padding: 30rpx; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; }
|
||||
.item-text{ width: calc(100% - 200rpx); }
|
||||
.item-name { font-size: 30rpx; font-weight: bold; line-height: 40rpx; }
|
||||
.item-time { font-size: 28rpx; line-height: 40rpx; color: gray; margin-top: 5rpx; }
|
||||
.item-number { color: #da2b54; font-size: 34rpx; font-weight: bold; width: 200rpx; text-align: right; padding-left: 20rpx; box-sizing: border-box; }
|
||||
|
||||
/* 暂无数据 */
|
||||
.pages-no {
|
||||
background-color: #fff;
|
||||
margin-top: 30rpx;
|
||||
text-align: center;
|
||||
padding: 120rpx 0;
|
||||
color: #6d6d6d;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.pages-no image {
|
||||
width: 180rpx;
|
||||
}
|
||||
.pages-no { background-color: #fff; margin: 30rpx; border-radius: 20rpx; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #6d6d6d; font-size: 28rpx; height: 55vh; }
|
||||
.pages-no image { width: 180rpx; height: 180rpx; }
|
||||
@@ -25,12 +25,10 @@ Page({
|
||||
type : options.type,
|
||||
bankId: options.id
|
||||
})
|
||||
|
||||
if(options.type == 'Compile') {
|
||||
// 获取银行编辑信息
|
||||
this.bankEdit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -79,7 +77,6 @@ Page({
|
||||
*/
|
||||
siteform(val) {
|
||||
let value = val.detail.value
|
||||
console.log(value)
|
||||
let data = {
|
||||
name : value.name,
|
||||
mobile : value.mobile,
|
||||
|
||||
@@ -1,34 +1,62 @@
|
||||
<!-- 添加地址 -->
|
||||
<form bindsubmit="siteform" class="ce-radius site-form">
|
||||
<view class="ce-white">
|
||||
<view class="site-input">
|
||||
<label>开户银行</label>
|
||||
<picker bindchange="bankChange" value="{{bankIndex}}" range="{{bankArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker">
|
||||
{{bankArr[bankIndex].name}}
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>支行名称</label>
|
||||
<input placeholder="请输入支行名称" name="branch_name" value="{{bankData.branch_name}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>银行卡号</label>
|
||||
<input placeholder="请输入银行卡号" name="no" value="{{bankData.no}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收款人姓名</label>
|
||||
<input placeholder="请输入收款人姓名" name="name" value="{{bankData.name}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收款人手机号</label>
|
||||
<input placeholder="请输入开户账号手机号" name="mobile" type="number" maxlength="11" value="{{bankData.mobile}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">确认添加</button>
|
||||
</view>
|
||||
</form>
|
||||
<view class="content">
|
||||
<form bindsubmit="siteform">
|
||||
<view class="form">
|
||||
<view class="form-item">
|
||||
<label class="form-label">开户银行</label>
|
||||
<picker bindchange="bankChange" value="{{bankIndex}}" range="{{bankArr}}" range-key="name" class="form-picker">
|
||||
<view class="form-picker-text">{{bankArr[bankIndex].name}}</view>
|
||||
<image class="form-picker-icon" src="/static/icons/orderArrow.png" mode="widthFix"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label class="form-label">支行名称</label>
|
||||
<input class="form-intpu" placeholder="请输入支行名称" name="branch_name" value="{{bankData.branch_name}}"></input>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label class="form-label">银行卡号</label>
|
||||
<input class="form-intpu" placeholder="请输入银行卡号" name="no" value="{{bankData.no}}"></input>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label class="form-label">真实姓名</label>
|
||||
<input class="form-intpu" placeholder="请输入收款人姓名" name="name" value="{{bankData.name}}"></input>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label class="form-label">预留手机</label>
|
||||
<input class="form-intpu" placeholder="请输入开户账号手机号" name="mobile" type="number" maxlength="11" value="{{bankData.mobile}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="ce-white">
|
||||
<view class="site-input">
|
||||
<label>开户银行</label>
|
||||
<picker bindchange="bankChange" value="{{bankIndex}}" range="{{bankArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker">
|
||||
{{bankArr[bankIndex].name}}
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>支行名称</label>
|
||||
<input placeholder="请输入支行名称" name="branch_name" value="{{bankData.branch_name}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>银行卡号</label>
|
||||
<input placeholder="请输入银行卡号" name="no" value="{{bankData.no}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收款人姓名</label>
|
||||
<input placeholder="请输入收款人姓名" name="name" value="{{bankData.name}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收款人手机号</label>
|
||||
<input placeholder="请输入开户账号手机号" name="mobile" type="number" maxlength="11" value="{{bankData.mobile}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
-->
|
||||
<view class="btn">
|
||||
<button form-type="submit" size="default" disabled="{{disabled}}">确认添加</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
|
||||
@@ -1,137 +1,15 @@
|
||||
.site-form {
|
||||
margin: 20rpx;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.site-btn {
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
.content{ background: #f7f8f9; min-height: 100vh; padding: 30rpx; box-sizing: border-box; }
|
||||
|
||||
.site-input {
|
||||
padding: 0 30rpx 0 280rpx;
|
||||
position: relative;
|
||||
line-height: 100rpx;
|
||||
min-height: 100rpx;
|
||||
}
|
||||
/* 绑定银行卡 */
|
||||
.form{ background: white; border-radius: 20rpx; padding: 15rpx 0; }
|
||||
.form-item{ display: flex; justify-content: space-between; padding: 0 30rpx; height: 90rpx; line-height: 90rpx; align-items: center; }
|
||||
.form-label{ width: 180rpx; font-size: 30rpx; }
|
||||
.form-intpu{ width: calc(100% - 180rpx); height: 90rpx; line-height: 90rpx; font-size: 30rpx; }
|
||||
.form-picker{ width: calc(100% - 180rpx); position: relative; }
|
||||
.form-picker-text{ line-height: 90rpx; height: 90rpx; font-size: 30rpx; }
|
||||
.form-picker-icon{ width: 48rpx; height: 48rpx; position: absolute; right: 0; top: 50%; margin-top: -24rpx; }
|
||||
|
||||
.site-input label {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.site-input input {
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.site-input::before {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
height: 1rpx;
|
||||
content: "";
|
||||
background: #e4e6f2;
|
||||
}
|
||||
|
||||
.site-input:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tui-picker-detail {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.site-btn button[size="mini"] {
|
||||
width: 100%;
|
||||
background: #da2b54;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
color: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-btn button[disabled] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
/* pickerView */
|
||||
|
||||
.pickerView-back {
|
||||
background: rgba(0, 0, 0, .3);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pickerView-back.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pickerView-layer {
|
||||
position: fixed;
|
||||
bottom: -571rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: white;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.pickerView-layer.active {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.pickerView-btn {
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.pickerView {
|
||||
height: 480rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.pickerView-name {
|
||||
line-height: 80rpx;
|
||||
padding: 0 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pickerView-mask {
|
||||
border-top: solid 1rpx #e4e6f2;
|
||||
}
|
||||
|
||||
.pickerView-indicator {
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.pickerView-determine {
|
||||
color: #3ec28e;
|
||||
}
|
||||
|
||||
.pickerView-cancel {
|
||||
color: #747788;
|
||||
}
|
||||
|
||||
|
||||
.site-input image {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% - 19rpx);
|
||||
}
|
||||
|
||||
.site-switch {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
/* 确认添加 */
|
||||
.btn{ margin-top: 50rpx; }
|
||||
.btn button[size="default"]{ background: #da2b54; width: 100%; height: 90rpx; line-height: 90rpx; padding: 0; border-radius: 45rpx; color: white; font-size: 32rpx; }
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-tool">
|
||||
<view class="address-tool {{type == 'selectAddress' ? 'active' : ''}}" wx:if="{{type == 'selectAddress'}}">
|
||||
<view class="address-tool-btn {{type == 'selectAddress' ? 'active' : ''}}" bindtap="selectAddress" data-index="{{index}}">选择地址</view>
|
||||
</view>
|
||||
<view class="address-icon" wx:else>
|
||||
<navigator hover-class="none" class="address-edit address-edit-border" url="/pages/bankCard/bankAdd/bankAdd?type=Compile&id={{item.bank_account_id}}">编辑账户</navigator>
|
||||
<view class="address-edit" bindtap="bankRemove" data-index="{{index}}" data-id="{{item.bank_account_id}}">删除账户</view>
|
||||
</view>
|
||||
<block wx:if="{{type == 'selectAddress'}}">
|
||||
<view class="address-tool-btn address-tool-border" bindtap="selectAddress" data-index="{{index}}">选择地址</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<navigator class="address-tool-btn address-tool-border" hover-class="none" url="/pages/bankCard/bankAdd/bankAdd?type=Compile&id={{item.bank_account_id}}">编辑账户</navigator>
|
||||
<view class="address-tool-btn" bindtap="bankRemove" data-index="{{index}}" data-id="{{item.bank_account_id}}">删除账户</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,103 +1,19 @@
|
||||
page {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.address { padding: 30rpx 30rpx 180rpx; min-height: 100vh; box-sizing: border-box; background: #f7f8f9; }
|
||||
.address-li { margin-bottom: 20rpx; background-color: #ffffff; border-radius: 20rpx; }
|
||||
.top { position: relative; border-bottom: 1rpx solid #ececec; padding: 30rpx; box-sizing: border-box; display: flex; align-items: center; }
|
||||
.top-logo { width: 68rpx; height: 68rpx; border-radius: 50%; }
|
||||
.top-name { font-weight: 600; font-size: 32rpx; margin-left: 20rpx; }
|
||||
.cont { padding: 30rpx; box-sizing: border-box; }
|
||||
.address-title { display: flex; justify-content: space-between; font-size: 28rpx; line-height: 70rpx; }
|
||||
.address-title text { width: 200rpx; color: gray; }
|
||||
.address-tool{ padding: 30rpx; box-sizing: border-box; display: flex; justify-content: flex-end; border-top: 1rpx solid #ececec; }
|
||||
.address-tool-btn{ background: #e92152; color: white; height: 62rpx; line-height: 60rpx; border-radius: 30rpx; font-size: 28rpx; margin-left: 30rpx; padding: 0 30rpx; border:solid 1rpx #e92152; box-sizing: border-box; }
|
||||
.address-tool-border{ color: #e92152; background: white; }
|
||||
|
||||
.address {
|
||||
border-bottom: 120rpx solid transparent;
|
||||
margin: 20rpx;
|
||||
}
|
||||
/* .address-tool { padding: 30rpx; box-sizing: border-box; font-size: 28rpx; }
|
||||
.address-edit { margin-left: 30rpx; background-color: #e92152; border: 2rpx solid #e92152; color: #ffffff; line-height: 60rpx; padding: 0 30rpx; border-radius: 30rpx; font-size: 28rpx; }
|
||||
|
||||
.address-li {
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.top {
|
||||
position: relative;
|
||||
border-bottom: 2rpx solid #ececec;
|
||||
padding: 20rpx 20rpx 15rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.top-logo {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.top-name {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 20rpx 20rpx 20rpx 120rpx;
|
||||
box-sizing: border-box;
|
||||
line-height: 80rpx;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.cont {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-title {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: #f9fbfc;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.address-title text {
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.address-title:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.address-nmae,
|
||||
.address-tips {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.address-text {
|
||||
font-size: 28rpx;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.address-tool {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
overflow: hidden;
|
||||
border-top: 2rpx solid #ececec;
|
||||
}
|
||||
|
||||
.address-edit {
|
||||
margin-left: 30rpx;
|
||||
display: inline-block;
|
||||
background-color: #ff9b26;
|
||||
border: 2rpx solid #ff9b26;
|
||||
color: #ffffff;
|
||||
line-height: 58rpx;
|
||||
padding: 0 30rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.address-edit-border {
|
||||
color: #ff9b26;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.address-edit-border { color: #e92152; background-color: #ffffff; }
|
||||
|
||||
.address-edit image {
|
||||
width: 32rpx;
|
||||
@@ -137,30 +53,30 @@ page {
|
||||
|
||||
.address-icon {
|
||||
float: right;
|
||||
}
|
||||
} */
|
||||
|
||||
/* 空页面 */
|
||||
.pages-hint{ padding-bottom: 180rpx; }
|
||||
|
||||
/* footer */
|
||||
|
||||
.address-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
background: white;
|
||||
z-index: 9;
|
||||
height: 120rpx;
|
||||
z-index: 99;
|
||||
padding: 30rpx 30rpx 60rpx;
|
||||
}
|
||||
|
||||
.address-footer navigator {
|
||||
width: 100%;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
margin: 15rpx 0;
|
||||
text-align: center;
|
||||
background: #e92152;
|
||||
font-size: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
border-radius: 10rpx
|
||||
border-radius: 45rpx
|
||||
}
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
.stair-nav-li.active {
|
||||
background: white;
|
||||
color: #e92344;
|
||||
color: #da2b54;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
@@ -67,7 +67,7 @@
|
||||
left: 0;
|
||||
top: 30rpx;
|
||||
height: 40rpx;
|
||||
background: #e92344;
|
||||
background: #da2b54;
|
||||
width: 6rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,66 +1,53 @@
|
||||
// pages/face/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
goFaceDone : false,
|
||||
bizToken : '',
|
||||
redirectUrl : ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.setData({
|
||||
bizToken : options.bizToken,
|
||||
redirectUrl : decodeURIComponent(options.redirectUrl),
|
||||
}, this.goFaceAuth)
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
* 生命周期函数--页面再次显示
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
onShow(){
|
||||
const { goFaceDone, redirectUrl } = this.data
|
||||
if (!goFaceDone) return
|
||||
const options = wx.getEnterOptionsSync()
|
||||
if(options.scene === 1038 && options.referrerInfo.extraData && options.referrerInfo.extraData.faceResult){
|
||||
const pages = getCurrentPages()
|
||||
const pre = pages[pages.length - 2]
|
||||
if (pre.reloadPage && typeof pre.reloadPage === 'function') {
|
||||
pre.reloadPage(redirectUrl + `&timeStamp=${new Date().getTime()}`)
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
* 打开E签报小程序
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
goFaceAuth(){
|
||||
wx.navigateToMiniProgram({
|
||||
appId: "wx1cf2708c2de46337",
|
||||
path : "/pages/face/index?bizToken=" + this.data.bizToken,
|
||||
success: () => {
|
||||
this.setData({
|
||||
goFaceDone: true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "人脸识别"
|
||||
}
|
||||
@@ -1,2 +1,9 @@
|
||||
<!--pages/face/index.wxml-->
|
||||
<text>pages/face/index.wxml</text>
|
||||
|
||||
<view class="face">
|
||||
<image class="face-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>
|
||||
<view class="face-loding">加载中...</view>
|
||||
<view class="btn-content">
|
||||
<text>如未成功跳转,请手动点击按钮转跳</text>
|
||||
<button size="default" bind:tap="goFaceAuth">转跳</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/* pages/face/index.wxss */
|
||||
|
||||
.face{
|
||||
width: 100vw;
|
||||
height: 90vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.face-icon{ width: 48rpx; height: 48rpx; margin-bottom: 40rpx; }
|
||||
.face-loding{ color: gray; }
|
||||
|
||||
.btn-content{ margin-top: 150rpx; font-size: 30rpx; color: #333; }
|
||||
|
||||
.btn-content button[size="default"]{ background: #da2b54; height: 90rpx; line-height: 90rpx; color: white; padding: 0; border-radius: 45rpx; width: 400rpx; margin-top: 100rpx; }
|
||||
|
||||
36
pages/idcard/eSign/eSign.js
Normal file
@@ -0,0 +1,36 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
sign_url: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.idcard.pactUrl().then(res => {
|
||||
let { sign_url } = res.data
|
||||
this.setData({
|
||||
sign_url
|
||||
})
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 监听签署结果
|
||||
*/
|
||||
handleGetMessage(e){
|
||||
if(e.detail.data[0].result=='success'){
|
||||
wx.navigateTo({
|
||||
url: '/pages/idcard/success/success?type=idcard',
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
3
pages/idcard/eSign/eSign.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
pages/idcard/eSign/eSign.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
<web-view src="{{sign_url}}" bindmessage="handleGetMessage"></web-view>
|
||||
1
pages/idcard/eSign/eSign.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/idcard/eSign/eSign.wxss */
|
||||
128
pages/idcard/idcard.js
Normal file
@@ -0,0 +1,128 @@
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
front : null,
|
||||
back : null,
|
||||
procedure : 1,
|
||||
info : {
|
||||
name : '',
|
||||
id_card : '',
|
||||
created_at : '',
|
||||
need_sign : '',
|
||||
},
|
||||
isSignContract : false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
wx.showLoading({
|
||||
title: "加载中...",
|
||||
mask : true
|
||||
})
|
||||
wx.$api.idcard.getInfo().then(res => {
|
||||
let { data } = res;
|
||||
wx.hideLoading()
|
||||
if(data.length == 0){
|
||||
this.setData({
|
||||
procedure: 1
|
||||
})
|
||||
return
|
||||
}
|
||||
if(data != ''){
|
||||
this.setData({
|
||||
procedure : data.need_sign ? 2 : 3,
|
||||
isSignContract : data.is_sign_contract,
|
||||
info : {
|
||||
name : data.name,
|
||||
id_card : data.id_card,
|
||||
created_at : data.created_at,
|
||||
verified : data.verified,
|
||||
need_sign : data.need_sign,
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上传身份证
|
||||
*/
|
||||
onUpd(e){
|
||||
let { type } = e.currentTarget.dataset
|
||||
wx.chooseMedia({
|
||||
count : 1,
|
||||
mediaType : ['image'],
|
||||
success : resPaths => {
|
||||
let { tempFiles } = resPaths;
|
||||
this.setData({
|
||||
[type]: tempFiles[0].tempFilePath
|
||||
})
|
||||
wx.$api.idcard.updIdcard(tempFiles[0].tempFilePath, { type }).then(res => {
|
||||
this.setData({
|
||||
[type]: res
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 提交身份证信息
|
||||
*/
|
||||
onSubmitIdcard(e){
|
||||
wx.showLoading({
|
||||
title: '提交证件信息...',
|
||||
mask : true
|
||||
})
|
||||
let { address } = e.detail.value
|
||||
wx.$api.idcard.ocr({
|
||||
front_card: this.data.front.path,
|
||||
back_card : this.data.back.path,
|
||||
address
|
||||
}).then(res => {
|
||||
let { name, id_card, created_at, verified, need_sign } = res.data
|
||||
this.setData({
|
||||
info : { name, id_card, created_at, verified, need_sign },
|
||||
procedure : need_sign ? 2 : 3,
|
||||
isSignContract : data.is_sign_contract,
|
||||
})
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取人脸认证地址
|
||||
*/
|
||||
onGetSignUrl(){
|
||||
wx.showLoading({
|
||||
title: '获取地址信息...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.idcard.signUrl({
|
||||
path : '/pages/idcard/idcard',
|
||||
query : "getSign=1",
|
||||
version : ''
|
||||
}).then(res => {
|
||||
let { url } = res.data;
|
||||
wx.navigateTo({
|
||||
url: "./signUrl/signUrl?url=" + encodeURIComponent(url.authUrl),
|
||||
})
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 开通会员获取签约地址
|
||||
*/
|
||||
onGetOpenVip(){
|
||||
if(this.data.isSignContract){
|
||||
wx.navigateBack()
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "./eSign/eSign",
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/idcard/idcard.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "实名认证"
|
||||
}
|
||||
76
pages/idcard/idcard.wxml
Normal file
@@ -0,0 +1,76 @@
|
||||
|
||||
<view class="schedule">
|
||||
<view class="schedule-item {{procedure >= 1 ? 'show': ''}}">上传证件</view>
|
||||
<view class="schedule-item {{procedure >= 2 ? 'show': ''}}">确认信息</view>
|
||||
<view class="schedule-item {{procedure >= 3 ? 'show': ''}}">认证完成</view>
|
||||
</view>
|
||||
|
||||
<!-- 上传证件 -->
|
||||
<block wx:if="{{procedure == 1}}">
|
||||
<form bindsubmit="onSubmitIdcard">
|
||||
<view class="upds">
|
||||
<view class="upds-item" bind:tap="onUpd" data-type="front">
|
||||
<view class="upds-text">
|
||||
<image class="upds-icon" src="/static/icons/add_icon.png" mode="widthFix"></image>
|
||||
<view>上传身份证正面</view>
|
||||
</view>
|
||||
<image class="upds-back" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/08/22/1919a336eb5bf37f580747073402d838.png" mode="widthFix"></image>
|
||||
<image wx:if="{{front != null}}" class="upds-src" src="{{front.url}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="upds-item" bind:tap="onUpd" data-type="back">
|
||||
<view class="upds-text">
|
||||
<image class="upds-icon" src="/static/icons/add_icon.png" mode="widthFix"></image>
|
||||
<view>上传身份证反面</view>
|
||||
</view>
|
||||
<image class="upds-back" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/08/22/2fba50d950d7569986177b26c229713b.png" mode="widthFix"></image>
|
||||
<image wx:if="{{back != null}}" class="upds-src" src="{{back.url}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="idcard-input">
|
||||
<label>联系地址</label>
|
||||
<input placeholder="输入联系地址" name="address" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="idcard-btn">
|
||||
<button size="default" form-type="submit">下一步</button>
|
||||
</view>
|
||||
</form>
|
||||
</block>
|
||||
|
||||
<!-- 确认信息 -->
|
||||
<block wx:if="{{procedure == 2}}">
|
||||
<view class="info-block">
|
||||
<view class="info-flex">
|
||||
<label>真实姓名</label>
|
||||
<view class="info-val">{{info.name || '-'}}</view>
|
||||
</view>
|
||||
<view class="info-flex">
|
||||
<label>证件号码</label>
|
||||
<view class="info-val">{{info.id_card || '-'}}</view>
|
||||
</view>
|
||||
<view class="info-flex">
|
||||
<label>联系地址</label>
|
||||
<view class="info-val">{{info.address || '-'}}</view>
|
||||
</view>
|
||||
<view class="info-flex">
|
||||
<label>上传时间</label>
|
||||
<view class="info-val">{{info.created_at || '-'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="idcard-btn">
|
||||
<button size="default" bind:tap="onGetSignUrl">人脸认证</button>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 认证完成 -->
|
||||
<block wx:if="{{procedure == 3}}">
|
||||
<view class="idcard-success">
|
||||
<image class="idcard-icon" src="/static/icons/idcard_success.png" mode="widthFix"></image>
|
||||
<view class="idcard-title">认证完成</view>
|
||||
<view class="idcard-info">{{info.name}}({{info.id_card}})</view>
|
||||
<view class="idcard-subtitle">您已完成实名认证<text wx:if="{{!isSignContract}}">
|
||||
点击按钮进行签约开通会员</text></view>
|
||||
<view class="idcard-btn">
|
||||
<button size="default" bind:tap="onGetOpenVip">{{isSignContract ? '返回' : '开通会员'}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
38
pages/idcard/idcard.wxss
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
/* 身份信息 */
|
||||
.schedule{ display: flex; align-items: center; justify-content: space-around; padding: 50rpx 30rpx; }
|
||||
.schedule-item{ font-size: 28rpx; color: gray; padding-top: 60rpx; position: relative; }
|
||||
.schedule-item::after{ content: " "; position: absolute; left: 50%; top: 0; width: 40rpx; height: 40rpx; margin-left: -25rpx; background: #ddd; text-align: center; border-radius: 50%; line-height: 40rpx; font-size: 28rpx; border: solid 5rpx #f7f8f9; }
|
||||
.schedule-item:nth-child(1)::after{ content: "1"; }
|
||||
.schedule-item:nth-child(2)::after{ content: "2"; }
|
||||
.schedule-item:nth-child(3)::after{ content: "3"; }
|
||||
|
||||
.schedule-item.show{color: #da2b54;}
|
||||
.schedule-item.show::after{ background: #da2b54; color: white; border-color: #fbccd7; }
|
||||
|
||||
/* 上传身份证 */
|
||||
.upds{ padding: 0 60rpx; }
|
||||
.upds-item{ background: #f7f8f9; border-radius: 20rpx; margin-top: 20rpx; width: 100%; padding-top:58%; border: dashed 1rpx #ddd; position: relative; overflow: hidden; }
|
||||
.upds-text{ font-size: 28rpx; color: gray; width: 100%; display: flex; align-items: center; flex-direction: column; justify-content: center; height: 100%; top: 0; left: 0; position: absolute; z-index: 1; }
|
||||
.upds-icon{ width: 58rpx; height: 58rpx; margin: 20rpx 0; }
|
||||
.upds-back{ position: absolute; top: 50%; left: 50%; width: 400rpx; height: 185rpx; opacity: .2; margin-left: -200rpx; margin-top: -92rpx; }
|
||||
.upds-src{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
|
||||
.idcard-input{ background: #f7f8f9; border-radius: 20rpx; height: 90rpx; margin-top: 20rpx; display: flex; align-items: center; padding: 0 30rpx; box-sizing: border-box; }
|
||||
.idcard-input input{ width: calc(100% - 140rpx); height: 90rpx; line-height: 90rpx; font-size: 30rpx; box-sizing: border-box; padding-left: 20rpx; }
|
||||
.idcard-input label{ width: 140rpx; font-size: 30rpx; }
|
||||
|
||||
/* 认证信息 */
|
||||
.info-block{ background: #f7f8f9; margin: 0 50rpx; border-radius: 20rpx; padding: 30rpx; }
|
||||
.info-flex{ display: flex; align-items: flex-start; justify-content: space-between; line-height: 40rpx; padding: 15rpx 0; font-size: 30rpx; }
|
||||
.info-flex label{ color: gray; }
|
||||
|
||||
/* 认证结果信息 */
|
||||
.idcard-success{ margin: 0 50rpx; display: flex; align-items: center; justify-content: center; height: 75vh; flex-direction: column; }
|
||||
.idcard-icon{ width: 128rpx; margin-bottom: 50rpx; }
|
||||
.idcard-title{ font-size: 50rpx; font-weight: bold; line-height: 50rpx; }
|
||||
.idcard-subtitle{ font-size: 30rpx; color: gray; line-height: 40rpx; margin-top: 20rpx; margin-bottom: 100rpx; text-align: center; }
|
||||
.idcard-info{ margin-top: 20rpx; font-size: 30rpx; }
|
||||
|
||||
/* 下一步 */
|
||||
.idcard-btn{ padding: 50rpx 60rpx; width: 100vw; box-sizing: border-box; }
|
||||
.idcard-btn button[size='default']{ background: #da2b54; width: 100%; height: 90rpx; border-radius: 45rpx; color: white; line-height: 90rpx; padding: 0; font-size: 32rpx; }
|
||||
44
pages/idcard/signUrl/signUrl.js
Normal file
@@ -0,0 +1,44 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if(!options.url){
|
||||
wx.showToast({
|
||||
title: '系统错误:未获取到签约地址',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
url: decodeURIComponent(options.url)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 监听签署结果
|
||||
*/
|
||||
handleGetMessage(e){
|
||||
if(e.detail.data[0].result=='success'){
|
||||
wx.redirectTo({
|
||||
url: '/pages/idcard/success/success?type=sign',
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 重新定向url
|
||||
*/
|
||||
reloadPage(redirectUrl) {
|
||||
this.setData({
|
||||
url: redirectUrl,
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/idcard/signUrl/signUrl.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "人脸识别认证"
|
||||
}
|
||||
2
pages/idcard/signUrl/signUrl.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
<web-view src="{{url}}" bindmessage="handleGetMessage"></web-view>
|
||||
1
pages/idcard/signUrl/signUrl.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/idcard/signUrl/signUrl.wxss */
|
||||
35
pages/idcard/success/success.js
Normal file
@@ -0,0 +1,35 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
title: "",
|
||||
text : ""
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--页面加载
|
||||
*/
|
||||
onLoad(e){
|
||||
if(e.type == 'sign'){
|
||||
this.setData({
|
||||
title: "签署完成",
|
||||
text : "签署完成,恭喜您升级为平台会员"
|
||||
})
|
||||
}
|
||||
if(e.type == 'idcard'){
|
||||
this.setData({
|
||||
title: "认证完成",
|
||||
text : "实名认证已完成"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 返回
|
||||
*/
|
||||
onBack(){
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
4
pages/idcard/success/success.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
9
pages/idcard/success/success.wxml
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
<view class="success">
|
||||
<image class="icon" src="/static/icons/success_icon.png" mode="widthFix"></image>
|
||||
<view class="title">{{title}}</view>
|
||||
<view class="text">{{text}}</view>
|
||||
<view class="idcard-btn">
|
||||
<button size="default" bind:tap="onBack">返回</button>
|
||||
</view>
|
||||
</view>
|
||||
9
pages/idcard/success/success.wxss
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
.success{ height: 90vh; width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; }
|
||||
.icon{ width: 128rpx; height: 128rpx; margin-bottom: 40rpx; }
|
||||
.title{ font-size: 50rpx; font-weight: bold; line-height: 50rpx; margin-bottom: 30rpx; color: #333; }
|
||||
.text{ font-size: 30rpx; color: gray; margin-bottom: 100px; }
|
||||
|
||||
.idcard-btn{ padding: 50rpx 60rpx; width: 100vw; box-sizing: border-box; }
|
||||
.idcard-btn button[size='default']{ background: #da2b54; width: 100%; height: 90rpx; border-radius: 45rpx; color: white; line-height: 90rpx; padding: 0; font-size: 32rpx; }
|
||||
|
||||
@@ -44,6 +44,8 @@ Page({
|
||||
password : value.password,
|
||||
}
|
||||
wx.$api.auth.Login(data).then(res => {
|
||||
// 存储邀请码
|
||||
// let { invite, }
|
||||
// 存储登录信息
|
||||
wx.setStorage({
|
||||
key : 'token',
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<input type="number" placeholder="请输入账号" maxlength="11" name="username" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<input type="text" placeholder="请输入密码" name="password" />
|
||||
<input type="safe-password" password placeholder="请输入密码" name="password" />
|
||||
</view>
|
||||
<view class="forget"><navigator hover-class="none">忘记密码?</navigator></view>
|
||||
<view class="forget"><navigator hover-class="none" url="/pages/resetPassword/resetPassword">忘记密码?</navigator></view>
|
||||
<button class="btn" type="default" form-type="submit">立即登录</button>
|
||||
<view class="registerGo"><navigator hover-class="none" url="/pages/register/index" open-type="redirect">暂无账号,立即注册</navigator></view>
|
||||
<view class="registerGo"><navigator hover-class="none" url="/pages/register/index" open-type="navigate">暂无账号,立即注册</navigator></view>
|
||||
</form>
|
||||
<!-- 用户登录注册协议 -->
|
||||
<view class="agreement">
|
||||
|
||||
@@ -15,7 +15,8 @@ Page({
|
||||
address : '', // 地址
|
||||
addressId : '', // 地址id
|
||||
goodskData : '', // 数据
|
||||
amount : '', // 总金额
|
||||
amount : '', // 商品总金额
|
||||
total : '', // 支付金额
|
||||
freight : '', // 运费
|
||||
weight : '', // 重量
|
||||
},
|
||||
@@ -46,12 +47,12 @@ Page({
|
||||
qty: qty,
|
||||
address_id: this.data.addressId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.setData({
|
||||
address : res.data.address,
|
||||
addressId : res.data.address.address_id,
|
||||
goodskData: res.data.detail,
|
||||
amount : res.data.amount,
|
||||
total : res.data.total,
|
||||
freight : res.data.freight,
|
||||
weight : res.data.weight
|
||||
})
|
||||
@@ -62,21 +63,20 @@ Page({
|
||||
* 商品确认下单
|
||||
*/
|
||||
buyTap() {
|
||||
wx.showLoading({
|
||||
title: '下单中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.mall.placeTrue({
|
||||
goods_sku_id:this.data.skuId,
|
||||
qty: this.data.goodsQty,
|
||||
address_id: this.data.addressId
|
||||
goods_sku_id : this.data.skuId,
|
||||
qty : this.data.goodsQty,
|
||||
address_id : this.data.addressId
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.redirectTo({
|
||||
url: '/pages/pay/index?params=' + encodeURIComponent(JSON.stringify(res.data))
|
||||
})
|
||||
}).catch(err =>{
|
||||
this.setData({
|
||||
disabled: false
|
||||
})
|
||||
}).catch(() =>{}).finally(() => {
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
})
|
||||
@@ -33,6 +33,7 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 规格 -->
|
||||
<view class="label">
|
||||
<view class="label-item">
|
||||
@@ -54,13 +55,7 @@
|
||||
<view class="number">
|
||||
<view class="number-vip">合计:</view>
|
||||
<text>¥</text>
|
||||
<view class="number-price">{{amount}}</view>
|
||||
<view class="number-price">{{total}}</view>
|
||||
</view>
|
||||
<view class="btn" bindtap="buyTap" wx:if="{{disabled}}">立即支付</view>
|
||||
<view class="btn active" wx:else>立即支付</view>
|
||||
<view class="btn {{disabled ? '': 'active'}}" bindtap="buyTap">立即支付</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="pack-center pages-hint grey" wx:if="{{paySuccess}}">
|
||||
<image src="/static/icons/loadingGif.gif"></image>
|
||||
<view>疯狂加载中...</view>
|
||||
</view> -->
|
||||
@@ -53,6 +53,7 @@ page {
|
||||
|
||||
.address-img {
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ Page({
|
||||
valueIndex : '', // 选中规格下标index
|
||||
specselectIndex : '',
|
||||
qtyNumber : 1, // 产品数量
|
||||
goodsSize : false
|
||||
goodsSize : false,
|
||||
invite : ''
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -30,7 +31,8 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
goodsId: options.id
|
||||
goodsId: options.id,
|
||||
invite : options.invite || ''
|
||||
})
|
||||
},
|
||||
|
||||
@@ -46,17 +48,23 @@ Page({
|
||||
* 商品详情
|
||||
*/
|
||||
goodsInfo() {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.mall.goodsSee(this.data.goodsId).then(res => {
|
||||
console.log(res.data)
|
||||
this.setData({
|
||||
goodsData : res.data,
|
||||
mallContent : res.data.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"'),
|
||||
skus : res.data.skus,
|
||||
skuid : res.data.skus[0].sku_id,
|
||||
selectSkusValues: res.data.skus[0],
|
||||
specselect : res.data.skus[0].unit.split('|')
|
||||
specselect : res.data.skus[0].unit.split('|'),
|
||||
invite : res.data.invite
|
||||
})
|
||||
}).catch(err =>{})
|
||||
}).catch(err =>{}).finally(() => {
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -245,5 +253,25 @@ Page({
|
||||
urls : imgs,
|
||||
current : imgs[index]
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 分享给朋友
|
||||
*/
|
||||
onShareAppMessage(){
|
||||
return{
|
||||
title : this.data.goodsData.name,
|
||||
path : '/pages/mall/details/details?id=' + this.data.goodsId + '&invite=' + this.data.invite,
|
||||
imageUrl: this.data.goodsData.cover
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 分享朋友圈
|
||||
*/
|
||||
onShareTimeline(){
|
||||
return{
|
||||
title : this.data.goodsData.name,
|
||||
query : '/pages/mall/details/details?id=' + this.data.goodsId + '&invite=' + this.data.invite,
|
||||
imageUrl : this.data.goodsData.cover
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -23,15 +23,14 @@
|
||||
<view class="goodsInfo-top">
|
||||
<view class="goodsInfo-price">
|
||||
<view class="goodsInfo-cost"><text>¥</text>{{goodsData.original_price}}</view>
|
||||
<!-- <view class="goodsInfo-vip"><text>会员价¥</text>99.00</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="goodsInfo-name">
|
||||
{{goodsData.name}}
|
||||
</view>
|
||||
<view class="goodsInfo-share" bindtap="shareTap">
|
||||
<button class="goodsInfo-share" size="mini" open-type="share">
|
||||
<image class="goodsInfo-share-image" src="/static/icons/goodsShare.png"></image>分享
|
||||
</view>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="goodsWhite goodsItem">
|
||||
|
||||
@@ -103,7 +103,7 @@ page {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.goodsInfo-share {
|
||||
.goodsInfo-share[size="mini"] {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 30rpx;
|
||||
@@ -111,6 +111,9 @@ page {
|
||||
font-size: 27rpx;
|
||||
line-height: 34rpx;
|
||||
color: #9b9b9b;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.goodsInfo-share-image {
|
||||
|
||||
@@ -9,19 +9,29 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
scrollLeft : '', // 商品分类
|
||||
bannerArr : [], // 轮播信息
|
||||
categorieArr: [], // 分类信息
|
||||
goodsArr : [], // 商品信息
|
||||
articlesArr : [], // 公告列表
|
||||
page : {}, // 分页信息
|
||||
lodingStats : false,// 加载状态
|
||||
scrollLeft : '', // 商品分类
|
||||
bannerArr : [], // 轮播信息
|
||||
categorieArr : [], // 分类信息
|
||||
goodsArr : [], // 商品信息
|
||||
articlesArr : [], // 公告列表
|
||||
page : {}, // 分页信息
|
||||
lodingStats : false,// 加载状态
|
||||
buy_sku_id : false,// 身份包产品
|
||||
can_buy : false,// 是否可购买
|
||||
certification : false,// 是否已认证
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {},
|
||||
onLoad(options) {
|
||||
let sceneCode = options.scene || null
|
||||
if(sceneCode != null ){
|
||||
let inviteCode = decodeURIComponent(sceneCode)
|
||||
let invite = inviteCode.match(new RegExp("(^|&)" + 'invite' + "=([^&]*)(&|$)", "i"));
|
||||
getApp().globalData.invite = invite[2] || null
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
@@ -38,6 +48,23 @@ Page({
|
||||
|
||||
// 获取公告列表
|
||||
this.articlesInfo();
|
||||
|
||||
// 获取身份包产品
|
||||
this.getidpackage()
|
||||
},
|
||||
|
||||
/**
|
||||
* 身份包
|
||||
*/
|
||||
getidpackage(){
|
||||
wx.$api.mall.idpackage().then(res => {
|
||||
let { buy_sku_id, can_buy, certification } = res.data
|
||||
this.setData({
|
||||
buy_sku_id,
|
||||
can_buy,
|
||||
certification
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -48,8 +75,6 @@ Page({
|
||||
this.setData({
|
||||
bannerArr: res.data
|
||||
})
|
||||
}).catch(err =>{
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
@@ -61,8 +86,6 @@ Page({
|
||||
this.setData({
|
||||
categorieArr: res.data
|
||||
})
|
||||
}).catch(err =>{
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
@@ -83,8 +106,6 @@ Page({
|
||||
lodingStats : false
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
}).catch(err =>{
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
@@ -96,8 +117,7 @@ Page({
|
||||
this.setData({
|
||||
articlesArr: res.data.data
|
||||
})
|
||||
console.log(res)
|
||||
}).catch(err =>{})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -117,6 +137,39 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 购买产品包
|
||||
*/
|
||||
onCapsule(){
|
||||
if(wx.getStorageSync("token") != ''){
|
||||
if(!this.data.certification){
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '您还未完成账号实名认证,暂不可购买',
|
||||
cancelText : '稍后',
|
||||
cancelColor : '#333',
|
||||
confirmText : '去认证',
|
||||
confirmColor : '#da2b54',
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
wx.navigateTo({
|
||||
url: '/pages/idcard/idcard',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/confirm/confirm?qty=1&skuId=' + this.data.buy_sku_id
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/index"
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 身份包产品 -->
|
||||
<view class="capsule" wx:if="{{can_buy}}">
|
||||
<image class="capsule-src" src="/static/imgs/capsule.png" mode="widthFix" bind:tap="onCapsule"></image>
|
||||
</view>
|
||||
|
||||
<!-- 推荐 -->
|
||||
<view class="suggest">
|
||||
<view class="suggestLeft">
|
||||
|
||||
@@ -3,7 +3,7 @@ page {
|
||||
}
|
||||
|
||||
.linearBack {
|
||||
background-image: linear-gradient(to top, #ffffff 60%, #fde8e9);
|
||||
background-image: linear-gradient(to top, #ffffff 60%, #fbe2e1);
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -99,13 +99,13 @@ page {
|
||||
}
|
||||
|
||||
.noticeCont-icon {
|
||||
width: 38rpx;
|
||||
width: 32rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
.noticeCont-name {
|
||||
width: calc(100% - 38rpx);
|
||||
padding-left: 30rpx;
|
||||
width: calc(100% - 32rpx);
|
||||
padding-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
color: #da2b54;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ page {
|
||||
|
||||
.goodsItem-price {
|
||||
flex: 1;
|
||||
color: #ff1122;
|
||||
color: #da2b54;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -320,6 +320,10 @@ page {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 自选产品包 */
|
||||
.capsule{ padding: 0 40rpx 20rpx; }
|
||||
.capsule-src{ width: 100%; }
|
||||
|
||||
/* 暂无列表 */
|
||||
.goodsList-no {
|
||||
background-color: #ffffff;
|
||||
|
||||
@@ -9,20 +9,104 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
total : "0.00",
|
||||
orderNo : "",
|
||||
modelId : "",
|
||||
modelType : "",
|
||||
payType : "",
|
||||
can : {
|
||||
coin : 0,
|
||||
wechat : 0,
|
||||
},
|
||||
loding : false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const params = JSON.parse(decodeURIComponent(options.params));
|
||||
console.log(params)
|
||||
const { order_id, order_type, order_no } = JSON.parse(decodeURIComponent(options.params))
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.pay.info({ order_id, order_type }).then(res => {
|
||||
let { can, total, model_type, model_id } = res.data
|
||||
this.setData({
|
||||
orderNo : order_no,
|
||||
payType : res.data.default,
|
||||
modelId : model_id,
|
||||
modelType : model_type,
|
||||
total,
|
||||
can
|
||||
})
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
* 选择支付方式
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
onPayType(e){
|
||||
let { value } = e.detail
|
||||
this.setData({
|
||||
payType: value
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 立即支付
|
||||
*/
|
||||
onPay(){
|
||||
this.setData({
|
||||
loding: true
|
||||
})
|
||||
switch (this.data.payType) {
|
||||
case 'wechat':
|
||||
this.wechatPay()
|
||||
break;
|
||||
case 'coin':
|
||||
wx.showToast({
|
||||
title: '支付方式暂未开放',
|
||||
icon : 'none'
|
||||
})
|
||||
this.setData({
|
||||
loding: false
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 微信支付
|
||||
*/
|
||||
wechatPay(){
|
||||
wx.login({
|
||||
success: wxCode => {
|
||||
let { code } = wxCode;
|
||||
wx.$api.pay.wechatPay({
|
||||
order_type : this.data.modelType,
|
||||
order_id : this.data.modelId,
|
||||
type : "mini",
|
||||
code : code
|
||||
}).then(res => {
|
||||
let { wechat, trade_id } = res.data
|
||||
let wechatObj = JSON.parse(wechat)
|
||||
wx.requestPayment({
|
||||
nonceStr : wechatObj.nonceStr,
|
||||
package : wechatObj.package,
|
||||
paySign : wechatObj.paySign,
|
||||
timeStamp: wechatObj.timeStamp,
|
||||
signType : wechatObj.signType,
|
||||
success : () => {
|
||||
wx.redirectTo({
|
||||
url: './success/success?trade_id=' + trade_id,
|
||||
})
|
||||
}
|
||||
})
|
||||
}).finally(() => {
|
||||
this.setData({
|
||||
loding: false
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,23 +1,38 @@
|
||||
<view class="payTop">
|
||||
<view class="payTop-time">支付有效期为10分钟,请尽快支付</view>
|
||||
<view class="payTop-price"><text>¥</text>199.00</view>
|
||||
<view class="payTop-text">微信支付</view>
|
||||
</view>
|
||||
|
||||
<view class="payWay">
|
||||
<view class="payWay-item">
|
||||
<image class="payWay-img" src="https://cdn.shuiganying.com/images/2023/04/04/70400072de51a3157d9ead602eb3a294.png"></image>
|
||||
<view class="payWay-name">微信支付</view>
|
||||
<image class="payWay-icon" src="https://cdn.shuiganying.com/images/2023/04/04/2d9eed259c7a73b4d2aa4d496dbfa8a4.png"></image>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view class="title">实付金额</view>
|
||||
<view class="price"><text>¥</text>{{total}}</view>
|
||||
<view class="no">订单号{{orderNo}}</view>
|
||||
</view>
|
||||
<!-- 选择支付方式 -->
|
||||
<view class="radio-title">选择支付方式</view>
|
||||
<view class="radio-group">
|
||||
<radio-group bindchange="onPayType">
|
||||
<label class="radio-flex" wx:if="{{can.wechat == 1}}">
|
||||
<view class="radio-text">
|
||||
<image class="radio-icon" src="/static/pay/wechat.png"></image>
|
||||
<text>微信支付</text>
|
||||
</view>
|
||||
<radio class="radio-radio" value="wechat" color="#da2b54" checked="{{payType == 'wechat'}}"/>
|
||||
</label>
|
||||
<label class="radio-flex" wx:if="{{can.coin == 1}}">
|
||||
<view class="radio-text">
|
||||
<image class="radio-icon" src="/static/pay/coin.png"></image>
|
||||
<text>自选额度</text>
|
||||
</view>
|
||||
<radio class="radio-radio" value="coin" color="#da2b54" checked="{{payType == 'coin'}}"/>
|
||||
</label>
|
||||
</radio-group>
|
||||
<view class="radio-lay" wx:if="{{loding}}"></view>
|
||||
</view>
|
||||
<!-- 支付 -->
|
||||
<view class="pay">
|
||||
<button class="pay-btn" size="default" disabled="{{loding}}" loading="{{loding}}" bind:tap="onPay">立即支付</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer">
|
||||
<view bindtap="payBtn" class="btn" wx:if="{{disabled}}">确认支付</view>
|
||||
<view class="btn active" wx:else>确认支付</view>
|
||||
</view>
|
||||
|
||||
<view class="pack-center pages-hint grey" wx:if="{{paySuccess}}">
|
||||
<view class="pack-center pages-hint grey">
|
||||
<image src="/static/icons/loadingGif.gif"></image>
|
||||
<view>疯狂加载中...</view>
|
||||
</view>
|
||||
@@ -1,86 +1,22 @@
|
||||
page {
|
||||
background-color: #f4f4f6;
|
||||
}
|
||||
|
||||
.payTop {
|
||||
text-align: center;
|
||||
padding: 140rpx 0;
|
||||
}
|
||||
.content{ background: white; min-height: 100vh; padding: 0 30rpx; }
|
||||
.info{ padding:100rpx 50rpx; text-align: center; border-bottom: solid 1rpx #f7f8f9; }
|
||||
.title{font-weight: bold; line-height: 40rpx;}
|
||||
.price{ font-weight: bold; font-size: 80rpx; padding: 30rpx 0; line-height: 80rpx; }
|
||||
.price text{ font-size: 80%; }
|
||||
.no{ font-size: 28rpx; color: gray; line-height: 40rpx; }
|
||||
|
||||
.payTop-price {
|
||||
font-weight: 600;
|
||||
font-size: 78rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 20rpx 0 0;
|
||||
}
|
||||
/* 支付方式 */
|
||||
.radio-title{ font-weight: bold; font-size: 30rpx; padding: 30rpx; }
|
||||
.radio-group{ padding: 0 30rpx; position: relative; }
|
||||
.radio-flex{ display: flex; align-items: center; justify-content: space-between; padding: 30rpx 0; border-bottom: solid 1rpx #f7f8f9; }
|
||||
.radio-text{ display: flex; align-items: center; font-size: 30rpx; }
|
||||
.radio-icon{ width: 58rpx; height: 58rpx; border-radius: 10rpx; margin-right: 30rpx; }
|
||||
.radio-radio{ transform: scale(.8) }
|
||||
.radio-lay{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
.payTop-price text {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
/* 支付 */
|
||||
.pay{ margin-top: 100rpx; }
|
||||
.pay-btn[size="default"]{ width: 100%; height: 100rpx; line-height: 100rpx; background: #da2b54; color: white; padding: 0; border-radius: 50rpx; font-size: 32rpx; }
|
||||
.pay-btn[size="default"][disabled]{ opacity: .5; background: #da2b54; color: white;}
|
||||
|
||||
.payTop-time,
|
||||
.payTop-text {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.payWay {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.payWay-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
padding: 25rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
line-height: 74rpx;
|
||||
font-size: 34rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.payWay-img {
|
||||
width: 74rpx;
|
||||
height: 74rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.payWay-icon {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 按钮 */
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #f4f4f6;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
padding: 20px 20px 50rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.btn {
|
||||
line-height: 54px;
|
||||
background-color: #da2b54;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.btn.active {
|
||||
background-color: #cacaca;
|
||||
}
|
||||
|
||||
.grey {
|
||||
background-color: #f9f9f9;
|
||||
z-index: 99999;
|
||||
}
|
||||
58
pages/pay/success/success.js
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
var getNum = 0
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
loding : true,
|
||||
success: true
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--查询支付信息
|
||||
*/
|
||||
onLoad(e){
|
||||
if(!e.trade_id){
|
||||
wx.showToast({
|
||||
title: '参数错误,请联系系统管理员',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
this.getPayState(e.trade_id)
|
||||
getNum = 0
|
||||
},
|
||||
/**
|
||||
* 查询支付结果
|
||||
*/
|
||||
getPayState(trade_id){
|
||||
wx.$api.pay.payState(trade_id).then(res => {
|
||||
console.log(res.data.is_paid)
|
||||
let { is_paid } = res.data
|
||||
if(is_paid){
|
||||
this.setData({
|
||||
success: true,
|
||||
loding : false
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!is_paid && getNum >= 3){
|
||||
this.setData({
|
||||
success: false,
|
||||
loding : false
|
||||
})
|
||||
return
|
||||
}
|
||||
getNum++
|
||||
this.getPayState(trade_id)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 返回
|
||||
*/
|
||||
onBack(){
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
4
pages/pay/success/success.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "支付结果"
|
||||
}
|
||||
21
pages/pay/success/success.wxml
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
<view class="success">
|
||||
<block wx:if="{{loding}}">
|
||||
<image class="loding" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>
|
||||
<view class="text">查询支付结果中...</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<image class="icon" wx:if="{{success}}" src="/static/icons/success_icon.png" mode="widthFix"></image>
|
||||
<image class="icon" wx:else src="/static/icons/fali_icon.png" mode="widthFix"></image>
|
||||
<view class="title">{{success ? '支付成功' : '支付失败'}}</view>
|
||||
<view class="text">
|
||||
<text wx:if="{{success}}">订单支付,可在【我的】中查询订单</text>
|
||||
<text wx:else>暂未查询到您的订单支付信息
|
||||
如已扣款请稍后前往【我的】查询订单</text>
|
||||
</view>
|
||||
<view class="idcard-btn">
|
||||
<button size="default" bind:tap="onBack">返回</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
11
pages/pay/success/success.wxss
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
.success{ height: 90vh; width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; }
|
||||
|
||||
.loding{ width: 42rpx; height: 42rpx; margin-bottom: 50rpx; }
|
||||
.icon{ width: 128rpx; height: 128rpx; margin-bottom: 40rpx; }
|
||||
.title{ font-size: 50rpx; font-weight: bold; line-height: 50rpx; margin-bottom: 30rpx; color: #333; }
|
||||
.text{ font-size: 30rpx; color: gray; margin-bottom: 100px; text-align: center; line-height: 50rpx; }
|
||||
|
||||
.idcard-btn{ padding: 50rpx 60rpx; width: 100vw; box-sizing: border-box; }
|
||||
.idcard-btn button[size='default']{ background: #da2b54; width: 100%; height: 90rpx; border-radius: 45rpx; color: white; line-height: 90rpx; padding: 0; font-size: 32rpx; }
|
||||
|
||||
@@ -21,16 +21,6 @@ Page({
|
||||
code : "", // 验证码
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@@ -127,7 +117,7 @@ Page({
|
||||
code : value.code,
|
||||
password : value.password,
|
||||
password_confirmation : value.password_confirmation,
|
||||
parent_id : ''
|
||||
parent_id : getApp().globalData.invite
|
||||
}
|
||||
wx.$api.auth.register(data).then(res => {
|
||||
// 存储登录信息
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarTitleText": "账号注册",
|
||||
"navigationBarBackgroundColor": "#f7f6fa"
|
||||
}
|
||||
@@ -28,8 +28,8 @@
|
||||
<image class="refertoCont-img" src="https://cdn.douhuofalv.com/images/2023/08/04/b099539e6c5d6d89b69516002412a4d9.png" mode="widthFix"></image>
|
||||
<view class="refertoCont-name">
|
||||
<view class="refertoCont-title">注册成功</view>
|
||||
<view class="refertoCont-text">恭喜您成功注册,请登录绚火平台</view>
|
||||
<navigator class="refertoCont-go" hover-class="none" open-type="redirect" url="/pages/login/index">立即登录</navigator>
|
||||
<view class="refertoCont-text">恭喜您已完成注册,点击按钮返回</view>
|
||||
<navigator class="refertoCont-go" hover-class="none" open-type="navigateBack" delta="2">确定</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
131
pages/resetPassword/resetPassword.js
Normal file
@@ -0,0 +1,131 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
codename : '获取验证码',
|
||||
smsDisabled : false, // 获取验证码 禁止点击
|
||||
seeState : false, // 小眼睛
|
||||
againState : false, // 小眼睛-再次输入密码
|
||||
passwordState : true, // 小眼睛-显示
|
||||
passwordAgain : true, // 小眼睛-显示-再次输入密码
|
||||
phone : "", // 手机号
|
||||
code : "", // 验证码
|
||||
},
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
bindInput(e) {
|
||||
this.setData({
|
||||
phone: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 短信验证码
|
||||
*/
|
||||
bindCode(e) {
|
||||
this.setData({
|
||||
code: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取短信验证码
|
||||
*/
|
||||
getPhoneCode(e) {
|
||||
let mobile = this.data.phone
|
||||
var _this = this
|
||||
if (mobile == "") {
|
||||
wx.showToast({
|
||||
title : '手机号不能为空',
|
||||
icon : 'none',
|
||||
duration : 1000
|
||||
})
|
||||
return false;
|
||||
}else{
|
||||
wx.$api.auth.getSms({
|
||||
mobileNo: mobile
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
_this.setData({
|
||||
smsDisabled : true
|
||||
})
|
||||
|
||||
wx.showToast({
|
||||
title : '发送成功',
|
||||
icon : 'success',
|
||||
duration: 2000
|
||||
})
|
||||
var num = 60;
|
||||
var timer = setInterval(function () {
|
||||
num--;
|
||||
if (num <= 0) {
|
||||
clearInterval(timer);
|
||||
_this.setData({
|
||||
codename : '重新发送',
|
||||
smsDisabled : false
|
||||
})
|
||||
|
||||
} else {
|
||||
_this.setData({
|
||||
codename : num + "s后重新获取",
|
||||
smsDisabled : true
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(err=>{})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看密码
|
||||
*/
|
||||
seeClick() {
|
||||
this.setData({
|
||||
seeState : !this.data.seeState,
|
||||
passwordState: !this.data.passwordState
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看密码-再次
|
||||
*/
|
||||
seeAgain() {
|
||||
this.setData({
|
||||
againState : !this.data.againState,
|
||||
passwordAgain : !this.data.passwordAgain
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
registerForm(e) {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
|
||||
let value = e.detail.value
|
||||
let data = {
|
||||
username : this.data.phone,
|
||||
code : value.code,
|
||||
password : value.password,
|
||||
password_confirmation : value.password_confirmation
|
||||
}
|
||||
wx.$api.auth.resetPassword(data).then(res => {
|
||||
wx.hideLoading()
|
||||
wx.showModal({
|
||||
content : res.data,
|
||||
showCancel : false,
|
||||
confirmText : '确定',
|
||||
confirmColor: '#da2b54',
|
||||
success : () => {
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
}).catch(() =>{ })
|
||||
}
|
||||
})
|
||||
5
pages/resetPassword/resetPassword.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "找回密码",
|
||||
"navigationBarBackgroundColor": "#f7f6fa"
|
||||
}
|
||||
35
pages/resetPassword/resetPassword.wxml
Normal file
@@ -0,0 +1,35 @@
|
||||
<image class="loginImg" src="/static/imgs/loginImg.png" mode="widthFix"></image>
|
||||
<view class="loginTitle">
|
||||
<image class="loginImg" src="/static/imgs/loginTitle.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<form bindsubmit="registerForm" class="site-form">
|
||||
<!-- 输入手机号相关 -->
|
||||
<view class="inputs">
|
||||
<input type="number" placeholder="请输入手机号" maxlength="11" bindinput="bindInput" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<input type="number" placeholder="请输入验证码" maxlength="4" name="code" class="inputs-sms" />
|
||||
<button class="sms-btn" type="default" size="mini" disabled="{{phone == '' || smsDisabled}}" bindtap="getPhoneCode">{{codename}}</button>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<input type="text" placeholder="密码须包含大小写,最少8位" name="password" password="{{passwordState}}" />
|
||||
<image class="inputs-see" bindtap="seeClick" src="{{seeState ? '/static/icons/see_active.png' : '/static/icons/see.png'}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<input type="text" placeholder="密码须包含大小写,最少8位" name="password_confirmation" password="{{passwordAgain}}" />
|
||||
<image class="inputs-see" bindtap="seeAgain" src="{{againState ? '/static/icons/see_active.png' : '/static/icons/see.png'}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<button class="btn" type="default" form-type="submit">立即重置</button>
|
||||
</form>
|
||||
|
||||
<view class="refertoEject {{successHide ? 'active' : ''}}" catchtouchmove='true'></view>
|
||||
<view class="refertoCont {{successHide ? 'active' : ''}}" catchtouchmove='true'>
|
||||
<view class="refertoWrite">
|
||||
<image class="refertoCont-img" src="https://cdn.douhuofalv.com/images/2023/08/04/b099539e6c5d6d89b69516002412a4d9.png" mode="widthFix"></image>
|
||||
<view class="refertoCont-name">
|
||||
<view class="refertoCont-title">注册成功</view>
|
||||
<view class="refertoCont-text">恭喜您已完成注册,点击按钮返回</view>
|
||||
<navigator class="refertoCont-go" hover-class="none" open-type="navigateBack" delta="2">确定</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
158
pages/resetPassword/resetPassword.wxss
Normal file
@@ -0,0 +1,158 @@
|
||||
page {
|
||||
background-color: #f7f6fa;
|
||||
}
|
||||
|
||||
.loginImg {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loginTitle {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0 50rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: -50rpx;
|
||||
}
|
||||
|
||||
.site-form {
|
||||
display: block;
|
||||
padding: 50rpx 50rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.inputs {
|
||||
background: #edebf1;
|
||||
border: none;
|
||||
position: relative;
|
||||
margin-bottom: 40rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 80rpx;
|
||||
padding: 0 50rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inputs input {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border: none;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.inputs-see {
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 32rpx;
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.sms-btn[size='mini'] {
|
||||
font-weight: normal;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 30rpx;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border-left: solid 1rpx #f2f2f2;
|
||||
color: #da2b54 !important;
|
||||
font-size: 32rpx;
|
||||
background-color: transparent !important;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: #da2b54 !important;
|
||||
width: 100% !important;
|
||||
color: white !important;
|
||||
border-radius: 100rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 100rpx;
|
||||
height: 100rpx;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn[disabled] {
|
||||
background: #da2b54 !important;
|
||||
}
|
||||
|
||||
/* 注册成功弹出 */
|
||||
/* 弹出 */
|
||||
.refertoEject {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0, 0, 0, .7);
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.refertoEject.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.refertoCont {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 10000;
|
||||
padding: 0 15%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.refertoCont.active {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.refertoWrite {
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.refertoCont-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.refertoCont-name {
|
||||
padding: 30rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.refertoCont-title {
|
||||
color: #da2b54;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.refertoCont-text {
|
||||
padding: 20rpx 0 40rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.refertoCont-go {
|
||||
background-color: #da2b54;
|
||||
display: inline-block;
|
||||
color: #ffffff;
|
||||
line-height: 88rpx;
|
||||
width: 80%;
|
||||
border-radius: 80rpx;
|
||||
}
|
||||
@@ -18,6 +18,8 @@
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background: #f7f7f7;
|
||||
border-radius: 45rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.search-input input {
|
||||
@@ -25,16 +27,16 @@
|
||||
box-sizing: border-box;
|
||||
height: 90rpx;
|
||||
color: #000;
|
||||
font-size: 28rpx;
|
||||
font-size: 30rpx;
|
||||
flex: 1;
|
||||
width: calc(100% - 150rpx);
|
||||
width: calc(100% - 180rpx);
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
font-size: 28rpx;
|
||||
background: #f1f1f1;
|
||||
color: #4c4c4c;
|
||||
width: 150rpx !important;
|
||||
font-size: 30rpx;
|
||||
background: #da2b54;
|
||||
color: white;
|
||||
width: 180rpx !important;
|
||||
padding: 0 !important;
|
||||
line-height: 90rpx;
|
||||
border-radius: 0;
|
||||
|
||||
66
pages/sign/sign.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/sign/sign.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
4
pages/sign/sign.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "签约"
|
||||
}
|
||||
2
pages/sign/sign.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/sign/sign.wxml-->
|
||||
<text>pages/sign/sign.wxml</text>
|
||||
1
pages/sign/sign.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/sign/sign.wxss */
|
||||
@@ -9,10 +9,10 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
nameValue : '', // 姓名
|
||||
mobile : '', // 电话
|
||||
address : '', // 地址
|
||||
isDefault : '', // 默认地址
|
||||
nameValue : '', // 姓名
|
||||
mobile : '', // 电话
|
||||
address : '', // 地址
|
||||
isDefault : '', // 默认地址
|
||||
// 省份选择
|
||||
areasArr : [],
|
||||
areaId : 0,
|
||||
@@ -28,6 +28,7 @@ Page({
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
|
||||
// 提交信息
|
||||
disabled : false
|
||||
},
|
||||
|
||||
@@ -55,7 +56,6 @@ Page({
|
||||
wx.$api.site.create().then(res => {
|
||||
let areas = res.data,
|
||||
areaIndex = this.data.areaIndex
|
||||
|
||||
this.setData({
|
||||
areasArr : areas,
|
||||
areaId : areas[areaIndex].id,
|
||||
@@ -74,8 +74,14 @@ Page({
|
||||
atcode = area[index].id
|
||||
if (index != this.data.areaIndex) {
|
||||
this.setData({
|
||||
areaIndex : index,
|
||||
areaId : atcode
|
||||
areaIndex : index,
|
||||
areaId : atcode,
|
||||
cityArr : [],
|
||||
cityId : 0,
|
||||
cityIndex : 0,
|
||||
regiArr : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
})
|
||||
// 获取市级列表
|
||||
this.citylist(atcode)
|
||||
@@ -91,9 +97,12 @@ Page({
|
||||
}).then(res=>{
|
||||
let cityArr = res.data
|
||||
this.setData({
|
||||
cityId : cityArr[0].id,
|
||||
cityIndex : 0,
|
||||
cityArr : cityArr
|
||||
cityId : cityArr[0].id,
|
||||
cityIndex : 0,
|
||||
cityArr : cityArr,
|
||||
regiArr : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
})
|
||||
|
||||
// 获取区级列表
|
||||
|
||||
@@ -1,44 +1,48 @@
|
||||
<form bindsubmit="siteform" class="site-form">
|
||||
<view class="site-input">
|
||||
<label>收货人</label>
|
||||
<input placeholder="请输入收货人姓名" name="name" type="text" value="{{nameValue}}" bindinput="bindinput"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>手机号码</label>
|
||||
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在省份</label>
|
||||
<picker bindchange="areasChange" value="{{areaIndex}}" range="{{areasArr}}" range-key="name">
|
||||
<view class="picker">
|
||||
{{ areasArr[areaIndex].name }}
|
||||
<view class="content">
|
||||
<form bindsubmit="siteform">
|
||||
<view class="site-form">
|
||||
<view class="site-input">
|
||||
<label>收货人</label>
|
||||
<input placeholder="请输入收货人姓名" name="name" type="text" value="{{nameValue}}" bindinput="bindinput"></input>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在城市</label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker">
|
||||
{{ cityArr[cityIndex].name }}
|
||||
<view class="site-input">
|
||||
<label>手机号码</label>
|
||||
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number"></input>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker">
|
||||
{{ regiArr[regiIndex].name }}
|
||||
<view class="site-input">
|
||||
<label>所在省份</label>
|
||||
<picker bindchange="areasChange" value="{{areaIndex}}" range="{{areasArr}}" range-key="name">
|
||||
<view class="picker nowrap">
|
||||
{{ areasArr[areaIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在城市</label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker nowrap">
|
||||
{{ cityArr[cityIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细地址" name="address"></input>
|
||||
</view>
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">保存</button>
|
||||
</view>
|
||||
</form>
|
||||
<view class="site-input">
|
||||
<label>所在区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker nowrap">
|
||||
{{ regiArr[regiIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细地址" name="address"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">保存</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
@@ -1,79 +1,17 @@
|
||||
.site-form {
|
||||
background: white;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-input {
|
||||
padding: 0 30rpx 0 200rpx;
|
||||
position: relative;
|
||||
line-height: 110rpx;
|
||||
min-height: 110rpx;
|
||||
border-bottom: 2rpx solid #f3f3f3;
|
||||
}
|
||||
.content{ min-height: 100vh; background: #f7f8f9; padding-top: 30rpx; box-sizing: border-box; }
|
||||
|
||||
.site-input::before {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
height: 1rpx;
|
||||
content: "";
|
||||
background: #e4e6f2;
|
||||
}
|
||||
/* 收货地址 */
|
||||
.site-form{ background: white; border-radius: 20rpx; margin: 0 30rpx; padding: 20rpx 0; }
|
||||
.site-input{ display: flex; justify-content: space-between; align-items: center; padding: 0 30rpx;}
|
||||
.site-input label{ width: 170rpx; font-size: 30rpx; color: #333; line-height: 90rpx; }
|
||||
.site-input input{ width: calc(100% - 170rpx); font-size: 30rpx; }
|
||||
.site-input picker{ width: calc(100% - 170rpx); }
|
||||
.picker{ padding-right: 90rpx; width: 100%; box-sizing: border-box; position: relative; }
|
||||
.picker-icon{ width: 32rpx; height: 32rpx; position: absolute; right: 0; top: 50%; margin-top: -16rpx; }
|
||||
|
||||
.site-input:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
/* 保存地址 */
|
||||
.site-btn{ padding: 50rpx 30rpx; }
|
||||
.site-btn button[size="mini"]{ background: #e92152; height: 90rpx; line-height: 90rpx; width: 100%; border-radius: 45rpx; color: white; font-size: 32rpx; }
|
||||
.site-btn button[size="mini"][disabled] { background: #e92152; color: #fff; opacity: .5; }
|
||||
|
||||
.site-input label {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.site-input input {
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
.site-input image {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% - 22rpx);
|
||||
}
|
||||
|
||||
.site-btn {
|
||||
padding: 20rpx 30rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.site-btn button[size="mini"] {
|
||||
width: 100%;
|
||||
background: #e92152;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 30rpx;
|
||||
color: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-btn button[disabled] {
|
||||
background: #e92152 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.site-switch {
|
||||
font-size: 32rpx;
|
||||
margin: 30rpx;
|
||||
display: flex;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.site-switch text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.site-switch-active {
|
||||
color: #797979;
|
||||
}
|
||||
@@ -11,17 +11,14 @@ Page({
|
||||
address : '',
|
||||
isDefault : '',
|
||||
disabled : false,
|
||||
|
||||
//省份选择
|
||||
areas : [],
|
||||
areaId : '',
|
||||
areaIndex : 0,
|
||||
|
||||
//市级选择
|
||||
cityList : [],
|
||||
cityId : 0,
|
||||
cityIndex : 0,
|
||||
|
||||
//区域选择
|
||||
regiList : [],
|
||||
regiId : 0,
|
||||
@@ -90,8 +87,14 @@ Page({
|
||||
atcode = area[index].id
|
||||
if (index != this.data.areaIndex) {
|
||||
this.setData({
|
||||
areaIndex : index,
|
||||
areaId : atcode
|
||||
areaIndex : index,
|
||||
areaId : atcode,
|
||||
cityList : [],
|
||||
cityId : 0,
|
||||
cityIndex : 0,
|
||||
regiList : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
})
|
||||
// 获取市级列表
|
||||
this.citylist(atcode)
|
||||
@@ -107,9 +110,12 @@ Page({
|
||||
}).then(res=>{
|
||||
let cityArr = res.data
|
||||
this.setData({
|
||||
cityId : cityArr[0].id,
|
||||
cityIndex : 0,
|
||||
cityList : cityArr
|
||||
cityId : cityArr[0].id,
|
||||
cityIndex : 0,
|
||||
cityList : cityArr,
|
||||
regiList : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
})
|
||||
|
||||
// 获取区级列表
|
||||
@@ -208,14 +214,17 @@ Page({
|
||||
*/
|
||||
addressRemove(){
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否删除地址',
|
||||
success : res=> {
|
||||
title : '提示',
|
||||
content : '是否删除地址',
|
||||
confirmText : '删除',
|
||||
confirmColor: '#e92152',
|
||||
success : res => {
|
||||
if (res.confirm) {
|
||||
wx.showLoading({
|
||||
title: '删除中',
|
||||
})
|
||||
wx.$api.site.siteDel(this.data.addressId).then(res=>{
|
||||
wx.$api.site.siteDel(this.data.addressId).then(() => {
|
||||
wx.hideLoading()
|
||||
wx.navigateBack()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,52 +1,53 @@
|
||||
<form bindsubmit="siteform" class="site-form">
|
||||
<view class="site-input">
|
||||
<label>收货人</label>
|
||||
<input placeholder="请输入收货人姓名" name="name" value="{{nameValue}}" type="text" bindinput="bindinput"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>手机号码</label>
|
||||
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number" value="{{mobile}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在省份</label>
|
||||
<picker bindchange="areasChange" value="{{areaIndex}}" range="{{areas}}" range-key="name" name="region_id">
|
||||
<view class="picker">
|
||||
{{ areas[areaIndex].name }}
|
||||
<view class="content">
|
||||
<form bindsubmit="siteform">
|
||||
<view class="site-form">
|
||||
<view class="site-input">
|
||||
<label>收货人</label>
|
||||
<input placeholder="请输入收货人姓名" name="name" value="{{nameValue}}" type="text" bindinput="bindinput"></input>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在城市</label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityList}}" range-key="name" class="conneColor" name="city_id">
|
||||
<view class="picker">
|
||||
{{ cityList[cityIndex].name }}
|
||||
<view class="site-input">
|
||||
<label>手机号码</label>
|
||||
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number" value="{{mobile}}"></input>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiList}}" range-key="name" class="conneColor" name="district_id">
|
||||
<view class="picker">
|
||||
{{ regiList[regiIndex].name }}
|
||||
<view class="site-input">
|
||||
<label>所在省份</label>
|
||||
<picker bindchange="areasChange" value="{{areaIndex}}" range="{{areas}}" range-key="name" name="region_id">
|
||||
<view class="picker nowrap">
|
||||
{{ areas[areaIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细地址" name="address" value="{{address}}"></input>
|
||||
</view>
|
||||
<view class="site-switch">
|
||||
<text>设置默认地址</text>
|
||||
<switch style='zoom:.6;' bindchange="addressDefault" color="#ff9951" checked="{{isDefault}}" />
|
||||
</view>
|
||||
<view class="site-del" bindtap="addressRemove">
|
||||
<image class="site-del-img" src="/static/icons/siteDel.png"></image>
|
||||
<text>删除地址</text>
|
||||
</view>
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">保存</button>
|
||||
</view>
|
||||
</form>
|
||||
<view class="site-input">
|
||||
<label>所在城市</label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityList}}" range-key="name" class="conneColor" name="city_id">
|
||||
<view class="picker nowrap">
|
||||
{{ cityList[cityIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiList}}" range-key="name" class="conneColor" name="district_id">
|
||||
<view class="picker nowrap">
|
||||
{{ regiList[regiIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细地址" name="address" value="{{address}}"></input>
|
||||
</view>
|
||||
<view class="site-switch">
|
||||
<text>设置默认地址</text>
|
||||
<switch style='zoom:.6;' bindchange="addressDefault" color="#e92152" checked="{{isDefault}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">保存</button>
|
||||
</view>
|
||||
<view class="site-del" bindtap="addressRemove">删除地址</view>
|
||||
</form>
|
||||
</view>
|
||||
@@ -1,99 +1,19 @@
|
||||
.site-form {
|
||||
background: white;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-input {
|
||||
padding: 0 30rpx 0 200rpx;
|
||||
position: relative;
|
||||
line-height: 110rpx;
|
||||
min-height: 110rpx;
|
||||
}
|
||||
.content{ min-height: 100vh; background: #f7f8f9; padding-top: 30rpx; box-sizing: border-box; }
|
||||
|
||||
.site-input::before {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
height: 1rpx;
|
||||
content: "";
|
||||
background: #e4e6f2;
|
||||
}
|
||||
/* 收货地址 */
|
||||
.site-form{ background: white; border-radius: 20rpx; margin: 0 30rpx; padding: 20rpx 0; }
|
||||
.site-input{ display: flex; justify-content: space-between; align-items: center; padding: 0 30rpx;}
|
||||
.site-input label{ width: 170rpx; font-size: 30rpx; color: #333; line-height: 90rpx; }
|
||||
.site-input input{ width: calc(100% - 170rpx); font-size: 30rpx; }
|
||||
.site-input picker{ width: calc(100% - 170rpx); }
|
||||
.picker{ padding-right: 90rpx; width: 100%; box-sizing: border-box; position: relative; }
|
||||
.picker-icon{ width: 32rpx; height: 32rpx; position: absolute; right: 0; top: 50%; margin-top: -16rpx; }
|
||||
.site-switch{ display: flex; align-items: center; justify-content: space-between; padding: 0 30rpx; height: 90rpx; color: #333; }
|
||||
|
||||
.site-input:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
/* 保存地址 */
|
||||
.site-btn{ padding: 50rpx 30rpx 30rpx; }
|
||||
.site-btn button[size="mini"]{ background: #e92152; height: 90rpx; line-height: 90rpx; width: 100%; vertical-align: top; border-radius: 45rpx; color: white; font-size: 32rpx; }
|
||||
.site-btn button[size="mini"][disabled] { background: #e92152; color: #fff; opacity: .5; }
|
||||
.site-del{ margin: 0 30rpx; line-height: 90rpx; text-align: center; color: #e92152; background: white; border-radius: 45rpx; }
|
||||
|
||||
.site-input label {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.site-input input {
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
.site-input image {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% - 22rpx);
|
||||
}
|
||||
|
||||
.site-btn {
|
||||
padding: 20rpx 30rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.site-btn button[size="mini"] {
|
||||
width: 100%;
|
||||
background: #e92152;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 30rpx;
|
||||
color: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-btn button[disabled] {
|
||||
background: #e92152 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.site-switch {
|
||||
font-size: 32rpx;
|
||||
margin: 30rpx;
|
||||
display: flex;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.site-switch text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.site-switch-active {
|
||||
color: #797979;
|
||||
}
|
||||
|
||||
.site-del {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 40rpx;
|
||||
padding-top: 60rpx;
|
||||
border-top: 2rpx solid rgb(228, 230, 242);
|
||||
color: #ff9951;
|
||||
}
|
||||
|
||||
.site-del-btn {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-del-img {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
display: inline-block;
|
||||
vertical-align: -10rpx;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
@@ -1,25 +1,16 @@
|
||||
<view class="list" wx:if="{{listArr.length > 0}}">
|
||||
<view class="address" wx:for="{{listArr}}" wx:key="listArr">
|
||||
<!-- "hover-class="none" url="./edit/edit?id={{item.address_id}} -->
|
||||
<view class="address-top">
|
||||
<view class="address-img">
|
||||
<image src="/static/icons/siteIcon.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="address-flex">
|
||||
<image class="address-icon" src="/static/icons/siteIcon.png" mode="widthFix"></image>
|
||||
<view class="address-cont">
|
||||
<view class="address-cont-title">
|
||||
<view class="address-cont-name">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="address-cont-mobile">
|
||||
{{item.mobile}}
|
||||
</view>
|
||||
<view class="address-cont-default" wx:if="{{item.default}}">
|
||||
默认
|
||||
</view>
|
||||
<view class="nowrap-multi address-text">{{item.full_address}}</view>
|
||||
<view class="address-info">
|
||||
<text class="address-name nowrap">{{item.name}}</text>
|
||||
<text class="address-mobile">{{item.mobile}}</text>
|
||||
<text class="address-tag">默认</text>
|
||||
</view>
|
||||
<view class="nowrap-multi address-cont-text">{{item.full_address}}</view>
|
||||
</view>
|
||||
<image src="/static/icons/siteEdit.png" bindtap="addressEdit" data-id="{{item.address_id}}" class="address-btn"></image>
|
||||
<image src="/static/icons/siteEdit.png" bindtap="addressEdit" data-id="{{item.address_id}}" class="address-btn" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="select" wx:if="{{type == 'selectAddress' || type == 'goodsAddress'}}">
|
||||
<view class="select-btn" bindtap="selectAddress" data-index="{{index}}">
|
||||
|
||||
@@ -1,116 +1,21 @@
|
||||
page{
|
||||
background-color: #f4f4f6;
|
||||
}
|
||||
|
||||
.list {
|
||||
border-bottom: 90px solid transparent;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 地址列表 */
|
||||
.list{ padding: 30rpx 0 180rpx; height: 100vh; box-sizing: border-box; background: #f7f8f9; }
|
||||
.address{ background: white; border-radius: 20rpx; margin: 0 30rpx; }
|
||||
.address-flex{ display: flex; justify-content: space-between; align-items: center; padding: 30rpx; }
|
||||
.address-icon{ width: 38rpx; height: 38rpx; }
|
||||
.address-btn{ width: 38rpx; height: 38rpx; }
|
||||
.address-cont{ width: calc(100% - 76rpx); padding: 0 30rpx; box-sizing: border-box; }
|
||||
.address-text{ font-size: 30rpx; line-height: 40rpx; font-weight: bold; padding-bottom: 15rpx; }
|
||||
.address-info{ display: flex; align-items: center; }
|
||||
.address-tag{ color: white; height: 30rpx; display: inline-block; font-size: 20rpx; background: #e92152; padding: 0 10rpx; border-radius: 10rpx; margin-left: 10rpx; }
|
||||
.address-name{ font-size: 30rpx; max-width: 200rpx; }
|
||||
.address-mobile{ padding-left: 20rpx; color: gray; }
|
||||
.select{ text-align: center; color: #e92152; border-top: solid 1rpx #f7f8f9; font-size: 30rpx; line-height: 90rpx; }
|
||||
|
||||
.address {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.address:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.address-top {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.address-img {
|
||||
background-color: #eeeeee;
|
||||
border-radius: 50%;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
|
||||
.address-img image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.address-btn {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-top: 62rpx;
|
||||
}
|
||||
|
||||
.address-cont {
|
||||
width: calc(100% - 102rpx);
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-cont-title {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.address-cont-mobile {
|
||||
margin: 0 20rpx;
|
||||
color: rgb(104, 104, 104);
|
||||
}
|
||||
|
||||
.address-cont-default {
|
||||
background-color: #ff9951;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
border-radius: 40rpx;
|
||||
padding: 0 15rpx;
|
||||
height: 38rpx;
|
||||
line-height: 38rpx;
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
|
||||
.address-cont-text {
|
||||
line-height: 42rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.select {
|
||||
text-align: right;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.select-btn {
|
||||
border: 2rpx solid #e92152;
|
||||
color: #ff9951;
|
||||
display: inline-block;
|
||||
font-size: 28rpx;
|
||||
padding: 0 30rpx;
|
||||
line-height: 54rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
/* 空页面 */
|
||||
.pages-hint{ padding-bottom: 180rpx; }
|
||||
|
||||
/* 按钮 */
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.btn {
|
||||
line-height: 50px;
|
||||
background-color: #e92152;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.footer { width: 100%; background-color: #FFFFFF; position: fixed; left: 0; bottom: 0; z-index: 9; padding: 30rpx 30rpx 60rpx; box-sizing: border-box; }
|
||||
.footer .btn { line-height: 90rpx; padding: 0; font-size: 32rpx; font-weight: bold; background-color: #e92152; text-align: center; color: #FFFFFF; border-radius: 45rpx; }
|
||||
|
||||
@@ -13,7 +13,6 @@ Page({
|
||||
shareSee : false, //分享弹出
|
||||
inviteText : '', //邀请码
|
||||
inviteCode : '', //二维码
|
||||
|
||||
//海报
|
||||
canvas : ''
|
||||
},
|
||||
@@ -38,7 +37,7 @@ Page({
|
||||
*/
|
||||
onShow() {
|
||||
// 小程序码
|
||||
// this.ShareInfo();
|
||||
this.ShareInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -46,7 +45,7 @@ Page({
|
||||
*/
|
||||
ShareInfo() {
|
||||
wx.$api.user.miniShare({
|
||||
url: '/pages/mall/index'
|
||||
url: 'pages/mall/index'
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
inviteCode: res.data.qrcode
|
||||
@@ -151,9 +150,7 @@ Page({
|
||||
|
||||
// 返回上一页
|
||||
returnGo() {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
wx.navigateBack()
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
<!-- header -->
|
||||
<view class="navigation {{isFixedTop > 0 ? 'active' : ''}}" style="padding-top:{{barHeight}}px;">
|
||||
<image bindtap="returnGo" class="navigation-arrow" src="{{isFixedTop > 0 ? '/static/icons/arrowBlack.png' : '/static/icons/arrowWrite.png'}}"></image>
|
||||
</view>
|
||||
|
||||
<!-- 二维码海报 -->
|
||||
<view class="code">
|
||||
<image src="https://cdn.douhuofalv.com/images/2023/08/11/cd8093d6ab1a248e5154be48b0ddcaac.jpg" class="code-back"></image>
|
||||
<view class="code-cont">
|
||||
@@ -20,16 +23,18 @@
|
||||
<canvas type="2d" style="width: 375px; height: 800px;" id="coverCanvas" class="canvas-img" />
|
||||
|
||||
<!-- 分享弹出 -->
|
||||
<view class="sharePop {{shareSee ? 'active' : ''}}">
|
||||
<view class="shareCont">
|
||||
<button class="shareCont-label codeShare-button" open-type="share" hover-class="none">
|
||||
<image src="https://cdn.shuiganying.com/images/2023/03/28/f8b773edc2fe6db8e45f96773b9a8dc4.png"></image>
|
||||
微信好友
|
||||
</button>
|
||||
<view class="shareCont-label" bindtap="onCanvas">
|
||||
<image src="https://cdn.shuiganying.com/images/2023/03/28/cfe0efbb53eaf7911ea5211923859c65.png"></image>
|
||||
保存二维码
|
||||
<view class="sharePop-lay {{shareSee ? 'active' : ''}}">
|
||||
<view class="sharePop">
|
||||
<view class="shareCont">
|
||||
<button class="shareCont-label codeShare-button" open-type="share" hover-class="none">
|
||||
<image src="https://cdn.shuiganying.com/images/2023/03/28/f8b773edc2fe6db8e45f96773b9a8dc4.png"></image>
|
||||
微信好友
|
||||
</button>
|
||||
<view class="shareCont-label" bindtap="onCanvas">
|
||||
<image src="https://cdn.shuiganying.com/images/2023/03/28/cfe0efbb53eaf7911ea5211923859c65.png"></image>
|
||||
保存二维码
|
||||
</view>
|
||||
</view>
|
||||
<view class="shareCancel" bindtap="shareTap">取消</view>
|
||||
</view>
|
||||
<view class="shareCancel" bindtap="shareTap">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,148 +1,31 @@
|
||||
/* 返回上一页 */
|
||||
.navigation{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: transparent;
|
||||
transition: .2s;
|
||||
}
|
||||
.navigation{ position: fixed; top: 0; left: 0; z-index: 9; width: 100%; height: 90rpx; background-color: transparent; transition: .2s; }
|
||||
.navigation.active { background-color: transparent; }
|
||||
.navigation-arrow { width: 44rpx; height: 44rpx; margin: 20rpx 15rpx 0 20rpx; }
|
||||
|
||||
.navigation.active {
|
||||
background-color: transparent;
|
||||
}
|
||||
/* 二维码海报 */
|
||||
.code { width: 100vw; height: 100vh; position: relative; }
|
||||
.code-back { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
|
||||
.code-cont { width: 400rpx; position: absolute; z-index: 9; text-align: center; left: calc(50% - 200rpx); bottom: 8vh; }
|
||||
.code-img{ margin: 0 auto 20rpx; overflow: hidden; width: 260rpx; height: 260rpx; border: 4rpx solid #ff4f64; background-color: #ffffff; padding: 10rpx; box-sizing: border-box; border-radius: 50%; }
|
||||
.code-img image { width: 100%; }
|
||||
.code-text { color: #ffffff; font-size: 30rpx; }
|
||||
|
||||
.navigation-arrow {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 20rpx 15rpx 0 20rpx;
|
||||
/* 海报分享 */
|
||||
.code-share { position: absolute; right: 0; bottom: 15%; background: linear-gradient(to right, #fffafb, #ffd4dd); width: 50rpx; text-align: center; border-radius: 26rpx 0 0 26rpx; padding: 30rpx 10rpx 30rpx 15rpx; box-shadow: 0 0 0 6rpx rgba(249, 96, 116, .8); z-index: 9;
|
||||
}
|
||||
.code-share-name { writing-mode:vertical-rl; font-size: 30rpx; padding-left: 4rpx; color: #da2b54; }
|
||||
.code-share image { width: 36rpx; height: 36rpx; margin-bottom: 5rpx; }
|
||||
|
||||
|
||||
/* 二维码 */
|
||||
.code {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.code-back {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.code-cont {
|
||||
width: 400rpx;
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
text-align: center;
|
||||
left: calc(50% - 200rpx);
|
||||
bottom: 5%;
|
||||
}
|
||||
|
||||
.code-img{
|
||||
margin: 0 auto 20rpx;
|
||||
overflow: hidden;
|
||||
width: 260rpx;
|
||||
height: 260rpx;
|
||||
border: 4rpx solid #ff4f64;
|
||||
background-color: #ffffff;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.code-img image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.code-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.code-share {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
right: 0;
|
||||
bottom: 15%;
|
||||
background: linear-gradient(to right, #fffafb, #ffd4dd);
|
||||
width: 50rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx 0 0 26rpx;
|
||||
padding: 30rpx 10rpx 30rpx 15rpx;
|
||||
box-shadow: 0 0 0 6rpx rgba(249, 96, 116, .8);
|
||||
}
|
||||
|
||||
.code-share-name {
|
||||
writing-mode:vertical-rl;
|
||||
font-size: 30rpx;
|
||||
padding-left: 4rpx;
|
||||
color: #da2b54;
|
||||
}
|
||||
|
||||
.code-share image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
|
||||
.sharePop {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #ffffff;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sharePop.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.shareCont-label image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
display: block;
|
||||
margin: 0 auto 10rpx;
|
||||
}
|
||||
|
||||
.shareCancel {
|
||||
border-top: 2rpx solid #ebebeb;
|
||||
color: #000000;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.shareCont{
|
||||
display: flex;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.shareCont-label {
|
||||
color: #000000;
|
||||
flex: 2;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.codeShare-button {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
/* 弹出层 */
|
||||
.sharePop-lay{ background: rgba(0, 0, 0, .5); position: fixed; top: 0; left: 0; right: 0; height: 100vh; width: 100vw; z-index: 9; display: none; }
|
||||
.sharePop-lay.active{ display: block; }
|
||||
.sharePop { position: fixed; width: 100%; z-index: 99; left: 0; bottom: 0; background-color: #ffffff; }
|
||||
.shareCont-label image { width: 60rpx; height: 60rpx; display: block; margin: 0 auto 10rpx; }
|
||||
.shareCancel { border-top: 2rpx solid #ebebeb; color: #000000; width: 100%; text-align: center; line-height: 100rpx; }
|
||||
.shareCont{ display: flex; padding: 30rpx 0; }
|
||||
.shareCont-label { color: #000000; flex: 2; text-align: center; font-size: 28rpx; }
|
||||
.codeShare-button { background-color: transparent; padding: 0; font-weight: normal; }
|
||||
|
||||
/* canvas */
|
||||
.canvas-img {
|
||||
position: fixed;
|
||||
left: 0%;
|
||||
/* left: -10000%; */
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
.canvas-img { position: fixed; left: 0%; left: -100%; top: 0; z-index: -1; }
|
||||
@@ -8,15 +8,10 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
userLogin: false,
|
||||
userData: '', // 用户信息
|
||||
userLogin : false,
|
||||
userData : '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
@@ -31,7 +26,8 @@ Page({
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
userLogin: false
|
||||
userLogin: false,
|
||||
userData : ''
|
||||
})
|
||||
},
|
||||
|
||||
@@ -43,16 +39,31 @@ Page({
|
||||
this.setData({
|
||||
userData: res.data
|
||||
})
|
||||
console.log(res)
|
||||
}).catch(err => {})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理未登录时的转跳
|
||||
*/
|
||||
userNav(e){
|
||||
let pageUrl = e.currentTarget.dataset.url
|
||||
if(wx.getStorageSync("token") != ''){
|
||||
if(e.currentTarget.dataset.type && e.currentTarget.dataset.type == 'needSign' && this.data.userData.need_sign){
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '您还未完成实名认证与签约成为VIP用户,无法获得邀请码',
|
||||
cancelText : '稍后完成',
|
||||
confirmText : '立即完善',
|
||||
confirmColor : '#da2b54',
|
||||
complete : res => {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/idcard/idcard'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: pageUrl
|
||||
})
|
||||
@@ -62,5 +73,16 @@ Page({
|
||||
url: "/pages/login/index"
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 购买产品
|
||||
*/
|
||||
onBuy(e){
|
||||
let { id } = e.currentTarget.dataset
|
||||
if(id){
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/details/details?id=' + id,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -51,10 +51,6 @@
|
||||
<image class="order-icon" src="/static/imgs/order_04.png" mode="widthFix"></image>
|
||||
<view class="order-label">已签收</view>
|
||||
</view>
|
||||
<!-- <view class="order-item">
|
||||
<image class="order-icon" src="/static/imgs/order_05.png" mode="widthFix"></image>
|
||||
<view class="order-label">售后</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -67,15 +63,15 @@
|
||||
<image class="tool-icon" src="/static/imgs/tool_05.png" mode="widthFix"></image>
|
||||
<view class="order-label">我的账户</view>
|
||||
</view>
|
||||
<view class="order-item" bindtap="userNav" data-url="/pages/bankCard/index">
|
||||
<!-- <view class="order-item" bindtap="userNav" data-url="/pages/bankCard/index">
|
||||
<image class="tool-icon" src="/static/imgs/tool_08.png" mode="widthFix"></image>
|
||||
<view class="order-label">我的银行卡</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="order-item" bindtap="userNav" data-url="/pages/user/team/index">
|
||||
<image class="tool-icon" src="/static/imgs/tool_06.png" mode="widthFix"></image>
|
||||
<view class="order-label">我的团队</view>
|
||||
</view>
|
||||
<view class="order-item" bindtap="userNav" data-url="/pages/user/code/code">
|
||||
<view class="order-item" bindtap="userNav" data-url="/pages/user/code/code" data-type="needSign">
|
||||
<image class="tool-icon" src="/static/imgs/tool_07.png" mode="widthFix"></image>
|
||||
<view class="order-label">邀请码</view>
|
||||
</view>
|
||||
@@ -83,9 +79,9 @@
|
||||
<image class="tool-icon" src="/static/imgs/tool_01.png" mode="widthFix"></image>
|
||||
<view class="order-label">我的地址</view>
|
||||
</view>
|
||||
<view class="order-item" bindtap="userNav" data-url="/pages/user/setup/setup">
|
||||
<view class="order-item" bindtap="userNav" data-url="/pages/idcard/idcard">
|
||||
<image class="tool-icon" src="/static/imgs/tool_02.png" mode="widthFix"></image>
|
||||
<view class="order-label">意见反馈</view>
|
||||
<view class="order-label">实名认证</view>
|
||||
</view>
|
||||
<navigator hover-class="none" class="order-item" url="/pages/user/about/about">
|
||||
<image class="tool-icon" src="/static/imgs/tool_03.png" mode="widthFix"></image>
|
||||
@@ -105,7 +101,7 @@
|
||||
<view class="goods-title-name"><text class="goods-title-left"></text>为你推荐<text class="goods-title-right"></text></view>
|
||||
</view>
|
||||
<view class="goodsList">
|
||||
<view class="goodsItem" wx:for="{{userData.goods}}" wx:key="goods">
|
||||
<view class="goodsItem" wx:for="{{userData.goods}}" wx:key="goods" bind:tap="onBuy" data-id="{{item.goods_id}}">
|
||||
<view class="goodsItem-img">
|
||||
<image mode="aspectFill" src="{{item.cover}}"></image>
|
||||
</view>
|
||||
|
||||
@@ -91,11 +91,12 @@ page {
|
||||
}
|
||||
|
||||
.order-icon {
|
||||
width: 56rpx;
|
||||
width: 52rpx;
|
||||
}
|
||||
|
||||
.order-label {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order--number {
|
||||
@@ -120,8 +121,7 @@ page {
|
||||
}
|
||||
|
||||
.tool-icon {
|
||||
width: 62rpx;
|
||||
margin-bottom: 10rpx;
|
||||
width: 52rpx;
|
||||
}
|
||||
|
||||
/* 推荐 */
|
||||
@@ -230,7 +230,7 @@ page {
|
||||
|
||||
.goodsItem-price {
|
||||
flex: 1;
|
||||
color: #ff1122;
|
||||
color: #da2b54;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ page {
|
||||
padding: 0 !important;
|
||||
background-color: transparent;
|
||||
font-weight: normal !important;
|
||||
color: #6c78f8;
|
||||
color: #da2b54;
|
||||
}
|
||||
|
||||
.publicPop-btn-go {
|
||||
|
||||
@@ -123,6 +123,7 @@ page {
|
||||
padding: 120rpx 0;
|
||||
color: #6d6d6d;
|
||||
font-size: 28rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.pages-no image {
|
||||
|
||||
148
pages/withdraw/withdraw.js
Normal file
@@ -0,0 +1,148 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
banks : [],
|
||||
type : 1,
|
||||
bankVal : 0,
|
||||
isDisabled : false,
|
||||
balance : 0,
|
||||
greater : false,
|
||||
rate : 0,
|
||||
min : 0,
|
||||
name : '',
|
||||
idcard : '',
|
||||
identity : {
|
||||
name : '',
|
||||
id_card_no : ''
|
||||
},
|
||||
bankNo : '',
|
||||
mobile : '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
wx.$api.withdraw.create().then(res => {
|
||||
let { bank, tax, min, balance, banks, id_card, has_bank} = res.data;
|
||||
let banksArr = [{ id: '', name: '请选择开户银行'}].concat(banks)
|
||||
this.setData({
|
||||
banks : banksArr,
|
||||
balance : balance,
|
||||
rate : tax,
|
||||
min : min,
|
||||
name : id_card.name,
|
||||
idcard : id_card.id_card_no,
|
||||
identity : id_card,
|
||||
isDisabled : has_bank
|
||||
})
|
||||
if(has_bank){
|
||||
let bankIndex = banksArr.findIndex(val => val.name === bank.bank_name)
|
||||
this.setData({
|
||||
type : bank.message_type,
|
||||
bankNo : bank.bank_no,
|
||||
mobile : bank.mobile,
|
||||
bankVal : bankIndex >= 0 ? bankIndex: 0
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 选择提现类型
|
||||
*/
|
||||
onTypeTab(e){
|
||||
let { type } = e.currentTarget.dataset
|
||||
if(type == this.data.type) return
|
||||
if(this.data.isDisabled){
|
||||
wx.showToast({
|
||||
title: "银行卡信息已绑定,如需变更请联系系统管理员",
|
||||
icon : "none"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if(type == 1){
|
||||
this.setData({
|
||||
name : this.data.identity.name,
|
||||
idcard : this.data.identity.id_card_no
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
name : '',
|
||||
idcard : ''
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
type
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 选择开户银行
|
||||
*/
|
||||
bankChange(e){
|
||||
let { value } = e.detail;
|
||||
this.setData({
|
||||
bankVal: value
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 全部提现
|
||||
*/
|
||||
onAll(){
|
||||
this.setData({
|
||||
amount: this.data.balance
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 输入提现金额
|
||||
*/
|
||||
onInput(e){
|
||||
let { value } = e.detail;
|
||||
this.setData({
|
||||
greater: parseFloat(value) > parseFloat(this.data.balance)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 提现
|
||||
*/
|
||||
onSubmit(e){
|
||||
if(this.data.bankVal == 0){
|
||||
wx.showToast({
|
||||
title: '请选择开户银行',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.showLoading({
|
||||
title: '提交中...',
|
||||
mask : true
|
||||
})
|
||||
let valueObj = e.detail.value
|
||||
let data = {
|
||||
bank_name : this.data.banks[this.data.bankVal].name,
|
||||
amount : valueObj.amount,
|
||||
name : valueObj.name,
|
||||
mobileNo : valueObj.mobile,
|
||||
bank_no : valueObj.bankNo,
|
||||
id_card : valueObj.idcard || '',
|
||||
message_type: this.data.type,
|
||||
}
|
||||
wx.$api.withdraw.withdraws(data).then(res => {
|
||||
wx.hideLoading()
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : res.data,
|
||||
showCancel : false,
|
||||
confirmColor : '#da2b54',
|
||||
success : ModalRes => {
|
||||
if(ModalRes.confirm){
|
||||
wx.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(err => {})
|
||||
}
|
||||
})
|
||||
4
pages/withdraw/withdraw.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "提现"
|
||||
}
|
||||
52
pages/withdraw/withdraw.wxml
Normal file
@@ -0,0 +1,52 @@
|
||||
<view class="content">
|
||||
<view class="block" wx:if="{{banks.length > 0}}">
|
||||
<form bindsubmit="onSubmit">
|
||||
<view class="bank">
|
||||
<view class="bank-tabs">
|
||||
<view class="item {{type == 1 ? 'active': ''}}" bind:tap="onTypeTab" data-type="1">本人银行卡</view>
|
||||
<view class="item {{type == 2 ? 'active': ''}}" bind:tap="onTypeTab" data-type="2">非本人银行卡</view>
|
||||
</view>
|
||||
<view class="bank-input">
|
||||
<label>开户银行</label>
|
||||
<picker class="banks-picker" range="{{banks}}" range-key="name" value="{{bankVal}}" disabled="{{isDisabled}}" bindchange="bankChange" >
|
||||
<view class="banks-text {{bankVal === 0 ? 'gray' : ''}}">
|
||||
{{banks[bankVal].name}}
|
||||
<image class="banks-icon" src="/static/icons/arrow_more.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="bank-input">
|
||||
<label>银行卡号</label>
|
||||
<input type="number" placeholder="输入银行卡号" name="bankNo" value="{{bankNo}}" disabled="{{isDisabled}}" maxlength="20" />
|
||||
</view>
|
||||
<view class="bank-input">
|
||||
<label>预留手机</label>
|
||||
<input type="number" placeholder="输入开户预留手机号" name="mobile" value="{{mobile}}" disabled="{{isDisabled}}" maxlength="11" />
|
||||
</view>
|
||||
<view class="bank-input">
|
||||
<label>持卡人</label>
|
||||
<input type="text" placeholder="输入持卡人真实姓名" name="name" value="{{name}}" disabled="{{isDisabled || type == 1}}" maxlength="15" />
|
||||
</view>
|
||||
<view class="bank-input" wx:if="{{type == 2}}">
|
||||
<label>身份证号</label>
|
||||
<input type="idcard" placeholder="输入开户人身份证号" name="idcard" value="{{idcard}}" disabled="{{isDisabled}}" maxlength="18" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="cny">
|
||||
<view class="bank-from">
|
||||
<view class="block-title">提现金额</view>
|
||||
<view class="cny-title"><text wx:if="{{min >= 1}}">最小提现金额:{{min}}元,</text><text>提现手续费{{rate}}%</text></view>
|
||||
<view class="cny-input">
|
||||
<label>¥</label>
|
||||
<input placeholder="0.00" type="number" name="amount" value="{{amount}}" bindinput="onInput" />
|
||||
</view>
|
||||
<view class="cny-balance" wx:if="{{!greater}}">当前账户余额{{balance}}<text bind:tap="onAll">全部提现</text></view>
|
||||
<view class="cny-balance red" wx:else>输入金额超过账户余额</view>
|
||||
</view>
|
||||
<button class="cny-btn" size="default" disabled="{{greater}}" form-type="submit">申请提现</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<!-- 提醒信息 -->
|
||||
<view class="hint">后台提现管理时间 上午11:00-12:00 下午17:00-18:00</view>
|
||||
</view>
|
||||
35
pages/withdraw/withdraw.wxss
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
.content{ min-height: 100vh; background: #f7f8f9; padding: 30rpx; box-sizing: border-box; }
|
||||
|
||||
/* 提现前置 */
|
||||
.hint{ font-size: 28rpx; line-height: 90rpx; text-align: center; color: gray; }
|
||||
.block{ background: white; border-radius: 20rpx; overflow: hidden; }
|
||||
.block-title{ font-size: 30rpx; font-weight: bold; line-height: 50rpx; }
|
||||
|
||||
/* 银行信息 */
|
||||
.bank{ background: #fdfdfd; padding: 50rpx; }
|
||||
.bank-tabs{ margin-bottom: 30rpx; display: flex; align-items: center; line-height: 100rpx; }
|
||||
.bank-tabs > .item{ width: 50%; text-align: center; font-size: 30rpx; }
|
||||
.bank-tabs > .item.active{ color: #da2b54; font-weight: bold; }
|
||||
.bank-input{ display: flex; justify-content: space-between; height: 90rpx; line-height: 90rpx; font-size: 30rpx; background: #f7f8f9; border-radius: 10rpx; margin-bottom: 30rpx; padding: 0 30rpx; }
|
||||
.bank-input label{ width: 150rpx; color: #333; }
|
||||
.bank-input input{ font-size: 30rpx; width: calc(100% - 150rpx); height: 90rpx; vertical-align: top; text-align: right; }
|
||||
.banks-picker{ font-size: 30rpx; width: calc(100% - 150rpx); text-align: right; }
|
||||
.banks-text{ display: flex; align-items: center; justify-content: flex-end; }
|
||||
.banks-text.gray{ color: gray; }
|
||||
.banks-icon{ vertical-align: middle; margin-left: 10rpx; width: 24rpx; height: 24rpx; }
|
||||
|
||||
|
||||
/* 提现金额 */
|
||||
.cny{ padding: 50rpx; border-top: dashed 1rpx #ddd; }
|
||||
.cny-title{ padding-bottom: 20rpx; line-height: 40rpx; font-size: 30rpx; color: #333; }
|
||||
.cny-title text{ font-size: 90%; color: gray; }
|
||||
.cny-input{ display: flex; font-size: 60rpx; height: 120rpx; line-height: 120rpx; font-weight: 500; font-family: Arial, Helvetica, sans-serif; border-bottom: solid 1rpx #ddd; }
|
||||
.cny-input input{ flex: 1; height: 120rpx; padding: 0; margin: 0; font-size: 70rpx; }
|
||||
.cny-balance{ font-size: 28rpx; line-height: 60rpx; padding-top: 20rpx; }
|
||||
.cny-balance text{ color:#da2b54; margin-left: 10rpx; }
|
||||
.cny-balance.red{ color: red; }
|
||||
.cny-btn[size="default"]{ width: 100%; height: 90rpx; line-height: 90rpx; border-radius: 45rpx; background: #da2b54; color: white; font-size: 32rpx; margin-top: 50rpx; padding: 0;}
|
||||
.cny-btn[size="default"][disabled]{ background: #da2b54; color: white; opacity: .5; }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "xuan_wechat",
|
||||
"projectname": "%E7%82%AB%E7%81%AB",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": true
|
||||
@@ -9,8 +9,29 @@
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/login/index",
|
||||
"name": "详情详情",
|
||||
"pathName": "pages/mall/details/details",
|
||||
"query": "id=4&invite=",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "支付成功",
|
||||
"pathName": "pages/pay/success/success",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "提现",
|
||||
"pathName": "pages/withdraw/withdraw",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "实名认证",
|
||||
"pathName": "pages/idcard/idcard",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
|
||||
BIN
static/icons/add_icon.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
static/icons/fali_icon.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
static/icons/idcard_success.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
static/icons/success_icon.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
static/imgs/capsule.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.1 KiB |