第一次提交

This commit is contained in:
2023-02-18 16:24:17 +08:00
parent dceb736e33
commit 53aeac7bfe
1270 changed files with 45215 additions and 0 deletions

View File

@@ -0,0 +1,335 @@
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
text: '',
texttwo: '',
height: '',
show: false,
seckill_status: 1,
seckill_start: '请输入开始日期',
seckill_endx: '请输入结束日期',
time: 30 * 60 * 60 * 1000,
timeflag: 0,
seckill_end: '',
userInfo: {},
item: {},
url: app.globalData.url,
hasUserInfo: false,
date: '',
paymoney:0,
show: false,
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName'),
phone: wx.getStorageSync('phone'),
uidFlag: wx.getStorageSync('uidFlag'),
imgUrls: [
'/pages/image/goddess.jpg',
'/pages/image/goddess.jpg',
'/pages/image/goddess.jpg'
],
goods_detail_img: [],
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 1300,
id: 0,
bg: '#C79C77',
order_id: '',
timeData: {},
Height: "", //这是swiper要动态设置的高度属性
charge_phone: '',
is_ok_click: false,
clock: '',
address: ''
},
onDisplay() {
this.setData({
show: true
});
},
onClose() {
this.setData({
show: false
});
},
formatDate(date) {
date = new Date(date);
return `${date.getMonth() + 1}/${date.getDate()}`;
},
onConfirm(event) {
this.setData({
show: false,
text: `选择了 ${event.detail.length} 个日期`,
texttwo: this.formatDate(event.detail),
});
},
// 确认支付
confirm_pay: async function () {
var that = this;
if (!this.data.is_ok_click) {
that.setData({
is_ok_click: true
})
//你要执行的操作
this.payment()
setTimeout(function () {
that.setData({
is_ok_click: false
})
}, 10000) //阻止一秒点击多次
} else {
// wx.showToast({ title:'请勿重复操作!', icon: 'none' });
}
},
//获取单价
getprice: function () {
var that = this;
wx.request({
url: app.globalData.url + '/system/config/configKey/price',
header: app.getRequestHeader(),
method: 'GET',
data: {},
success: (res) => {
var resp = res.data;
if (res.data.code == 200) {
that.setData({
special_offer: resp.data,
});
}
}
});
},
//获取类型
getpriceType: function () {
var that = this;
wx.request({
url: app.globalData.url + '/system/config/configKey/priceType',
header: app.getRequestHeader(),
method: 'GET',
data: {},
success: (res) => {
var resp = res.data;
if (res.data.code == 200) {
that.setData({
special_offer: resp.data,
});
}
}
});
},
payment() {
var that = this;
wx.request({
url: app.globalData.url + '/system/order',
data: {
startTime: this.data.seckill_start,
endTime: this.data.seckill_endx,
bId: this.data.item.userId,
yuguMoney: "100",
price: "10",
priceType: "1",
hospitalId: this.data.item.hospitalId,
cId: wx.getStorageSync('uid')
},
method: 'POST',
header: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + app.getCache("token")
},
success(res) {
console.log(1111111)
console.log(res)
if (res.data.code == 200) {
that.setData({
// order_id: res.data.order_id,
order_id: 123456,
})
// wx.showToast({ title: res.data.msg, icon: 'none' });
wx.requestPayment({
timeStamp: res.data.data.timeStamp,
nonceStr: res.data.data.nonceStr,
package: res.data.data.package,
signType: 'MD5',
paySign: res.data.data.paySign,
success(res) {
console.log('支付成功');
wx.navigateTo({
url: '../paysuccess/paysuccess?' + '&order_id=' + that.data.order_id,
})
},
fail(res) {
console.log('支付失败');
}
})
} else {
wx.showToast({
title: res.data.msg,
icon: 'none'
});
}
}
})
},
bindDateChange: function (e) {
this.setData({
seckill_start: e.detail.value
})
},
bindDateChangetwo: function (e) {
this.setData({
seckill_endx: e.detail.value,
})
var day = this.checkDate()
this.setData({
paymoney:100*day
})
},
checkDate: function() {
//日期格式化
var start_date = new Date(this.data.seckill_start.replace(/-/g, "/"));
var end_date = new Date(this.data.seckill_endx.replace(/-/g, "/"));
//转成毫秒数,两个日期相减
var ms = end_date.getTime() - start_date.getTime();
//转换成天数
var day = parseInt(ms / (1000 * 60 * 60 * 24));
//do something
console.log("day = ", day);
return day
},
onClickLeft() {
wx.navigateBack()
},
onChange(e) {
this.setData({
timeData: e.detail,
});
},
imgHeight: function (e) {
var winWid = wx.getSystemInfoSync().windowWidth; //获取当前屏幕的宽度
var imgh = e.detail.height; //图片高度
var imgw = e.detail.width; //图片宽度
var swiperH = winWid * imgh / imgw + "px" //等比设置swiper的高度。 即 屏幕宽度 / swiper高度 = 图片宽度 / 图片高度 ==》swiper高度 = 屏幕宽度 * 图片高度 / 图片宽度
this.setData({
Height: swiperH //设置高度
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (e) {
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
app.console(statusBarHeight + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
this.setData({
statusBarHeight: statusBarHeight,
height: 46 + statusBarHeight,
});
app.console(this.data.height + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
console.log(wx.getStorageSync('uidFlag'))
console.log(wx.getStorageSync('uid'))
if (wx.getStorageSync('phone') == '') {
wx.setStorageSync('uidFlag', false);
console.log('请登录')
wx.showModal({
title: '提示',
content: '请先登录',
success(res) {
if (res.confirm) {
console.log('用户点击确定')
wx.switchTab({
url: '/pages/my/my'
})
} else if (res.cancel) {
console.log('用户点击取消')
wx.switchTab({
url: '/pages/my/my'
})
}
}
})
}
var that = this;
let item = JSON.parse(e.item);
that.setData({
item: item
});
var myDate = new Date();
myDate.getDate();
app.console("当前天=" + myDate.toLocaleDateString())
},
/**
* 拨打电话
*/
callphone() {
wx.makePhoneCall({
phoneNumber: this.data.charge_phone,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
var that = this;
this.getprice();
this.getpriceType();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
login: function (e) {
},
})

View File

@@ -0,0 +1,11 @@
{
"usingComponents": {
"van-count-down": "/miniprogram/miniprogram_npm/@vant/weapp/count-down/index",
"van-switch": "/miniprogram/miniprogram_npm/@vant/weapp/switch/index",
"van-button": "/miniprogram/miniprogram_npm/@vant/weapp/button/index",
"van-calendar": "/miniprogram/miniprogram_npm/@vant/weapp/calendar/index",
"van-cell": "/miniprogram/miniprogram_npm/@vant/weapp/cell/index",
"van-nav-bar":"/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index"
},
"navigationBarTitleText": "下单"
}

View File

@@ -0,0 +1,105 @@
<!--pages/goddess/goddess.wxml-->
<van-nav-bar title="下单" left-text="" right-text="" left-arrow bind:click-left="onClickLeft" bind:click-right="onClickRight" style=" position: fixed;left: 0;top: 0;width: 100%;z-index: 2;" />
<view style="margin-top: {{height+12}}px;">
<view class="card_con" wx:key="key">
<view style='display:flex;background-color: white;'>
<view class="Group">
<view class="Group-image">
<image src="{{url+item.avatar}}"></image>
</view>
<view class="content">
<view style="display: flex; flex-direction:row;align-items : flex-end;">
<view class="title1">{{item.nickName}}</view>
<view class="title2">({{"陪诊员"}})</view>
<view wx:if="{{item.sex==1}}" class="title3">{{"男"}}</view>
<view wx:if="{{item.sex==0}}" class="title3">{{"女"}}</view>
<view class="title4">{{item.experience}}经验</view>
</view>
<view class="tejia">
<view class="Price2">{{"简介:从事陪诊服务2年,服务细心,热情周到,有耐心、责任心强。"}}</view>
</view>
</view>
</view>
</view>
<view style="height: 1rpx;background: #ECECEC;"></view>
<view style="display: flex; flex-direction:row;margin: 20rpx;">
<view style="color: #666666;font-size: 30rpx;font-family: PingFang SC;font-weight: 400;width:532rpx;">
电话:{{item.phonenumber}}</view>
<image style="width:40rpx;height:40rpx;" src="/pages/image/phone.png" bindtap="callphone"></image>
</view>
<view style="color: #666666;font-size: 30rpx;font-family: PingFang SC;font-weight: 400;width:532rpx;margin: 20rpx;margin-top: 0rpx;">
地址:{{item.address}}</view>
</view>
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
<view class="title-left">
{{"陪护时间选择"}}
</view>
<view style="height: 1rpx;background: #ECECEC;"></view>
<!-- <van-cell title="选择多个日期" value="{{ text }}" bind:click="onDisplay" />
<van-calendar show="{{ show }}" type="multiple" bind:close="onClose" bind:confirm="onConfirm" />
<view>{{texttwo}}</view> -->
<view class="row-wrap">
<view class="label" style="margin-left: 33rpx;">开始日期</view>
<view class="label-right">
<!-- <input model:value="{{seckill_start}}" name="nickname" class="input" type="text" placeholder="请输入开始时间" /> -->
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChange">
<view class="picker">
{{seckill_start}}
</view>
</picker>
</view>
</view>
<view class="row-wrap">
<view class="label" style="margin-left: 33rpx;">结束日期</view>
<view class="label-right">
<!-- <input model:value="{{seckill_end}}" name="nickname" class="input" type="text" placeholder="请输入结束时间" /> -->
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChangetwo">
<view class="picker">
{{seckill_endx}}
</view>
</picker>
</view>
</view>
</view>
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
<view class="title-left">
{{"备注"}}
</view>
<view style="height: 1rpx;background: #ECECEC;"></view>
<view class="peisong-way" style="margin-bottom: 30rpx;">
<textarea style="font-size: 26rpx;padding-left: 19rpx;padding-top: 19rpx;" model:value="{{input_password}}" bindinput="passwordInput" placeholder="请详细描述您的需求,简单讲述您的病情或症状,方便陪护人员为您服务。" />
</view>
</view>
<view style="font-size: 32rpx;color: #999999;margin-top:40rpx;margin-left: 40rpx;margin-right: 20rpx;">
计费说明:计费说明计费说明计费说明计费说明计费说明计费说明计费说明
</view>
<view class="payment">
<view style="line-height: 56rpx;color:#333;">
<text>需支付:</text>
<text style="font-size:40rpx;color:#FF8F1F;margin-left:20rpx;">{{paymoney}}</text>
<text>元</text>
</view>
<view class="immediately" bindtap="confirm_pay">立即支付</view>
</view>
</view>

View File

@@ -0,0 +1,390 @@
/* pages/goddess/goddess.wxss */
page{
background: #F8F8F8;
}
image {
width: 100%;
height: 100%;
}
.Category {
display: flex;
}
.Category .Price {
width: 449rpx;
height: 107rpx;
background: #FF4C00;
display: flex;
}
.card_cont{
display: flex;
flex-direction: column;
background: #fff;
width: 85%;
margin: 0 auto;
margin-top: 0rpx;
box-shadow: 0px 0px 6px rgba(152, 152, 152, 0.16);
border-radius: 10rpx;
padding: 20rpx;
}
.card_con{
display: flex;
flex-direction: column;
background: #fff;
border-radius: 10rpx;
margin-left: 40rpx;
margin-right: 40rpx;
}
.card_cont_top{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.card_top_left{
color: #E54F54;
font-size: 36rpx;
}
.card_top_left text:first-child{
font-size: 55rpx;
padding: 0 20rpx 0 0;
/* border: 1px solid red; */
}
.card_top_left text:last-child{
font-size: 24rpx;
}
.Price .Price-left {
margin: 8rpx 0 0 32rpx;
}
.Price .Price-left text:nth-child(1) {
font-size: 34rpx;
color: #FFFFFF;
font-weight: 700;
line-height: 48rpx;
}
.Price .Price-left text:nth-child(2) {
font-size: 24rpx;
color: #FFFFFF;
text-decoration: line-through;
margin-left: 5rpx;
}
/* 销售 */
.Category .Price .sale {
font-size: 26rpx;
color: #FFFFFF;
}
/* 库存 */
.Category .Price .stock {
font-size: 24rpx;
color: #FFFFFF;
margin: 16rpx 0 0 33rpx;
}
.triangle {
position: absolute;
width: 0;
height: 0;
border-width: 15rpx;
border-style: solid;
border-color: transparent #00B39B transparent transparent;
left: -28rpx;
top: 40rpx;
}
.Category .limit {
position: relative;
width: 301rpx;
height: 107rpx;
background: #00B39B;
}
.limit .seckill {
display: flex;
font-size: 24rpx;
margin: 16rpx 86rpx 8rpx 86rpx;
color: #FFFFFF;
}
/* 倒计时 */
.limit .count {
text-align: center;
color: #FFFFFF;
}
/* 文字标题 */
.title {
padding: 27rpx;
display: flex;
}
.substance {
/* margin-top: 53rpx; */
justify-content: space-between;
margin: 10rpx 24rpx 0rpx 31rpx;
}
.details_box {
display: flex;
border-bottom: 1px solid #e2e2e2;
padding: 0 24rpx;
padding-bottom: 32rpx;
}
.contact {
height: 219rpx;
background: #fff;
margin-top: 8rpx;
padding: 0 24rpx;
}
.contact_title {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 70rpx;
color: #333333;
opacity: 1;
margin-bottom: 10rpx;
}
.detail_number {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 37rpx;
color: #B4B4B4;
opacity: 1;
margin-top: 11rpx;
}
.money {
margin-top: 18rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 37rpx;
color: #B4B4B4;
opacity: 1;
}
.title-left {
width: 544rpx;
height: 70rpx;
font-size: 34rpx;
color: #333333;
font-weight: 700;
margin-top: 12rpx;
}
.title-right {
margin-left: 48rpx;
border-left: 1px solid #D5D5D5;
color: #BBBBBB;
display: flex;
align-items: center;
flex-direction:column;
padding-left: 21rpx;
}
.Collection {
width: 40rpx;
height: 36rpx;
}
.Collection image {
width: 100%;
height: 100%;
}
/* 联系地址 */
.address {
padding: 30rpx;
display: flex;
}
.hospital {
width: 94rpx;
height: 94rpx;
}
.position {
margin-left: 28rpx;
}
.position view:nth-child(1) {
font-size: 28rpx;
color: #333333;
margin-bottom: 8rpx;
}
.position view:nth-child(2) {
font-size: 24rpx;
color: #ABABAB;
}
.phone {
width: 26px;
height: 26px;
border-left: 1px solid #D5D5D5;
margin-left: 20rpx;
margin-top: 30rpx;
}
/* 详情列表 */
.details {
width: 750rpx;
margin-bottom: 73px;
}
.payment {
padding: 27rpx;
display: flex;
justify-content: space-between;
position: fixed;
right: 0;
bottom: 0;
left: 0;
background: #FFFFFF;
}
.order-list{
width: 100%;
}
.immediately {
width: 230rpx;
height: 81rpx;
background: #2D7AFF;
border-radius: 207rpx;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
line-height: 82rpx;
}
.countitem {
display: inline-block;
width: 16px;
height: 16px;
margin-right: 5px;
color: #fff;
font-size: 24rpx;
text-align: center;
background-color: #2EC9B5;
border-radius: 2px;
}
.countitemm {
position: absolute;
color: #fff;
font-size: 24rpx;
text-align: center;
}
.Group {
display: flex;
}
.Group-image {
width: 128rpx;
height: 128rpx;
margin: 84rpx 40rpx 84rpx 20rpx;
}
.content {
width: auto;
height: 201rpx;
margin-top: 48rpx;
}
.content .title1 {
font-size: 36rpx;
font-weight: 700;
}
.content .title2 {
font-size: 30rpx;
font-weight: 700;
}
.content .title3 {
font-size: 32rpx;
margin-left: 24rpx;
}
.content .title4 {
font-size: 28rpx;
color: #228BFE;
width: 132rpx;
height: 40rpx;
text-align: center;
background-color: #A5BBE0;
border-radius: 20rpx;
margin-left: 24rpx;
}
/* .flex-item{
display:flex;
height: 270rpx;
width: 670rpx;
border-radius: 20rpx;
margin-top: 20rpx;
} */
.content .tejia {
display: flex;
width: 446rpx;
margin-top: 24rpx;
}
.content .tejia .Price2 {
font-size: 30rpx;
color: #666666;
line-height: 41rpx;
margin-right: 23rpx;
}
.peisong-way{
width: 640rpx;
height: 128rpx;
background: #F6F6F6;
margin-right: 31rpx;
opacity: 1;
border-radius: 0px
}
.row-wrap .label{
width: 200rpx;
color: #000;
margin-left: 6rpx;
}
.row-wrap .label-right{
width: 500rpx;
height: 88rpx;
line-height: 88rpx;
text-align: right;
}
.row-wrap{
width: 100%;
height: 100rpx;
line-height: 88rpx;
margin-left: 0rpx;
border-bottom: 1rpx solid #eee;
display: flex;
font-size: 28rpx;
/*justify-content: space-between;*/
}

View File

@@ -0,0 +1,75 @@
// shopping/pages/payment/payment.js
Page({
/**
* 页面的初始数据
*/
data: {
},
withdrawal(){
wx.navigateTo({
url: '../withdrawal/withdrawal',
})
},
cancel(){
wx.switchTab({
url: '/pages/my/my',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "提现"
}

View File

@@ -0,0 +1,36 @@
<!--shopping/pages/withdrawal/withdrawal.wxml-->
<view>
<view class="direction">
<text>提现至:</text>
<image src="/shopping/image/Alipay.png" class="img1"></image>
<text class="txt">支付宝</text>
<image src="/pages/image/right1.png" class="img2"></image>
</view>
<view class="stance">
<view class="stance1">
<text>到账支付宝</text>
<input type="number" placeholder="请输入支付宝账号" />
</view>
<view class="stance2">
<text>姓名</text>
<input type="text" placeholder="请输入姓名" />
</view>
</view>
<view class="tixian">可提现金额: 128.56元</view>
<view class="entry">
<text>¥</text>
<input type="text" placeholder="请输入要提现的金额" />
<text style="font-size: 28rpx;color: #FF4C00;margin:40rpx 0 40rpx 200rpx;">全部</text>
</view>
<view class="words">最低提现金额10元</view>
<view class="words" style="margin:9rpx 0 60rpx 42rpx">将提现到已绑定的微信中,提现金额将在2小时内到账</view>
<button class="btn">提现</button>
<view class="mode">
<view class="zhi" bindtap="withdrawal">
<image src="/shopping/image/WeChat.png" style="width:60rpx;height:60rpx;"></image>
<view class="zhifubao" >微信</view>
</view>
<button style="color: #BCBCBC;" bindtap="cancel">取消</button>
</view>
</view>

View File

@@ -0,0 +1,124 @@
/* shopping/pages/withdrawal/withdrawal.wxss */
.direction {
display: flex;
}
.direction text:nth-child(1) {
margin: 30rpx 60rpx;
font-size: 28rpx;
font-family: PingFang SC;
color: #606060;
}
.img1 {
width: 60rpx;
height: 60rpx;
margin: 20rpx;
margin-left: 0rpx;
}
.txt {
font-size: 28rpx;
color: #2D2D2D;
margin: 30rpx;
margin-left: 0rpx;
}
.img2 {
width: 15rpx;
height: 28rpx;
margin: 35rpx 0 35rpx 300rpx;
}
/* 支付宝信息 */
.stance {
height: 212rpx;
margin: 14rpx 0;
}
.stance1 {
display: flex;
}
.stance1 text {
font-size: 28rpx;
color: #4D4D4D;
margin: 34rpx 68rpx 66rpx 54rpx;
}
.stance1 input {
margin-top: 34rpx;
font-size: 28rpx;
}
.stance2 {
display: flex;
}
.stance2 text {
margin-left: 54rpx;
margin-right: 152rpx;
font-size: 28rpx;
color: #4D4D4D;
}
.tixian {
font-size: 28rpx;
font-family: PingFang SC;
color: #3A3A3A;
margin-left: 52rpx;
}
.entry {
display: flex;
}
.entry text:nth-child(1) {
font-size: 64rpx;
font-family: Alibaba PuHuiTi;
color: #414141;
margin: 23rpx 25rpx 35rpx 44rpx;
}
.entry input {
margin: 44rpx 0;
}
.words {
font-size: 28rpx;
font-family: PingFang SC;
color: #BCBCBC;
margin-left: 42rpx;
}
.btn {
width: 600rpx !important;
height: 85rpx;
color: #ffffff;
background: #FF4C00;
opacity: 1;
border-radius: 85rpx;
}
.mode {
height: 240rpx;
margin-top: 263rpx;
}
.mode .zhi {
display: flex;
margin: 37rpx 32rpx 68rpx 288rpx;
}
.mode .zhifubao {
font-size: 28rpx;
line-height: 55rpx;
margin-left: 32rpx;
color: #464646;
}
.mode text {
font-size: 28rpx;
font-family: PingFang SC;
color: #464646;
}

View File

@@ -0,0 +1,188 @@
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
order_id:0,
id:'',
show: false,
statusType: ["拼团"],
status:[ "0"],
currentType: 0,
nav_type:0,
height:''
},
statusTap: function (e) {
var curType = e.currentTarget.dataset.index;
this.setData({
currentType: curType,
nav_type:curType
});
app.console("================="+curType)
},
onClickShow() {
this.setData({ show: true });
},
onClickHide() {
this.setData({ show: false });
},
onClickLeft() {
wx.navigateBack()
},
noop() {},
//返回首页
index(){
wx.switchTab({
url: '/pages/index/index',
})
},
//订单详情
godetail(){
wx.navigateTo({
url: '/pages/orderdetail/orderdetail?'+"type="+'3'+ '&id=' +this.data.order_id,
})
},
//条目点击跳转
itemgodetail(e){
wx.navigateTo({
url: "/shopping/pages/goddess/goddess?id=" + e.currentTarget.dataset.id,
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
app.console(statusBarHeight+"=================xxxxxxxxxxxxxxxxxxxxxxxx")
this.setData({
statusBarHeight: statusBarHeight,
height: 46 + statusBarHeight,
});
app.console(this.data.height+"=================xxxxxxxxxxxxxxxxxxxxxxxx")
this.setData({
order_id:options.order_id
})
this.paySuccess()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
//支付成功
paySuccess: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Goddesswechat/paySuccess"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: this.data.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
order_id:this.data.order_id
},
success: function (res) {
var resp = res.data;
console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
if(resp.erro==0){
that.setData({
tg_kj_status:resp.goods_infor.tg_kj_status,
id:resp.goods_infor.id,
goods_infor:resp.goods_infor,
goods:resp.goods
});
app.console(that.data.tg_kj_status+"=================状态值")
if(that.data.tg_kj_status==1){
wx.showToast({ title: '弹出拼团弹框', icon: 'none' });
this.setData({ show: true });
}
}
}
});
},
/**
* 跳过
*/
tiaoguo(){
this.setData({ show: false });
},
/**
* 同意发起
*/
tongyifaqi(){
this.confirmCollage()
},
//确认发起团购/砍价
confirmCollage: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Goddesswechat/confirmCollage"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: this.data.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
order_id:this.data.order_id
},
success: function (res) {
var resp = res.data;
console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
if(resp.erro==0){
wx.showToast({ title: resp.msg, icon: 'none' });
that.setData({ show: false });
}
}
});
},
})

View File

@@ -0,0 +1,7 @@
{
"usingComponents": {
"van-overlay": "/miniprogram/miniprogram_npm/@vant/weapp/overlay/index",
"van-nav-bar":"/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index"
},
"navigationBarTitleText": "支付成功"
}

View File

@@ -0,0 +1,235 @@
<!--shopping/pages/paysuccess/paysuccess.wxml-->
<van-nav-bar
title="支付成功"
left-text=""
right-text=""
left-arrow
bind:click-left="onClickLeft"
bind:click-right="onClickRight"
style=" position: fixed;left: 0;top: 0;width: 100%;z-index: 2;"
/>
<view style="margin-top: {{height}}px;">
<view class="success">
<image src="/pages/image/success.png"></image>
</view>
<view class="news1">支付成功</view>
<view class="news2">可在个人中心“我的订单”中查看</view>
<view style="display:flex;margin-bottom:106rpx; ">
<view style="background-image: url(/shopping/image/back_home.png);background-repeat:no-repeat;background-size:contain; width: 304rpx;margin-left: 40rpx;" class="" bindtap="index"></view>
<button class="btn2" style="width: 304rpx;" bindtap="godetail">查看详情</button>
</view>
<view style=" display:flex; flex-wrap: wrap;justify-content:space-around;">
<view wx:for="{{goods}}" style="width:340rpx;height:488rpx;background:#fff;margin-bottom:16rpx;" wx:for-item="item" data-id="{{item.id}}" bindtap="itemgodetail">
<image src="{{item.index_img}}" style="width:340rpx;height:340rpx;border-radius: 10rpx 10rpx 0px 0px;"></image>
<view class="title1">{{item.goods_name}}</view>
<view style="display:flex;margin:8rpx 0;">
<image src="/pages/image/address.png" style="width:17rpx;height:17rpx"></image>
<view class="dianpu">{{item.mechanism_name}}</view>
</view>
<view class="price">
<view>¥{{item.price}}</view>
<!-- <view>5.0折</view> -->
<view>已售{{item.sold}}</view>
</view>
</view>
</view>
</view>
<van-overlay show="{{ show }}" bind:click="onClickHide">
<view class="wrapper">
<view class="block" catch:tap="noop" >
<!-- /////////////////////////////////////// -->
<view style="width: 676rpx; height: 280rpx;">
<image style="width: 676rpx; height: 280rpx;" src="/pages/image/pintuan.png"></image>
<view class="yaotext">邀请好友拼团</view>
<view class="yaotexttwo">拼团成功会返现哦~</view>
</view>
<view class="status-box">
<view bindtap="statusTap" class="status-label {{index == currentType ? 'active' : ''}}" wx:for-items="{{statusType}}" wx:key="{{index}}" data-index="{{index}}">
{{item}}
<view class="{{tabClass[index]}}"></view>
</view>
</view>
<view wx:if="{{nav_type==0}}">
<!-- 步骤条 -->
<view style="margin-left: 28rpx;margin-top: 116rpx; ">
<text style="font-size: 30rpx;font-weight: bold;">拼团规则</text>
</view>
<view class="Groupone" style=" align-items: center;" data-id="{{item.id}}">
<view class="viewone">
<view class="textone">1
</view>
<view style="color: #333333;font-size: 28rpx;margin-top: 2rpx;">支付</view>
<view style="font-size: 24rpx;font-weight: 400;color: #C2C2C2;margin-top: 2rpx;">开团/参团</view>
</view>
<view style="margin-left: 43rpx;">></view>
<view class="viewone">
<view class="textone">2
</view>
<view style="color: #333333;font-size: 28rpx;margin-top: 2rpx;">邀请</view>
<view style="font-size: 24rpx;font-weight: 400;color: #C2C2C2;margin-top: 2rpx;">好友参团</view>
</view>
<view style="margin-left: 43rpx;">></view>
<view class="viewone">
<view class="textone">3
</view>
<view style="color: #333333;font-size: 28rpx;margin-top: 2rpx;">返现</view>
<view style="font-size: 24rpx;font-weight: 400;color: #C2C2C2;margin-top: 2rpx;">拼团成功返现</view>
</view>
</view>
<!-- 订单 -->
<view class="Distit" style="margin-left: 28rpx;">
<text style="font-size: 30rpx;font-weight: bold;">拼团详情</text>
</view>
<view class="Group" bindtap="activity" data-id="{{item.id}}">
<view class="Group-image">
<image src="{{goods_infor.index_img}}"></image>
</view>
<view class="content">
<view class="title1">{{goods_infor.goods_name}}</view>
<view class="title2">
<view class="house">
<image src="/pages/image/address.png"/>
</view>
<view >{{goods_infor.mechanism_name}}</view>
</view>
<view class="Price">
<view class="Price1">¥{{goods_infor.price}}</view>
<view class="Price2">¥{{goods_infor.original_price}}</view>
<!-- <view class="Price3">5.0折</view> -->
</view>
</view>
</view>
<!-- 拼团头像 -->
<view style="display: flex;flex-direction: row;position: relative;justify-content: center;">
<view style="display: flex;flex-direction:column;align-items: center;">
<!-- <image class="imageone" src="/images/WeChat.png"></image> -->
<view class="imageone" bindtap="bindViewTap">
<open-data type="userAvatarUrl"></open-data>
</view>
<view class="texttwo"style="margin-top: -25rpx;">团长</view>
</view>
<view class="imageone" style="margin-left: 111rpx; display: flex;align-items: center; justify-content: center;background-color: #FFEDE5;">
<view style="font-size: 54rpx;font-family: 苹方-简;color: #FF4C00;">?
</view>
</view>
</view>
<!-- 操作按钮 -->
<view style="display: flex;flex-direction: row;height: 80rpx;margin-top: 10rpx;">
<view class="buttonsty" style="margin-left: 76rpx;" bindtap="tiaoguo">跳过</view>
<view class="buttonsty" style="background: #FF4C00;margin-left: 32rpx;"bindtap="tongyifaqi">同意发起拼团</view>
</view>
</view>
<!-- 8888888888888888888888888-->
<view wx:if="{{nav_type==1}}">
<!-- 步骤条 -->
<view style="margin-left: 28rpx;margin-top: 116rpx; ">
<text style="font-size: 30rpx;font-weight: bold;">砍价规则</text>
</view>
<view class="Groupone" style=" align-items: center;" data-id="{{item.id}}">
<view class="viewone">
<view class="textone">1
</view>
<view style="color: #333333;font-size: 28rpx;margin-top: 2rpx;">好友参团</view>
<view style="font-size: 24rpx;font-weight: 400;color: #C2C2C2;margin-top: 2rpx;">开团/参团</view>
</view>
<view style="margin-left: 43rpx;">></view>
<view class="viewone">
<view class="textone">1
</view>
<view style="color: #333333;font-size: 28rpx;margin-top: 2rpx;">好友参团</view>
<view style="font-size: 24rpx;font-weight: 400;color: #C2C2C2;margin-top: 2rpx;">开团/参团</view>
</view>
<view style="margin-left: 43rpx;">></view>
<view class="viewone">
<view class="textone">1
</view>
<view style="color: #333333;font-size: 28rpx;margin-top: 2rpx;">好友参团</view>
<view style="font-size: 24rpx;font-weight: 400;color: #C2C2C2;margin-top: 2rpx;">开团/参团</view>
</view>
</view>
<!-- 订单 -->
<view class="Distit" style="margin-left: 28rpx;">
<text style="font-size: 30rpx;font-weight: bold;">特价商品</text>
</view>
<view class="Group" bindtap="activity" data-id="{{item.id}}">
<view class="Group-image">
<image src="{{item.index_img}}"></image>
</view>
<view class="content">
<view class="title1">除皱瘦脸 韩国进口标准装瘦咬肌速美小V脸</view>
<view class="title2">
<view class="house">
<image src="/pages/image/address.png"/>
</view>
<view >{{item.mechanism_name}}</view>
</view>
<view class="Price">
<view class="Price1">¥{{item.price}}</view>
<view class="Price2">¥{{item.original_price}}</view>
<!-- <view class="Price3">5.0折</view> -->
</view>
</view>
</view>
<!-- 操作按钮 -->
<view style="display: flex;flex-direction: row;height: 80rpx;margin-top: 57rpx;">
<view class="buttonsty" style="margin-left: 76rpx; ">跳过</view>
<view class="buttonsty" style="background: #FF4C00;margin-left: 32rpx;"bindtap="getDeposit">同意发起砍价</view>
</view>
</view>
<!-- /////////////////////////////////////// -->
</view>
</view>
</van-overlay>

View File

@@ -0,0 +1,583 @@
/* shopping/pages/paysuccess/paysuccess.wxss */
.success {
margin: 91rpx 275rpx 40rpx 275rpx;
width: 200rpx;
height: 200rpx;
}
.success image {
width: 100%;
height: 100%;
}
.news1 {
font-size: 34rpx;
font-family: PingFang SC;
text-align: center;
color: #333333;
}
.news2 {
font-size: 28rpx;
font-family: PingFang SC;
color: #8D8D8D;
text-align: center;
margin-top: 13rpx;
margin-bottom: 67rpx;
}
.title1 {
width: 329rpx;
height: 56rx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #414141;
opacity: 1;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.dianpu {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 18rpx;
color: #B4B4B4;
opacity: 1;
margin-left: 6rpx;
}
.btn1 {
/* width: 244rpx;
height: 80rpx;
background: #8D8D8D;
border-radius: 310rpx;
font-size: 28rpx;
color: #fff; */
font-weight: 300;
width: 152rpx;
height: 80rpx;
border-radius: 310rpx;
font-size: 30rpx;
border: 1px solid;
}
/* .btn2 {
width: 244rpx;
height: 80rpx;
border-radius: 310rpx;
background-color: #FF4C00;
font-size: 28rpx;
color: #fff;
font-weight: 400;
} */
.btn2 {
font-weight: 300;
width: 244rpx;
height: 80rpx;
border-radius: 310rpx;
font-size: 30rpx;
color: #fff;
background: linear-gradient(312deg, #1B56FF 0%, #2D7AFF 0%, #00DBFC 100%);
}
.price {
display: flex;
margin-top: 8rpx;
}
.price view:nth-child(1) {
line-height: 44rpx;
font-size: 20rpx;
font-weight: 700;
color: #E75D4D;
}
.price view:nth-child(2) {
width: 51rpx;
height: 21rpx;
border: 1px solid #E75D4D;
border-radius: 4rpx;
font-size: 15rpx;
font-weight: 400;
color: #e75d4d;
text-align: center;
margin: 11rpx ;
}
.price view:nth-child(3){
font-size: 20rpx;
line-height: 44rpx;
font-weight: 400;
color: #B4B4B4;
margin-left: 121rpx;
}
.nav_box {
display: flex;
justify-content: space-between;
padding-left: 50rpx;
padding-right: 50rpx;
background: #ffffff;
}
.nav_bar {
width: 104rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #5B5B5B;
}
.active {
color: #5B5B5B;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
border-bottom: 6rpx solid #FF6A6A;
}
.time_msg{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 66rpx;
color: #5B5B5B;
opacity: 1;
float: left;
}
.status_msg{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 66rpx;
color: #FF6A6A;
opacity: 1;
float: right;
}
.details_box{
display: flex;
}
.title{
width: 430rpx;
height: 86rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
line-height: 44rpx;
color: #222222;
opacity: 1;
margin-top: 16rpx;
overflow:hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.detail_number{
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 37rpx;
color: #B4B4B4;
opacity: 1;
margin-top: 11rpx;
}
.money{
margin-top: 18rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 37rpx;
color: #B4B4B4;
opacity: 1;
}
.detail_btn{
position: absolute;
bottom: 12rpx;
right: 24rpx;
/* min-width: 140rpx; */
height: 57rpx;
/* background: #000; */
border: 1rpx solid #A5A5A5;
border-radius: 34rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 57rpx;
color: #4A4A4A;
opacity: 1;
text-align: center;
padding: 0 31rpx;
}
.order-list{
width: 100%;
}
.status-box{
height: 88rpx;
line-height: 88rpx;
display: flex;
position: absolute;
z-index: 1;
margin-top: 0rpx;
justify-content: space-between;
align-items: center;
background-color:#ffffff;
margin-left: 220rpx;
margin-right: 220rpx;
justify-content: space-between;
}
.status-box .status-label{
width: 150rpx;
height: 100%;
text-align: center;
font-size:24rpx;
color:#353535;
box-sizing: border-box;
position: relative;
}
.status-box .status-label.active{
color: #5B5B5B;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
border-bottom: 6rpx solid #FF6A6A;
}
.status-box .status-label .red-dot{
width: 16rpx;
height: 16rpx;
position: absolute;
left: 116rpx;
top:23rpx;
background-color: #f43530;
border-radius: 50%;
}
.no-order{
width: 100%;
position: absolute;
bottom: 0;
top: 252rpx;
left: 0;
right: 0;
text-align: center;
padding-top: 203rpx;
background-color: #F2f2f2;
}
.no-order-img{
width: 81rpx;
height: 96rpx;
margin-bottom: 31rpx;
}
.no-order .text{
font-size:28rpx;
color:#999999;
text-align: center
}
.row-wrapxs{
width: 100%;
height: 130rpx;
border-bottom: 1rpx solid #eee;
display: flex;
/*justify-content: space-between;*/
}
.tankuang{
border-radius: 30rpx 30rpx 0px 0px;
width: 100%;
height:567rpx;
background: #ffffff;
opacity: 1;
display: flex;
position:fixed;
bottom:100rpx;
flex-direction:column;
align-items: center;
z-index: 3;
}
.qtankuang{
border-radius: 30rpx 30rpx 0px 0px;
width: 100%;
height:367rpx;
background: #ffffff;
opacity: 1;
display: flex;
position:fixed;
bottom:100rpx;
flex-direction:column;
align-items: center;
z-index: 3;
}
.row-wrap{
width: 100%;
height: 100rpx;
margin-left: 0rpx;
border-bottom: 1rpx solid rgb(238, 238, 238);
display: flex;
font-size: 28rpx;
background-color: #ffffff;
align-items: center;
}
.row-wrap .label{
margin-left: 33rpx;
}
.row-wrap .label-right{
text-align: right;
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.block {
width: 676rpx;
height: 1125rpx;
background-color: #fff;
border-radius: 20rpx;
}
.select-wrap {
width: 300rpx;
margin-left: 116rpx;
}
.Group {
height: 270rpx;
display: flex;
border-bottom: 1px solid #999999;
}
.Groupone {
height: 161rpx;
display: flex;
border-bottom: 1px solid #999999;
}
.Group-image {
width: 230rpx;
height: 230rpx;
margin: 19rpx 28rpx 19rpx 31rpx;
}
.Group-image image {
width: 100%;
height: 100%;
}
.content {
/* padding: 20rpx 35rpx; */
width: 400rpx;
height: 201rpx;
margin-top: 28rpx;
}
.content .title1 {
font-size: 30rpx;
font-weight: 700;
}
.content .title2 {
font-size: 26rpx;
height: 37rpx;
line-height: 37rpx;
display: flex;
color: #B4B4B4;
margin: 11rpx 0 18rpx 0;
}
.content .title2 .house {
width: 28rpx;
height: 28rpx;
margin-right: 7rpx;
margin-top: 5rpx;
}
.content .title2 .house image {
width: 100%;
height: 100%;
}
.content .Price {
display: flex;
}
.content .Price .Price1 {
font-size: 34rpx;
color: #FF4A4A;
line-height: 42rpx;
margin-right: 17rpx;
}
.content .Price .Price2 {
font-size: 24rpx;
color: #CBCBCB;
line-height: 41rpx;
margin-right: 23rpx;
text-decoration:line-through;
}
.content .Price .Price3 {
width: 51rpx;
height: 21rpx;
font-size: 15rpx;
color: #E75D4D;
border: 1px solid #E75D4D;
border-radius: 4rpx;
text-align: center;
line-height: 18rpx;
margin-top: 10rpx;
}
.order-list{
width: 100%;
}
.custom-bar {
/* background-color: #aaa; */
position: fixed;
left: 0;
top: 0;
width: 100%;
}
.custom-bar__wrapper {
padding: 0 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.search-group {
width: 100%;
height: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
border-radius: 60rpx;
/* padding: 0 10rpx; */
padding-left: 25rpx;
background: #F5F5F5;
}
.search-group > input {
font-size: 25rpx;
width: 800rpx;
}
.search-group > image {
height: 32rpx;
width: 32rpx;
margin-right: 20rpx
}
.buttonsty{
width: 244rpx;
height: 80rpx;
text-align: center;
font-size: 25rpx;
background: #F5F5F5;
border-radius: 310rpx;
align-items: center;
justify-content: center;
display: flex ;
}
/* 优惠活动文字 */
.Distit {
width: 685rpx;
display: flex;
margin-top: 26rpx;
justify-content: space-between;
}
.textone{
background: #FF4C00;
border-radius: 50%;
width: 29rpx;
height: 29rpx;
align-items: center;
font-size: 17rpx;
color: #FFFFFF;
text-align:center;
}
.viewone{
display: flex;flex-direction:column;align-items: center; margin-left: 56rpx;
}
.yaotext{
font-size: 60rpx;text-shadow: 0rpx 3rpx 5rpx rgba(250, 37, 61, 0.59);
color: #FFF433;
display: flex;
position: relative;
top: -228rpx;
justify-content: center;
font-family: FZChaoCuHei-M10S;
}
.yaotexttwo{
font-size: 60rpx;
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
text-shadow: 0rpx 3rpx 6rpx #FE424C;
display: flex;
position: relative;
top: -200rpx;
justify-content: center;
}
.imageone{
width: 90rpx;
height: 90rpx;
border: 2rpx solid #FF4C00;
border-style:dashed;
border-radius: 50%;
}
.texttwo{
background: #FF4C00;
width: 57rpx;
height: 27rpx;
align-items: center;
font-size: 17rpx;
color: #FFFFFF;
text-align:center;
}
.imagetwo{}

View File

@@ -0,0 +1,258 @@
// shopping/pages/withdrawal/withdrawal.js
// 获取应用实例
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
pingtainame:'微信',
pingtaiimage:'/shopping/image/WeChat.png',
second:'',
money:'',
allmoney:'',
show: false,
type:1,//1为微信,2为支付宝
name:'',
alipay_no:'',
is_ok_click:false,
actions: [
{ name: '支付宝',color: '#464646;',imagesrc:'/shopping/image/Alipay.png'},
],
},
onClose() {
// wx.showToast({ title: '点击成功', icon: 'none' });
this.setData({ show: false });
},
onCancel(){
// wx.showToast({ title: '点击成功', icon: 'none' });
this.setData({ show: false });
},
openSelect(){
// wx.showToast({ title: '点击成功', icon: 'none' });
this.setData({ show: true });
},
onSelect() {
if(this.data.type==1){
this.setData({
show: false ,
type:2,
pingtainame:'支付宝',
pingtaiimage:'/shopping/image/Alipay.png',
actions: [
{ name: '微信',color: '#464646;',imagesrc:'/shopping/image/WeChat.png'},
],
});
}else{
this.setData({
show: false ,
type:1,
pingtainame:'微信',
pingtaiimage:'/shopping/image/WeChat.png',
actions: [
{ name: '支付宝',color: '#464646;',imagesrc:'/shopping/image/Alipay.png'},
],
});
}
// wx.navigateTo({
// url: '../payment/payment',
// })
},
switch(){
wx.navigateTo({
url: '../payment/payment',
})
},
cancel(){
wx.switchTab({
url: '/pages/my/my',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options.money)
this.setData({
money:options.money
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
// 提现
confirm_pay: async function (){
var that = this;
if (!this.data.is_ok_click){
that.setData({
is_ok_click:true
})
//你要执行的操作
this.tixian()
setTimeout(function () {
that.setData({
is_ok_click: false
})
}, 10000) //阻止一秒点击多次
}else{
// wx.showToast({ title: '请勿重复操作!', icon: 'none' });
}
},
tixian:function(e){
app.console(this.data.second+"================="+this.data.name+"==================="+this.data.alipay_no)
if(this.data.type==1){
this.wechatWithdrawal();
}else{
this.alipayWithdrawal()
}
}
//这个函数一定要写在标签上才能用e.detail.value获取到
,
moneyInput:function( e ){
this.setData({
second: e.detail.value
});
} ,
//支付宝账号
zfzhanghao:function(e){
this.setData({
alipay_no: e.detail.value
});
},
//收款人姓名
zfname:function(e){
this.setData({
name: e.detail.value
});
},
//点击全部
allmoney:function(e){
app.console(this.data.money+"================="+222)
this.setData({
allmoney:this.data.money,
second:this.data.money
});
},
//微信提现
wechatWithdrawal: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Goddesswechat/wechatWithdrawal"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: app.globalData.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
money:this.data.second
},
success: (res)=> {
var resp = res.data;
console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
if(resp.erro==0){
wx.showToast({ title: res.data.msg, icon: 'none' });
setTimeout(function () {
//要延时执行的代码
wx.navigateBack()
}, 2000) //延迟时间 这里是2秒
}else{
wx.showToast({ title: res.data.msg, icon: 'none' });
}
}
});
},
//支付宝提现
alipayWithdrawal: function () {
var that = this;
wx.request({
url: app.buildUrl("app/Goddesswechat/alipayWithdrawal"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: app.globalData.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
money:this.data.second,
name:this.data.name,
alipay_no:this.data.alipay_no
},
success: (res)=> {
var resp = res.data;
console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
if(resp.erro==0){
wx.showToast({ title: res.data.msg, icon: 'none' });
setTimeout(function () {
//要延时执行的代码
wx.navigateBack()
}, 2000) //延迟时间 这里是2秒
}
}
});
},
})

View File

@@ -0,0 +1,7 @@
{
"usingComponents": {
"van-action-sheet": "/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index"
},
"navigationBarTitleText": "提现"
}

View File

@@ -0,0 +1,41 @@
<!--shopping/pages/withdrawal/withdrawal.wxml-->
<view class="direction" bindtap="openSelect" style="margin-top: 2rpx;">
<text>提现至:</text>
<image src="{{pingtaiimage}}" class="img1"></image>
<text class="txt">{{pingtainame}}</text>
<image src="/pages/image/right1.png" class="img2"></image>
</view>
<view class="direction" wx:if="{{type==2}}" style="margin-top: 14rpx;display: flex;align-items: center;">
<text style="font-size: 28rpx;">到账支付宝:</text>
<input style="font-size: 28rpx;" type="text" name='moneynum' bindinput="zfzhanghao" placeholder="请输入支付宝账号" />
</view>
<view class="direction" wx:if="{{type==2}}" style="margin-top: 4rpx;display: flex;align-items: center;">
<text style="font-size: 28rpx;">姓名:</text>
<input style="font-size: 28rpx; margin-left: 80rpx;" type="text" name='moneynum' bindinput="zfname" placeholder="请输入姓名"/>
</view>
<view style="width: 100%;height: 189rpx;background-color: white;display: flex;flex-direction:column;margin-top: 14rpx;">
<view class="disply" style="margin-top: 14rpx;">可提现金额: {{money}}元</view>
<view class="entry" style="align-items: center;background-color: #FFFFFF;">
<text>¥</text>
<input style="font-size: 28rpx;" type="text" name='moneynum' bindinput="moneyInput" placeholder="请输入要提现的金额" value="{{allmoney}}"/>
<text style="font-size: 28rpx;color: #FF4C00;margin:0rpx 0 0rpx 200rpx;" bindtap="allmoney">全部</text>
</view>
</view>
<view class="words" style="margin-top: 16rpx;">最低提现金额10元</view>
<view class="words" style="margin:9rpx 0 60rpx 42rpx">将提现到已绑定的微信中,提现金额将在2小时内到账</view>
<button class="btn" bindtap="confirm_pay">提现</button>
<van-action-sheet
show="{{ show }}"
actions="{{ actions }}"
cancel-text="取消"
bind:close="onClose"
bind:cancel ="onCancel"
bind:select="onSelect"
/>

View File

@@ -0,0 +1,97 @@
/* shopping/pages/withdrawal/withdrawal.wxss */
page{
height: 100%;
background-color: #F5F5F5;
}
.direction {
display: flex;
background-color: #ffffff;
}
.direction text:nth-child(1) {
margin: 30rpx 54rpx;
font-size: 28rpx;
font-family: PingFang SC;
color: #606060;
}
.img1 {
width: 60rpx;
height: 60rpx;
margin: 20rpx;
margin-left: 0rpx;
}
.txt {
font-size: 28rpx;
color: #2D2D2D;
margin: 30rpx;
margin-left: 0rpx;
}
.img2 {
width: 15rpx;
height: 28rpx;
margin: 35rpx 0 35rpx 355rpx;
}
.disply {
font-size: 28rpx;
font-family: PingFang SC;
color: #3A3A3A;
margin-left: 52rpx;
}
.entry {
display: flex;
height: 189rpx;
background-color: #ffffff;
}
.entry text:nth-child(1) {
font-size: 64rpx;
font-family: Alibaba PuHuiTi;
color: #414141;
margin: 23rpx 25rpx 35rpx 44rpx;
}
.entry input {
margin: 44rpx 0;
}
.words {
font-size: 28rpx;
font-family: PingFang SC;
color: #BCBCBC;
margin-left: 42rpx;
}
.btn {
width: 600rpx !important;
height: 85rpx;
color: #ffffff;
background: #FF4C00;
opacity: 1;
border-radius: 85rpx;
font-size: 31rpx;
}
.mode{
height: 240rpx;
margin-top: 481rpx;
}
.mode .zhi{
display: flex;
margin: 37rpx 32rpx 68rpx 288rpx;
}
.mode .zhifubao{
font-size: 28rpx;
line-height: 55rpx;
margin-left: 32rpx;
color: #464646;
}
.mode text{
font-size: 28rpx;
font-family: PingFang SC;
color: #464646;
}