first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
c451d5e7-579d-48ab-8715-08e1c3fdf242

View File

@@ -0,0 +1 @@
ede07221-ced9-4567-a161-f10630274f52

View File

@@ -0,0 +1 @@
82711db6-16f8-4446-a879-51c60574a380

View File

@@ -0,0 +1 @@
60a1c6dc-3194-4ab9-a0cf-3561048bc99d

View File

@@ -0,0 +1,66 @@
// 团体用户洗普通衣服
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--user/OneKeyOrder/GroupUser/Ordinary/Ordinary.wxml-->
<text>user/OneKeyOrder/GroupUser/Ordinary/Ordinary.wxml</text>

View File

@@ -0,0 +1 @@
/* user/OneKeyOrder/GroupUser/Ordinary/Ordinary.wxss */

View File

@@ -0,0 +1 @@
72a3c93e-43fa-4601-84b3-8364e059c1da

View File

@@ -0,0 +1,66 @@
// 团体用户洗工服
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--user/OneKeyOrder/GroupUser/WorkClothes/WorkClothes.wxml-->
<text>user/OneKeyOrder/GroupUser/WorkClothes/WorkClothes.wxml</text>

View File

@@ -0,0 +1 @@
/* user/OneKeyOrder/GroupUser/WorkClothes/WorkClothes.wxss */

View File

@@ -0,0 +1 @@
3be3001c-6d26-4ae1-99aa-44bf03741947

View File

@@ -0,0 +1,80 @@
// 普通用户
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
pageTitle: '一键下单',
system: app.globalData.system,
takeTypeOrd: 1, // 普通用户 自送门店1 上门取件2
addIndex: -1, // 门店选中给的下标
addList: [] // 门店的列表数据
},
// 自送门店和上门取件的 点击 事件
tapTakeTypeOrdinary(e) {
this.setData({
takeTypeOrd: e.currentTarget.dataset.type
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,8 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"wux-popup":"../../extend/wux/dist/popup/index",
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
"wux-cell": "../../extend/wux/dist/cell/index"
}
}

View File

@@ -0,0 +1,154 @@
<!-- 普通用户一键下单 -->
<nav-bar isBack="{{ true }}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<view class="tecProcess">
<image mode="widthFix" src="{{ shopList.shopCart.length != 0 ?'http://cdn.yishaxiyi.com/ff8049b242111156b09d8b714de064dd.png':'http://cdn.yishaxiyi.com/d0a3068c38351c1082013e9dd135efdc.png'}}" />
</view>
<!-- 自送门店 和 上门取件 -->
<view class="tabs_choice pd20">
<view class="mt20">
<wux-cell-group>
<wux-cell
right="text_right_cell2"
title="自送门店"
data-type='1'
bind:tap="tapTakeTypeOrdinary"
rightUrl="{{takeTypeOrd == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
right="text_right_cell2"
title="上门取件"
data-type='2'
bind:tap="tapTakeTypeOrdinary"
rightUrl="{{takeTypeOrd == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
</view>
<view class="pd20">
<!-- 普通用户门店自取 -->
<view class="mt20" wx:if="{{takeTypeOrd == 1}}">
<picker
value="{{addIndex}}"
range="{{addList}}"
range-key='name'
bindchange='pickerChangeOrd'>
<view class='bac_cell'>
<wux-cell-group>
<wux-cell right="text_right_cell2" title="{{ addIndex == -1?'请选择门店': addList[addIndex].name}}" rightUrl='/static/img/icon/asfa51f3a1f3a5f13a.png' />
</wux-cell-group>
</view>
</picker>
</view>
<!-- 普通用户自送门店提示信息 -->
<view wx:if='{{ takeTypeOrd == 1 }}' class="tips pd25 mt20 app2">
部分门店周四休息,到店前请联系门店确认
</view>
<!-- 普通用户填写地址显示 -->
<navigator url="/user/addList/addList" wx:if='{{takeTypeOrd == 2 }}'>
<view class="rec mt20 pd25 flex-con2">
<view class="rec-all">
<view class="rec-img fl flex-con2">
<image src="/static/img/icon/rfw161.png" />
</view>
<view class="rec-add fl pl20">
<view class="adds clamp1">
<span>{{address.userName || '请选择或新建地址'}}</span>
<span class="ml10">{{address.telNumber}}</span>
</view>
<view class="addInfo clamp1">{{address.all || '请填写您的详细地址'}}</view>
</view>
<view class="fr right_icon flex-con2">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
</navigator>
</view>
<view class="page mt20 pd20">
<view class="shop_list mt20 pd20" wx:if="{{shopList.shopCart.length != 0}}">
<view class="shop_list_row dis-flex" wx:for="{{ shopList.shopCart }}" wx:key="index">
<view class="shop_list_img">
<image src="{{item.image}}" />
</view>
<view class="flex1 ml20 dis-flex1">
<view class="flex1 flex-con2">
<view class="flex1 text1">{{item.name}}</view>
<view class="flex1 text-right text1">¥{{item.price}}</view>
</view>
<view class="flex1 flex-con2">
<view class="flex1 text2">
<span>{{item.attr}}</span>
</view>
<view class="flex1 text-right text1">×{{item.num}}</view>
</view>
</view>
</view>
<view class="mon mt20">
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">订单金额</view>
<view class="flex1 text-right mon_p">¥{{shopList.orderPrice}}</view>
</view>
<navigator url="/mall/couponCard/couponCard?total=" class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">优惠</view>
<view class="flex1 flex-con5 mon_span">
<image src="/static/img/icon/right-r.png" />
<span wx:if="{{ !!coupon && !!coupon.price }}" class="mr20">
-¥{{coupon.price}}
</span>
<span wx:else class="mr20">选择优惠券</span>
</view>
</navigator>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">
运费
<span class="explain ml20" wx:if="{{ freightTips}}">实付满{{type == 2?groupData.satisfy_money:postage.satisfy_money}}元免运费</span>
<span class="explain ml20" wx:else>3月底前免运费</span>
</view>
<view class="flex1 text-right mon_p">¥{{shopList.postageMoney}}</view>
</view>
</view>
</view>
<view class="mt20">
<wux-cell-group>
<wux-cell
data-type="1"
bind:tap="selectPay"
data-url="/user/payment/card/card"
right="text_right_cell2"
thumb="{{!!giftCard.logo?giftCard.logo:'/static/img/icon/yhk.png'}}"
title="会员卡支付"
rightUrl="{{isPayp == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
data-type="2"
bind:tap="selectPay"
thumb="/static/img/icon/wxlogo2.png"
title="微信支付"
rightUrl="{{isPayp == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
<view class="tip mt40">
温馨提示:如订单总额未满{{postage.satisfy_money}}元需支付{{postage.postage_money}}元运费
</view>
</view>
<!-- 支付 -->
<view class="shop_pay">
<view class="flex-con5 flex1 pay_num">应付:¥{{shopList.total}}</view>
<form report-submit bindsubmit="payment">
<button class="pay_sub" form-type="submit">支付</button>
</form>
</view>

View File

@@ -0,0 +1,229 @@
.tecProcess{
width: 100%;
}
.tecProcess image{
width: 100%;
height: 50rpx;
}
.tips {
width: 100%;
background: #fff;
padding: 15px;
color: #8d8d8d;
}
.rec {
height: 180rpx;
width: 100%;
background-color: var(--white);
border-radius: 15rpx;
box-sizing: border-box;
}
.rec-all {
width: 100%;
}
.rec-img, .right_icon {
height: 100rpx;
}
.rec-img image {
height: 80rpx;
width: 80rpx;
}
.adds {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #000;
}
.rec-add {
width: 420rpx;
}
.addInfo {
margin-top: 20rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #999;
}
.right_icon image {
width: 15rpx;
height: 33rpx;
}
.app2 {
height: auto;
}
.rec-rem {
height: 113rpx;
width: 100%;
}
.rec-rem {
border-bottom: 2rpx solid #ebebeb;
}
.rec-rem:last-child {
border: 0;
}
.time {
width: 100%;
height: 36rpx;
line-height: 36rpx;
}
.time1 image {
width: 36rpx;
height: 36rpx;
}
.time2 {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #666;
}
.rec-rem input {
width: 100%;
}
.tip {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #999;
text-align: center;
}
.shop_list {
padding: 40rpx 0;
background-color: #fff;
border-radius: 10rpx;
}
.shop_list_row {
height: 100rpx;
padding: 22rpx 0;
margin: 0 30rpx;
border-bottom: 1rpx solid #ebebeb;
box-sizing: initial;
}
.shop_list_row:last-child {
margin-bottom: 0;
}
.shop_list_img image {
width: 100rpx;
height: 100rpx;
}
.text1 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.text2 {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
color: #999;
}
.mon{
padding: 0 20rpx;
}
.mon_p,.mon_p2 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.mon_p2{
color: #f22c21;
}
.mon_span{
font-weight: 500;
font-size: 34rpx;
color: #333;
}
.discount{
font-size: 24rpx;
border: #f22c21 1rpx solid;
color: #f22c21;
padding: 2rpx 5rpx;
box-sizing: border-box;
}
.explain{
font-size: 28rpx;
color: #999999;
}
.text_right_cell2{
display: flex;
align-items: center;
}
.mon_span image {
height: 28rpx;
width: 15rpx;
}
.mon_span {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #ff4838;
}
/* 支付 */
.shop_pay {
position: fixed;
height: 100rpx;
bottom: 0;
left: 0;
right: 0;
width: 100%;
display: flex;
background-color: #fff;
border-bottom: 2rpx solid #ebebeb;
z-index: 99999;
}
.pay_sub {
width: 260rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background-color: #1dbf53;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #fff;
border-radius: 0;
border: 0;
}
pay_sub::after{
width: 0;
height: 0;
border: 0;
}
.pay_num {
margin-right: 30rpx;
font-weight: 600;
font-family: PingFang-SC-Bold;
font-size: 30rpx;
color: #333;
}

View File

@@ -0,0 +1 @@
# 用户页面

View File

@@ -0,0 +1 @@
5dce3b9a-5629-4f55-998c-22c88fc76900

View File

@@ -0,0 +1,165 @@
// user/address/address.js
const app = getApp();
const util = app.loadUtils("util")
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "选择地址", //头部标题
isBack: true,//显示返回
currentId: null,//当前选中的地址id
addList: [],//收货地址列表
isAdd: false,//是否点击地址返回上一层
right: [
{
text: '删除',
style: 'background-color: #F4333C; color: white',
}],
},
// 修改收货地址信息
updataAdd(e) {
let item = e.currentTarget.dataset.item
model.storage.setStorage("updataAdd", item)
wx.navigateTo({
url: "/user/address/address?modify=" + 0
})
},
// 获取微信收货地址
getWxAdd() {
wx.chooseAddress({
success(res) {
model.storage.setStorage("address", res)
wx.navigateBack({
url: "/user/appointment/appointment"
})
}
})
},
// 选择收货地址方法
selectAdd(e) {
if (this.data.isAdd) {
return
}
let index = e.currentTarget.dataset.index
this.setData({
currentId: index
})
// 获取下表对应的地址
let indexAdd = this.data.addList[index]
let data = {
provinceName: indexAdd.address + indexAdd.detail,
userName: indexAdd.userName,
telNumber: indexAdd.telNumber,
cityName: "",
countyName: "",
detailInfo: "",
type: true,
id: indexAdd.id
}
// 存构造好的地址返回上一页
model.storage.setStorage("address", data)
wx.navigateBack({
url: "/user/appointment/appointment"
})
},
// 获取收货地址列表
async getUserAddress() {
let res = await http.http.request2({ url: `${http.api.getUserAddress}`, method: "POST" })
// 拿出默认地址
let defaultAddress = res.data.data.filter((val)=> val.is_default == 1);
// 本地保存
if(defaultAddress.length !== 0){
let data = {
provinceName: defaultAddress[0].provinceName,
userName: defaultAddress[0].userName,
telNumber: defaultAddress[0].telNumber,
cityName: defaultAddress[0].cityName,
countyName: defaultAddress[0].countryName,
detailInfo: defaultAddress[0].detail,
type: true,
id: defaultAddress[0].id
}
model.storage.setStorage("address", data)
}
this.setData({
addList: res.data.data
})
if(res.data.data.length <= 0){
wx.redirectTo({
url: "/user/address/address?modify=1"
})
}
},
// 侧滑删除
onClick(e) {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let data = {
isAdd: options.isAdd
}
this.setData(data)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getUserAddress()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,9 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"wux-swipe-action": "../../extend/wux/dist/swipe-action/index",
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
"wux-checkbox-group": "../../extend/wux/dist/checkbox-group/index",
"wux-checkbox": "../../extend/wux/dist/checkbox/index"
}
}

View File

@@ -0,0 +1,41 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/address/address.wxml -->
<view class="add_List">
<view class="addList">
<view wx:for="{{addList}}" wx:key="{{index}}" data-index="{{index}}" bind:tap="selectAdd">
<view class="add_row pt20">
<!-- <view class="chioose">
<image class="" src="/static/img/icon/wxPay1.png"></image>
</view> -->
<view class="row_l fl">
<view class="row_title">
<view class="name">
<span>{{item.userName}}</span>
<span class="ml20">{{item.telNumber}}</span>
<span wx:if="{{item.is_default == 1}}" class="default ml10">
默认地址
</span>
<span class="row_img ml10" wx:if="{{currentId == index}}">
<image src="/static/img/icon/thyjtyujyukjyui.png" />
</span>
</view>
</view>
<view class="row_p">{{item.address}}{{item.detail}}</view>
</view>
<view class="row_r fr flex-con2" data-item="{{ item }}" catchtap="updataAdd">
<image src="/static/img/icon/efwergtrhtyjytuj.png" />
<!-- <text>编辑</text> -->
</view>
</view>
</view>
</view>
<navigator url="/user/address/address?modify=1" hover-class="none">
<view class="add">添加联系地址</view>
</navigator>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,123 @@
/* user/address/address.wxss */
.wxadd{
height: 88rpx;
width: 100%;
background-color: var(--white);
}
.my_list{
width: 100%;
height: 100%;
display: flex;
}
.my_left{
flex: 1;
}
.my_left image{
width: 39rpx;
height: 32rpx;
}
.my_con{
flex: 8;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333333;
}
.my_right{
flex: 1;
text-align: right;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.my_right image{
width: 15rpx;
height: 33rpx;
}
.chioose{
padding: 0 10rpx 0 10rpx;
}
.chioose image {
width: 14px;
height: 14px;
}
.addList{
padding-bottom: 120rpx;
}
.add_row{
display: flex;
justify-content: space-between;
height: 193rpx;
background-color: var(--white);
align-items: center;
padding-left: 24px;
}
.row_l {
width: 565rpx;
height: 100%;
}
.row_title{
margin-top: 38rpx;
display: flex;
}
.name{
flex: 1;
font-family: PingFang-SC-Medium;
font-size: 30rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333333;
}
.row_img{
display: inline-block;
}
.row_img image{
width: 26rpx;
height: 26rpx;
}
.row_p{
margin-top: 24rpx;
word-wrap:break-word;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
line-height: 36rpx;
letter-spacing: 0px;
color: #666666;
}
.row_r{
/* width: 75rpx; */
height: 100%;
text-align: right;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
position: relative;
padding: 0 40rpx;
}
.row_r::before{
content: "";
position: absolute;
left: 0;
width: 2rpx;
height: 66rpx;
background-color: #ebebeb;
}
.row_r image{
width: 36rpx;
height: 36rpx;
}
.default{
color: red;
}

View File

@@ -0,0 +1 @@
d3dec3c4-94df-4ab4-ab35-254e5acb1f6f

View File

@@ -0,0 +1,204 @@
// user/address/address.js
const app = getApp();
const util = app.loadUtils("util");
const regeneratorRuntime = app.loadAsync();
const model = app.loadModel("index");
const http = app.loadHttp();
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "添加地址", //头部标题
isBack: true,//显示返回
conten: "",//地址显示
name: "",//收货人姓名
tel: "",//收货人手机号
detail: "",//收货地址详情
radioItems: [
{ name: '是', value: '0', checked: 'true' },
{ name: '否', value: '1', },
],
updateAdd: "",//修改收货地址
modify: null,//0 修改地址 1 增加地址
isAdd: false,//防止表单重复提交
},
radioChange: function (e) {
var checked = e.detail.value
var changed = {}
for (var i = 0; i < this.data.radioItems.length; i++) {
if (checked.indexOf(this.data.radioItems[i].name) !== -1) {
changed['radioItems[' + i + '].checked'] = true
} else {
changed['radioItems[' + i + '].checked'] = false
}
}
this.setData(changed)
},
// 接收修改地址
async upAdd() {
let add = await model.storage.getSetting("updataAdd")
if (!!add) {
model.storage.deleteStorage('updataAdd')
let conten = {
id: add.id,
address: add.address,
address_component: {
province: add.provinceName,
city: add.cityName,
district: add.countryName
}
}
this.setData({
updateAdd: add,
conten: conten
})
}
},
// 选择地址的方法
async add() {
let data = await util.selectAdd()
let conten = this.data.conten
data.result.id = conten.id
this.setData({
conten: data.result
})
},
// 提交收货地址
async subAdd(e) {
if (this.data.isAdd) return;
let value = e.detail.value
if (value.name == "") {
model.msg.dataMsg({
content: "请输入联系人",
type: "warning"
})
return
}
if (value.tel == "") {
model.msg.dataMsg({
content: "请输入手机号",
type: "warning"
})
return
}
if (!(/^1[3456789]\d{9}$/.test(value.tel))) {
model.msg.dataMsg({
content: "请输入正确的手机号",
type: "warning"
})
return false;
}
if (this.data.conten == "") {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (value.detail == "") {
model.msg.dataMsg({
content: "请输入详情地址",
type: "warning"
})
return
}
let data = {
userName: value.name,
telNumber: value.tel,
address: this.data.conten.address,
provinceName: this.data.conten.address_component.province,
cityName: this.data.conten.address_component.city,
countryName: this.data.conten.address_component.district,
detail: value.detail,
is_default: 0
}
// 判断是否选中默认
if (this.data.radioItems[0].checked) {
data.is_default = 1
}
// 修改地址需要地址id
if (this.data.modify == 0) {
data.id = this.data.conten.id
}
this.setData({
isAdd: true
})
// 判断是否是修改地址
let url = this.data.modify == 0 ? `${http.api.editUserAddress}` : `${http.api.userAddress}`
let res = await http.http.request2({ url: url, method: "POST", data: data })
if (res.data.status == 1) {
model.msg.dataMsg({
content: res.data.msg,
type: "success"
})
// 成功1s后返回上一页
setTimeout(() => {
wx.navigateBack({
})
}, 1000)
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
modify: options.modify
})
this.upAdd()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,4 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {}
}

View File

@@ -0,0 +1,59 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/address/address.wxml -->
<view class="address">
<form bindsubmit="subAdd">
<view class="list_text pd30 mt20">
<view class="text_row">
<view class="text_row1 flex-con2">联系人</view>
<view class="text_row2 flex-con2">
<input placeholder-style="color:#cccccc;" name="name" type="text" value="{{!!updateAdd.userName ? updateAdd.userName : ''}}" placeholder="{{ !!updateAdd.userName ? updateAdd.userName : '请输入姓名'}}" />
</view>
<view class="text_row3 flex-con3"></view>
</view>
<view class="text_row">
<view class="text_row1 flex-con2">电话</view>
<view class="text_row2 flex-con2">
<input placeholder-style="color:#cccccc;" name="tel" type="number" value="{{!!updateAdd.telNumber ? updateAdd.telNumber : ''}}" placeholder="{{ !!updateAdd.telNumber ? updateAdd.telNumber : '请输入手机号'}}" />
</view>
<view class="text_row3 flex-con3"></view>
</view>
<view class="text_row">
<view class="text_row1 flex-con2">位置</view>
<view class="text_row2 flex-con2" bind:tap="add">
<span>{{conten.address ||'请选择您的位置'}}</span>
</view>
<view class="text_row3 flex-con3" bind:tap="add">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
<view class="text_row">
<view class="text_row1 flex-con2">详情地址</view>
<view class="text_row2 flex-con2">
<input placeholder-style="color:#cccccc;" name="detail" type="text" value="{{!!updateAdd.detail ? updateAdd.detail : ''}}" placeholder="{{ !!updateAdd.detail ? updateAdd.detail : '小区/大厦/楼层门号'}}" />
</view>
<view class="text_row3 flex-con3"></view>
</view>
<view class="text_row">
<view class="text_row1 flex-con2">默认地址</view>
<view class="text_row2 flex-con2">
<radio-group class="group flex-con2 flex1" bindchange="radioChange">
<view class="label-2 flex1" wx:for="{{radioItems}}" wx:key="{{ index }}">
<label class="label-2__text" for="{{item.name}}">
<radio id="{{item.name}}" hidden value="{{item.name}}" checked="{{item.checked}}"></radio>
<view class="label-2__icon">
<view class="label-2__icon-checked" style="opacity:{{item.checked ? 1: 0}}"></view>
</view>
<text>{{item.name}}</text>
</label>
</view>
</radio-group>
</view>
<view class="text_row3 flex-con3"></view>
</view>
</view>
<button class="sub" form-type="submit">保存</button>
</form>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,111 @@
/* user/address/address.wxss */
.list_text {
background-color: #fff;
}
.text_row {
display: flex;
height: 100rpx;
width: 100%;
border-bottom: 2rpx solid #ebebeb;
}
.text_row1 {
flex: 2;
font-size: 32rpx;
font-weight: 700;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
}
.text_row2 {
padding-left: 40rpx;
flex: 7;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #666;
}
.text_row2 span {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #ccc;
display: -webkit-box !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.text_row3 {
flex: 1;
}
.text_row3 image {
width: 15rpx;
height: 33rpx;
}
.text_row:last-child {
border: 0;
}
.label-1__text, .label-2__text {
display: inline-block;
vertical-align: middle;
height: 100%;
width: 50%;
}
.label-1__icon {
position: relative;
margin-right: 10px;
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
background: #fcfff4;
}
.label-1__icon-checked {
position: absolute;
top: 3px;
left: 3px;
width: 12px;
height: 12px;
background: #1aad19;
}
.label-2__icon {
position: relative;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
width: 18px;
height: 18px;
border: #ebebeb solid 2rpx;
background: #fff;
border-radius: 50px;
}
.label-2__icon-checked {
position: absolute;
left: 50%;
top: 50%;
margin: -6px 0 0 -6px;
width: 12px;
height: 12px;
background: #1aad19;
border-radius: 50%;
}
.label-4_text {
text-align: center;
margin-top: 15px;
}

View File

@@ -0,0 +1 @@
9e45e791-de8b-419c-89c7-3fd0dbc7382f

View File

@@ -0,0 +1,768 @@
// user/appointment/appointment.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
const util = app.loadUtils("util")
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "一键下单", //头部标题
isBack: true,//显示返回
visible: false,//弹出层
somList: [],
date_list: [],//预约时间列表
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
address: "",//选中的收货地址
remarks: "",//备注
isPlaceOrder: false,//防止重复提交
postage: {},//邮费
shopList: {
shopCart: [], //购物车商品数据
orderPrice: null, //商品总价
ordinaryPrice: null, //普通衣物的价格
workPrice: null, //工服衣物的价格
totalPrice: null, //扣除优惠+邮费的价格
postageMoney: null, //邮费
wxMoney: null,//微信该支付的钱
total: null, //底部显示的合计
},
isPay: [true, true],//0下标是微信支付 1下标是卡支付
isPayp: 2,//1卡支付 2微信支付
giftCard: {},//会员卡信息
coupon: {},//优惠券
isgiftCard: "",//拼接的卡劵信息方便操作
groupType: -1,//如果不是0就是团体用户,0 或 -1 是非广大用户
type: 1,//1是团体用户普通洗 2是洗工服
groupData: {},//团体用户折扣优惠数据信息
take_type: 1,//门店自取1 单位自取2
branchList: [], //支行列表
branchIndex: 0,// 当前用户选择的支行下标
takeTypeOrd: 1,//普通用户 自送门店1 上门取件2
addList: [], // 门店列表
addIndex: -1, //当前用户选择的门店下标
timeFreight: '', //如果团体客户在预约时间内则免运费
isCoupon: true, //是否显示优惠卷
coilingCode: '', //用户输入的卷码
formSource: 0,// 订单来源 如果不是0则显示码卷输入
freightTips: true, // true 显示 实付xx,false 3月底免运费
isCurtains: 0 // // 0 不是窗帘套餐, 1 是窗帘套餐
},
// 获取默认收货人
async getConsignee() {
let token = await util.token()
if (!token) return;
let res = await http.http.request2({ url: `${http.api.defaultUserAddress}`, method: "POST" })
let add = res.data.data
if (!!add.id) {
add.all = add.provinceName + add.cityName + add.countryName + add.detail
this.setData({
address: add
})
}
},
// 获取支行列表
async groupBranchList() {
let res = await http.http.request2({ url: http.api.groupBranchList, method: 'POST' })
res.data.data.forEach((v,i)=>{
if(v.id == app.globalData.userInfo.group_branch){
this.setData({
branchIndex: i
})
}
})
this.setData({
branchList: res.data.data
})
},
// 选择其他支行
pickerChange(e) {
this.setData({
branchIndex: parseInt(e.detail.value),
timeFreight: '',
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
})
this.getMaketime()
this.calculation()
},
/**
* 获取全部门店列表
*/
async getStoreList() {
let data = await model.storage.getSetting("position")
let res = await http.http.request1({
url: `${http.api.disShopList}`, method: "POST", data: {
pick_door: 1
}
})
let rel = res.data.data;
this.setData({
addList: [...rel]
})
},
// 门店选择
pickerChangeOrd(e){
this.setData({
addIndex: parseInt(e.detail.value)
})
this.calculation()
},
// 获取邮费
async postage() {
let url = '';
if (this.data.groupType !== 0 && this.data.type == 2) {
url = http.api.newPostage
} else {
url = http.api.postage
}
let res = await http.http.request2({ url: url, method: "POST", data: { type: 2 } })
this.setData({
postage: res.data.data
})
},
// 获取光大用户会员卡
async getGuangDa() {
let res = await http.http.request2({ url: http.api.guangDa, method: "POST", data: { group_type: this.data.groupType } })
this.setData({
giftCard: res.data.data
})
},
//弹出层开启关闭
onClose() {
this.setData({
visible: !this.data.visible
})
},
// 选中大分类
bigSelect(e) {
let index = e.currentTarget.dataset.index
this.setData({
bigIndex: index,
somList: this.data.date_list[index].time_list
})
},
// 选中小分类
somSelect(e) {
let index = e.currentTarget.dataset.index
let item = e.currentTarget.dataset.item
if (item.type == '今日休息') {
wx.showToast({
title: '每周四休息,给您带来不便,敬请谅解',
icon: 'none',
duration: 2000
})
return
} else if (item.type == '2') {
wx.showToast({
title: '当前时间段已过,请重新选择',
icon: 'none',
duration: 2000
})
return
}
this.setData({
somIndex: item,
timeFreight: parseInt(item.post_desc) > 0 ? parseInt(item.post_desc) : 0
})
this.onClose()
if(this.data.take_type == 2){
this.calculation()
}
},
// 获取收货地址并且赋值到页面
async getAdd() {
let data = await model.storage.getSetting("address")
if (!!data) {
model.storage.deleteStorage('address')
data.all = data.provinceName + data.cityName + data.countyName + data.detailInfo
this.setData({
address: data || ""
})
}
},
/**
* 获取预约时间
* 并把小分类赋值
*/
async getMaketime() {
let data = {}
// isCurtains 如果为1,请求窗帘的活动时间,如果为 0 请求普通衣物和套餐时间
data.is_appoint_time = this.data.isCurtains;
if(this.data.take_type == 2){
data.bind_id = this.data.branchList[this.data.branchIndex].id
if(this.data.type == 1){
data.bind_wash_type = 2
}else{
data.bind_wash_type = 1
}
}
let time = await http.http.request1({ url: `${http.api.getTime}`, method: "POST", data:data })
this.setData({
date_list: time.data.data.date_list,
somList: time.data.data.date_list[0].time_list
})
},
// 团体用户折扣优惠数据信息
async groupDiscountInfo() {
let res = await http.http.request2({ url: http.api.groupDiscountInfo, method: "POST" })
this.setData({
groupData: res.data.data
})
},
// 团体是否门店自取
async tapTakeType(e) {
this.setData({
take_type: e.currentTarget.dataset.type,
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
timeFreight: ''
})
this.getMaketime()
this.calculation()
// 1 自送门店 3月底免运费
// if (this.data.take_type == 1) {
// this.setData({
// freightTips: true
// })
// }
},
// 普通用户门店自取和上门取件选择
async tapTakeTypeOrdinary(e) {
this.setData({
takeTypeOrd: e.currentTarget.dataset.type,
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
timeFreight: ''
})
this.getMaketime()
this.calculation()
// 1 自送门店 3月底免运费
// if (this.data.takeTypeOrd == 2) {
// this.setData({
// freightTips: true
// })
// }
},
// 提交下单
async placeOrder(e) {
// 防止重复提交
if (this.data.isPlaceOrder) {
return
}
let formId = e.detail.formId
let m = this.data
let add = m.address
if (add == "" && this.data.take_type == 1 && (this.data.groupType !== 0 && this.data.groupType !== -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (add == "" && this.data.takeTypeOrd == 2 && (this.data.groupType == 0 || this.data.groupType == -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (m.somIndex == null && (this.data.takeTypeOrd == 2 || ((this.data.groupType != 0 && this.data.groupType != -1)))) {
model.msg.dataMsg({
content: "请选择上门时间",
type: "warning"
})
return
}
if (this.data.addIndex == -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)) {
model.msg.dataMsg({
content: "请选择门店",
type: "warning"
})
return
}
let data = {
status: 1,
accept_time: '',
address_id: "",
remarks: m.remarks,
form_id: formId,
form: this.data.formSource,
code_num: this.data.coilingCode,
wx_info: {
name: add.userName,
tel: add.telNumber,
address: `${add.provinceName},${add.cityName},${add.countyName},${add.detailInfo}`
}
}
// 判断是否是自送门店,如果是 logic_type = 1
if (this.data.takeTypeOrd == 1) {
data.logic_type = 3
} else {
data.logic_type = 1
}
// 如果普通用户上门取件或团体客户上门取件则,在下单时加上地址id
if(this.data.takeTypeOrd == 2 || this.data.take_type == 1) {
data.address_id = add.id
}
// 光大用户
if (this.data.groupType != 0 && this.data.groupType != -1 ) {
data.logic_type = 1
}
// 普通用户门店自取
if (this.data.addIndex !== -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)) {
data.accept_shop_id = this.data.addList[this.data.addIndex].id
}
if (this.data.takeTypeOrd == 2 || (this.data.groupType !== 0 && this.data.groupType !== -1)) {
data.accept_time = (`${m.date_list[m.bigIndex].date} ${m.somIndex.time}`).replace(/(^\s*)|(\s*$)/g, "")
}
this.setData({
isPlaceOrder: true
})
setTimeout(() => {
this.setData({
isPlaceOrder: false
})
}, 200)
let res = await http.http.request2({ url: `${http.api.quickReserva}`, method: "POST", data: data })
if (res.data.status == 1) {
model.msg.dataMsg({
content: res.data.msg,
type: "none"
})
// 500ms后跳转首页
setTimeout(() => {
wx.redirectTo({
url: "/user/appointment/paid/paid"
})
}, 500)
return
}
},
changeSearch(e) {
this.setData({
remarks: e.detail.value
})
},
// 码卷
changeCode(e) {
this.setData({
coilingCode: e.detail.value
})
},
// 订单各种金额计算
calculation() {
let orderPrice = 0, ordinaryPrice = 0, workPrice = 0, totalPrice = 0, postageMoney = 0, wxMoney = 0, total = 0, shopCart = this.data.shopList.shopCart, take_type= this.data.take_type;
let groupType = this.data.groupType
let coupon = this.data.coupon.price || 0
// 不打折的钱
let is_discountAll = 0
//如果选中的商品有is_special字段并且等于2则改成true
//如果等于true则免运费
let is_specialAll = false
// 邮费配置团体用户的折扣
let groupData = this.data.groupData
shopCart.forEach((v, i) => {
orderPrice += parseFloat(v.price) * v.num
// 如果有套餐不给使用优惠卷
if (v.is_discount == 2){
this.setData({
isCoupon: false
})
}
// 如果is_special等于2则代表免运费
if (v.is_special == 2) {
// 如果有套餐衣物,那么现实3月底不要运费的提示信息
this.setData({ freightTips: false });
is_specialAll = true
}
// 这部分钱是不需要打折的钱
if (v.is_discount == 2){
is_discountAll += parseFloat(v.price) * v.num
}
if (v.type == 2) {
ordinaryPrice += parseFloat(v.price) * v.num
} else if (v.type == 1) {
workPrice += parseFloat(v.price) * v.num
}
});
// 如果groupType不是0则是团体用户
if (groupType !== 0) {
totalPrice = (((ordinaryPrice - is_discountAll) * groupData.wx_discount / 100) + workPrice + is_discountAll)
// 计算光大用户的专属折扣
ordinaryPrice = ((ordinaryPrice - is_discountAll) * groupData.wx_discount / 100)
total = totalPrice
} else {
// 商品总价
totalPrice = ordinaryPrice + workPrice
// 加上优惠卷
total = totalPrice - coupon
ordinaryPrice = 0.00
// 计算普通用户选择会员卡和优惠券后的价格
if (this.data.giftCard.price) {
total = ((total - is_discountAll) * (this.data.giftCard.price * 0.1)) + is_discountAll
}
}
// 计算邮费
// 团体客户计算运费
if (groupType !== 0) {
// 团体用户普通洗
if (this.data.type == 1) {
postageMoney = this.postageTwo(total, is_specialAll)
wxMoney = wxMoney + postageMoney
} else if (this.data.type == 2) {
// 团体用户工服洗计算
postageMoney = this.postageOne(total)
}
} else {
// 正常用户运费计算
postageMoney = this.postageThree(total, is_specialAll)
}
// shopList.total 做三元运算判断,防止支付金额出现负数.
this.setData({
'shopList.orderPrice': orderPrice.toFixed(2),
'shopList.ordinaryPrice': ordinaryPrice.toFixed(2),
'shopList.workPrice': workPrice.toFixed(2),
'shopList.totalPrice': (totalPrice + postageMoney).toFixed(2),
'shopList.postageMoney': postageMoney.toFixed(2),
'shopList.wxMoney': ordinaryPrice.toFixed(2),
'shopList.total': (total + postageMoney).toFixed(2) <= 0 ? 0 : (total + postageMoney).toFixed(2)
})
},
// 团体客户清洗工服的邮费计算
postageOne(total){
let postageMoney = 0;
// 邮费配置团体用户的折扣
// 因为团体客户使用专属卡洗衣所以,运费从专属配置中获取
let groupData = this.data.groupData
// 正常判断总价是否大于收取运费的阈值
if ((total >= groupData.satisfy_money)) {
postageMoney = 0
} else {
// 这一步中如果时间上不收取运费 并且是单位取件则不收取运费
if ((this.data.timeFreight <= 0 && this.data.take_type == 2)){
postageMoney = 0
}else{
postageMoney = groupData.postage_money
}
}
return postageMoney
},
// 团体客户清洗普通衣物邮费计算
//
postageTwo(total, suit){
let postageMoney = 0;
// 邮费配置
let postage = this.data.postage;
// 正常判断总价是否大于收取运费的阈值
if ((total >= postage.satisfy_money) || suit) {
postageMoney = 0
} else {
// 如果是单位取件 并且 时间上是免运费 就不收运费
if ((this.data.timeFreight <= 0 && this.data.take_type == 2) || suit > 0){
postageMoney = 0
}else{
postageMoney = postage.postage_money
}
}
return postageMoney
},
// 普通客户清洗衣物的邮费计算
postageThree(total, suit){
let postageMoney = 0;
// 邮费配置
let postage = this.data.postage;
// 正常判断总价是否大于收取运费的阈值 如果是门店自取不收取客户运费
if (total >= postage.satisfy_money || suit || this.data.takeTypeOrd == 1) {
postageMoney = 0
} else {
postageMoney = postage.postage_money
}
return postageMoney
},
// 获取卡劵
async getGiftCard() {
let giftCard = await model.storage.getSetting("giftCard")
if (!!giftCard) {
model.storage.deleteStorage('giftCard')
this.setData({
giftCard: giftCard,
isgiftCard: giftCard.title + " " + giftCard.price + '折',
isPayp: 1
})
}
this.calculation()
},
// 获取优惠券
async getCoupon() {
let coupon = await model.storage.getSetting("coupon")
if (!!coupon) {
model.storage.deleteStorage('coupon')
this.setData({
coupon: coupon
})
}
this.calculation()
},
// 选择支付方式
selectPay(e) {
let type = e.currentTarget.dataset.type
let url = e.currentTarget.dataset.url
if (type == 2) {
this.setData({
isgiftCard: "",
giftCard: {},
isPayp: type
})
this.calculation()
} else if (type == 1) {
wx.navigateTo({
url: url
})
}
},
// 用户支付
async payment(e) {
let formId = e.detail.formId
let m = this.data
let add = m.address
if (add == "" && this.data.take_type == 1 && (this.data.groupType !== 0 && this.data.groupType !== -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (add == "" && this.data.takeTypeOrd == 2 && (this.data.groupType == 0 || this.data.groupType == -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (m.somIndex == null && (this.data.takeTypeOrd == 2 || ((this.data.groupType != 0 && this.data.groupType != -1)))) {
model.msg.dataMsg({
content: "请选择上门时间",
type: "warning"
})
return
}
if (this.data.addIndex == -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)){
model.msg.dataMsg({
content: "请选择门店",
type: "warning"
})
return
}
// 如果是光大用户切礼卡中钱不足则提示
if (this.data.groupType !== 0 && this.data.type == 2 && parseFloat(this.data.giftCard.money) < this.data.shopList.workPrice) {
model.msg.dataMsg({
content: "礼卡中余额不足不能清洗工服,请重新下单清洗普通衣物",
type: "warning",
duration: 3
})
return
}
let pro_id = '', pro_id_count = '';
let data = {
status: 1,
accept_time: '',
address_id: "",
remarks: m.remarks,
form_id: formId,
wx_info: {
name: add.userName,
tel: add.telNumber,
address: `${add.provinceName},${add.cityName},${add.countyName},${add.detailInfo}`
},
take_type: this.data.groupType == 39 ? this.data.take_type : 1
};
// 判断是否是自送门店,如果是 logic_type = 1
if (this.data.takeTypeOrd == 1) {
data.logic_type = 3
} else {
data.logic_type = 1
}
// 如果普通用户上门取件或团体客户上门取件则,在下单时加上地址id
if(this.data.takeTypeOrd == 2 || this.data.take_type == 1) {
data.address_id = add.id
}
// 光大用户
if (this.data.groupType != 0 && this.data.groupType != -1) {
data.logic_type = 1
}
m.shopList.shopCart.forEach((v, i) => {
pro_id += v.id + ','
pro_id_count += v.num + ','
})
data.pro_id = pro_id.replace(/^(\s|,)+|(\s|,)+$/g, '')
data.pro_id_count = pro_id_count.replace(/^(\s|,)+|(\s|,)+$/g, '')
if(this.data.take_type == 2 && this.data.groupType == 39){
data.brand_id = this.data.branchList[this.data.branchIndex].id
}
// 普通用户门店自取
if (this.data.addIndex !== -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)){
data.accept_shop_id = this.data.addList[this.data.addIndex].id
}
if (this.data.takeTypeOrd == 2 || (this.data.groupType !== 0 && this.data.groupType !== -1)){
data.accept_time = (`${m.date_list[m.bigIndex].date} ${m.somIndex.time}`).replace(/(^\s*)|(\s*$)/g, "")
}
let res = await http.http.request2({ url: http.api.newQReserva, method: "POST", data: data })
let payInfo = {
orderID: res.data.data.order_id,
userCouponID: 0,
userCardID: 0
}
// 光大用户
if (this.data.groupType !== 0 && this.data.groupType !== -1) {
payInfo.payType = 3
payInfo.userCardID = this.data.giftCard.id
if(this.data.take_type == 2){
payInfo.bindId = this.data.branchList[this.data.branchIndex].id
}
} else {
// 普通用户
payInfo.payType = this.data.isPayp
// 卡
if (this.data.isPayp == 1) {
payInfo.userCardID = this.data.giftCard.id
}
// 优惠券
if (!!this.data.coupon.id) {
payInfo.userCouponID = this.data.coupon.id
}
}
let rel = await model.payment.pay(http.api.preShopOrder, payInfo)
if (rel == 1) {
// 500ms后跳转首页
setTimeout(() => {
wx.redirectTo({
url: "/user/appointment/paid/paid"
})
}, 500)
return
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: async function (options) {
let isTel = app.globalData.userInfo.telnum
if (isTel == "点击授权手机号" || isTel == '') {
wx.navigateTo({
url: '/pages/login/login'
})
return 1
}
this.data.isCurtains = options.isCurtains
// console.log("options.isCurtains: ", this.data.isCurtains)
// 如果有值,则代表从别的小程序过来的
if (!!options.from){
this.setData({
formSource: options.from
})
// 存储用户来源,在登录时使用
model.storage.setStorage("from", options.from)
}
Promise.all([this.getMaketime(),this.getConsignee(),this.groupBranchList(),this.postage(),this.getStoreList()])
.then( async (res)=>{
if (!!options.shopCart) {
let shopCart = JSON.parse(options.shopCart)
this.setData({
'shopList.shopCart': shopCart,
groupType: parseInt(options.group_type),
type: parseInt(options.type)
})
if (options.group_type !== '0') {
// 如果是团体用户默认选中单位取件
this.setData({
take_type: 2
})
// 如果是团体客户重新调一次时间 因为团体默认单位取件
this.getMaketime()
// 获取团体卡
this.getGuangDa()
await this.groupDiscountInfo()
}
// 订单各种金额计算
this.calculation()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getAdd()
if (this.data.groupType != -1) {
this.getGiftCard()
this.getCoupon()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,8 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"wux-popup":"../../extend/wux/dist/popup/index",
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
"wux-cell": "../../extend/wux/dist/cell/index"
}
}

View File

@@ -0,0 +1,320 @@
<!-- user/appointment/appointment.wxml -->
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}" />
<view class="tecProcess">
<image mode="widthFix" src="{{ shopList.shopCart.length != 0 ?'http://cdn.yishaxiyi.com/ff8049b242111156b09d8b714de064dd.png':'http://cdn.yishaxiyi.com/d0a3068c38351c1082013e9dd135efdc.png'}}" />
</view>
<!-- 自送门店 和 上门取件 -->
<view class="tabs_choice pd20">
<view class="mt20" wx:if="{{groupType == -1 || groupType == 0}}">
<wux-cell-group>
<wux-cell
right="text_right_cell2"
title="自送门店"
data-type='1'
bind:tap="tapTakeTypeOrdinary"
rightUrl="{{takeTypeOrd == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
right="text_right_cell2"
title="上门取件"
data-type='2'
bind:tap="tapTakeTypeOrdinary"
rightUrl="{{takeTypeOrd == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
</view>
<!-- 内容 -->
<view class="appointment pd20">
<form report-submit bindsubmit="placeOrder">
<view class="mt20" wx:if="{{groupType !== -1 && groupType !== 0}}">
<wux-cell-group>
<wux-cell
right="text_right_cell2"
title="在单位约定时间或到门店洗衣免运费"
data-type='2'
bind:tap="tapTakeType"
rightUrl="{{take_type == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
right="text_right_cell2"
title="其它地址上门取送"
data-type='1'
bind:tap="tapTakeType"
rightUrl="{{take_type == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
<!-- 团体客户地址选择 -->
<view wx:if="{{groupType !== 0 && groupType !== -1}}">
<!-- 选择快递方式 -->
<view class="mt20" wx:if="{{take_type == 2}}">
<picker
value="{{branchIndex}}"
range="{{branchList}}"
range-key='unit_title'
bindchange='pickerChange'
>
<view class='bac_cell'>
<wux-cell-group>
<wux-cell right="text_right_cell2" title="{{ branchIndex == -1?'请选择您所在的分行':branchList[branchIndex].unit_title}}" rightUrl='/static/img/icon/asfa51f3a1f3a5f13a.png' />
</wux-cell-group>
</view>
</picker>
</view>
<navigator url="/user/addList/addList" wx:if='{{take_type == 1}}'>
<view class="rec mt20 pd25 flex-con2">
<view class="rec-all">
<view class="rec-img fl flex-con2">
<image src="/static/img/icon/rfw161.png" />
</view>
<view class="rec-add fl pl20">
<view class="adds clamp1">
<span>{{address.userName || '请选择或新建地址'}}</span>
<span class="ml10">{{address.telNumber}}</span>
</view>
<view class="addInfo clamp1">{{address.all || '请填写您的详细地址'}}</view>
</view>
<view class="fr right_icon flex-con2">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
</navigator>
</view>
<!-- 普通用户的地址选择 -->
<view wx:if="{{groupType == -1 || groupType == 0}}">
<!-- 普通用户门店自取 -->
<view class="mt20" wx:if="{{takeTypeOrd == 1}}">
<picker
value="{{addIndex}}"
range="{{addList}}"
range-key='name'
bindchange='pickerChangeOrd'
>
<view class='bac_cell'>
<wux-cell-group>
<wux-cell right="text_right_cell2" title="{{ addIndex == -1?'请选择门店':addList[addIndex].name}}" rightUrl='/static/img/icon/asfa51f3a1f3a5f13a.png' />
</wux-cell-group>
</view>
</picker>
</view>
<!-- 普通用户填写地址显示 -->
<navigator url="/user/addList/addList" wx:if='{{takeTypeOrd == 2 }}'>
<view class="rec mt20 pd25 flex-con2">
<view class="rec-all">
<view class="rec-img fl flex-con2">
<image src="/static/img/icon/rfw161.png" />
</view>
<view class="rec-add fl pl20">
<view class="adds clamp1">
<span>{{address.userName || '请选择或新建地址'}}</span>
<span class="ml10">{{address.telNumber}}</span>
</view>
<view class="addInfo clamp1">{{address.all || '请填写您的详细地址'}}</view>
</view>
<view class="fr right_icon flex-con2">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
</navigator>
</view>
<view wx:if='{{ takeTypeOrd == 1 && (groupType == 0 || groupType == -1) }}' class="tips pd25 mt20 app2">
部分门店周四休息,到店前请联系门店确认
</view>
<view class="rec app2 mt20 pd25" wx:if='{{takeTypeOrd == 2 || ((groupType != 0 && groupType != -1)) }}'>
<view class="rec-rem flex-con2 pl20" bind:tap="onClose">
<view class="time">
<view class="time1 fl">
<image src="/static/img/icon/asfasfwerf.jpg" />
</view>
<view class="time2 fl pl20">
{{ !!somIndex.time ? date_list[bigIndex].title :''}} {{ somIndex.time || '请选择上门时间'}}
</view>
<view class="right_icon fr">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
<view class="rec-rem flex-con2 pl20">
<input type="text" placeholder="备注:(如取送时间、污渍等说明)" bindinput="changeSearch" />
</view>
</view>
<view class="rec app2 mt20 pd25">
<!-- 第三方进入时显示 -->
<view class="rec-rem flex-con2 pl20" wx:if="{{formSource != 0}}">
<input type="text" placeholder="请输入卷码" bindinput="changeCode" />
</view>
</view>
<!-- 如果从洗衣购物车过来的显示 -->
<view class="shop_list mt20" wx:if="{{shopList.shopCart.length != 0}}">
<view class="shop_list_row dis-flex" wx:for="{{ shopList.shopCart }}" wx:key="index">
<view class="shop_list_img">
<image src="{{item.image}}" />
</view>
<view class="flex1 ml20 dis-flex1">
<view class="flex1 flex-con2">
<view class="flex1 text1">{{item.name}}{{item.type == 1?'(工服)':''}}</view>
<view class="flex1 text-right text1">¥{{item.price}}</view>
</view>
<view class="flex1 flex-con2">
<view class="flex1 text2">
<span>{{item.attr}}</span>
</view>
<view class="flex1 text-right text1">×{{item.num}}</view>
</view>
</view>
</view>
<view class="mon mt20">
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">订单金额</view>
<view class="flex1 text-right mon_p">¥{{shopList.orderPrice}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex" wx:if="{{groupType !== 0 && type == 1}}">
<view class="flex1 mon_p">
专属优惠
<span class="discount ml20" wx:if="{{shopList.ordinaryPrice > 0}}">{{groupData.favour_des}}</span>
</view>
<view class="flex1 text-right mon_p2">-¥{{shopList.ordinaryPrice}}</view>
</view>
<navigator wx:if="{{groupType == 0 && isCoupon}}" url="/mall/couponCard/couponCard?total={{shopList.orderPrice}}" class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">优惠</view>
<view class="flex1 flex-con5 mon_span">
<image src="/static/img/icon/right-r.png" />
<span wx:if="{{ !!coupon && !!coupon.price }}" class="mr20">
-¥{{coupon.price}}
</span>
<span wx:else class="mr20">选择优惠券</span>
</view>
</navigator>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">
运费
<span class="explain ml20" wx:if="{{ freightTips}}">实付满{{type == 2?groupData.satisfy_money:postage.satisfy_money}}元免运费</span>
<span class="explain ml20" wx:else>3月底前免运费</span>
</view>
<view class="flex1 text-right mon_p">¥{{shopList.postageMoney}}</view>
</view>
<!-- <view class="mon_cen pdtb20 dis-flex">
<view class="flex1 text-right mon_p">
合计:
<span class="mon_span">¥{{shopList.total}}</span>
</view>
</view> -->
</view>
</view>
<view class="mt20" wx:if="{{groupType !== 0 && groupType !== -1}}">
<wux-cell-group>
<wux-cell
wx:if="{{type == 1}}"
extra='{{shopList.total}}'
right="text_right_cell2"
thumb="/static/img/icon/wxlogo2.png"
title="微信支付"
rightUrl="{{isPay[0] ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
wx:if="{{type == 2}}"
extra='{{shopList.total}}'
right="text_right_cell2"
thumb="{{!!giftCard.logo?giftCard.logo:'/static/img/icon/guangda.png'}}"
title="光大专属礼卡"
rightUrl="{{isPay[1] ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
>
<span style="color:#f22c21;">(余额¥{{giftCard.money}})</span>
</wux-cell>
</wux-cell-group>
</view>
<view class="mt20" wx:elif="{{groupType == 0}}">
<wux-cell-group>
<wux-cell
data-type="1"
bind:tap="selectPay"
data-url="/user/payment/card/card"
right="text_right_cell2"
thumb="{{!!giftCard.logo?giftCard.logo:'/static/img/icon/yhk.png'}}"
title="{{isgiftCard != ''?isgiftCard:'会员卡支付'}}"
rightUrl="{{isPayp == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
data-type="2"
bind:tap="selectPay"
thumb="/static/img/icon/wxlogo2.png"
title="微信支付"
rightUrl="{{isPayp == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
<button wx:if="{{groupType == -1}}" class="sub" form-type="submit">立即下单</button>
<view class="tip mt40" wx:if="{{groupType !== 0 && groupType !== -1}}">
温馨提示:{{groupData.tips}}
</view>
<view class="tip mt40" wx:else>
温馨提示:如订单总额未满{{postage.satisfy_money}}元需支付{{postage.postage_money}}元运费
</view>
</form>
</view>
<!-- 支付 -->
<view class="shop_pay" wx:if="{{groupType !== -1}}">
<view class="flex-con5 flex1 pay_num">应付:¥{{shopList.total}}</view>
<form report-submit bindsubmit="payment">
<button class="pay_sub" form-type="submit">支付</button>
</form>
</view>
<wux-popup position="bottom" visible="{{ visible }}" bind:close="onClose">
<view class="frame">
<view class="frame_title">
<view class="frame_p">上门时间</view>
<span bind:tap="onClose">
<image src="/static/img/icon/dasdasd_05.png" />
</span>
</view>
<view class="frame_cen">
<view class="frame_cenl">
<view
wx:for="{{date_list}}"
wx:key="index"
bind:tap="bigSelect"
class="cenl_row {{bigIndex == index?'row_active1':''}}"
data-index="{{index}}"
>
{{item.title}}
</view>
</view>
<view class="frame_cenr">
<view
wx:for="{{somList}}"
wx:key="index"
bind:tap="somSelect"
data-item="{{item}}"
data-index="{{index}}"
class="cenr_row pd30"
>
<view class="frame_time fl {{somIndex.time == item.time?'row_active2':''}} {{item.type == 1 ?'black300':''}}">
{{item.time || '今日休息'}}
</view>
<view class="frame_time" wx:if="{{groupType !== 0 && take_type == 2}}">
运费:{{item.post_desc}}
</view>
<view wx:if="{{somIndex.time == item.time && bigIndex == index}}" class="frame_img fr">
<image src="/static/img/icon/qewfwrgerthgrt.png" />
</view>
</view>
</view>
</view>
</view>
</wux-popup>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,341 @@
page{
padding-bottom: 120rpx;
}
.tips {
width: 100%;
background: #fff;
padding: 15px;
color: #8d8d8d;
}
.rec {
height: 180rpx;
width: 100%;
background-color: var(--white);
border-radius: 15rpx;
box-sizing: border-box;
}
.rec-all {
width: 100%;
}
.rec-img, .right_icon {
height: 100rpx;
}
.rec-img image {
height: 80rpx;
width: 80rpx;
}
.adds {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #000;
}
.rec-add {
width: 420rpx;
}
.addInfo {
margin-top: 20rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #999;
}
.right_icon image {
width: 15rpx;
height: 33rpx;
}
.app2 {
height: auto;
}
.rec-rem {
height: 113rpx;
width: 100%;
}
.rec-rem {
border-bottom: 2rpx solid #ebebeb;
}
.rec-rem:last-child {
border: 0;
}
.time {
width: 100%;
height: 36rpx;
line-height: 36rpx;
}
.time1 image {
width: 36rpx;
height: 36rpx;
}
.time2 {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #666;
}
.rec-rem input {
width: 100%;
}
.tip {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #999;
text-align: center;
}
/* 弹出层 */
.frame {
width: 100%;
}
.frame_title {
height: 108rpx;
width: 100%;
border-bottom: 2rpx solid #ebebeb;
position: relative;
}
.frame_p {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
height: 108rpx;
line-height: 108rpx;
width: 100%;
text-align: center;
}
.frame_title span {
position: absolute;
right: 30rpx;
top: 41rpx;
width: 26rpx;
height: 26rpx;
}
.frame_title span image {
width: 26rpx;
height: 26rpx;
}
.frame_cen {
display: flex;
height: 704rpx;
width: 100%;
}
.frame_cenl {
flex: 1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background: #f6f6f6;
padding-bottom: 100rpx;
}
.frame_cenr {
flex: 2;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.cenl_row {
height: 116rpx;
width: 100%;
text-align: center;
line-height: 116rpx;
font-family: PingFang-SC-Medium;
font-size: 36rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
}
.cenr_row {
padding: 20rpx 0;
/* height: 100rpx; */
width: 100%;
/* line-height: 100rpx; */
box-sizing: border-box;
border-bottom: 2rpx solid #ebebeb;
display: flex;
}
.frame_img image {
width: 30rpx;
height: 30rpx;
vertical-align: middle;
}
.row_active1 {
color: #2fd152;
background: var(--white);
}
.row_active2 {
color: #2fd152;
}
.frame_time {
color: #ccc;
width: 40%;
display: inline-block;
flex: 1;
padding: 0 10rpx;
}
.black300 {
color: #333;
}
.tecProcess{
width: 100%;
}
.tecProcess image{
width: 100%;
height: 50rpx;
}
.shop_list {
padding: 40rpx 0;
background-color: #fff;
border-radius: 10rpx;
}
.shop_list_row {
height: 100rpx;
padding: 22rpx 0;
margin: 0 30rpx;
border-bottom: 1rpx solid #ebebeb;
box-sizing: initial;
}
.shop_list_row:last-child {
margin-bottom: 0;
}
.shop_list_img image {
width: 100rpx;
height: 100rpx;
}
.text1 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.text2 {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
color: #999;
}
.mon{
padding: 0 20rpx;
}
.mon_p,.mon_p2 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.mon_p2{
color: #f22c21;
}
.mon_span{
font-weight: 500;
font-size: 34rpx;
color: #333;
}
.discount{
font-size: 24rpx;
border: #f22c21 1rpx solid;
color: #f22c21;
padding: 2rpx 5rpx;
box-sizing: border-box;
}
.explain{
font-size: 28rpx;
color: #999999;
}
.text_right_cell2{
display: flex;
align-items: center;
}
/* 支付 */
.shop_pay {
position: fixed;
height: 100rpx;
bottom: 0;
left: 0;
right: 0;
width: 100%;
display: flex;
background-color: #fff;
border-bottom: 2rpx solid #ebebeb;
z-index: 99999;
}
.pay_sub {
width: 260rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background-color: #1dbf53;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #fff;
border-radius: 0;
border: 0;
}
pay_sub::after{
width: 0;
height: 0;
border: 0;
}
.pay_num {
margin-right: 30rpx;
font-weight: 600;
font-family: PingFang-SC-Bold;
font-size: 30rpx;
color: #333;
}
.mon_span {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #ff4838;
}
.mon_span image {
height: 28rpx;
width: 15rpx;
}

View File

@@ -0,0 +1 @@
206c2199-fe18-4380-a69e-87f8b0f0782b

View File

@@ -0,0 +1,75 @@
// user/appointment/paid/paid.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "预约成功", //头部标题
isBack: false,//显示返回
},
// 跳转
goUrl(e) {
let url = e.currentTarget.dataset.url
wx.redirectTo({
url: url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,15 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!--user/wardrobe/wardrobeInfo/wardrobeInfo.wxml-->
<view class="wardrobeInfo">
<view class="wardrobeInfo_suo">
<image src="/static/img/success-icon.png" />
</view>
<view class="wardrobeInfo_tit">预约成功</view>
<view class="wardrobeInfo_sub flex-con1">
<view class="wardrobeInfo_sub_l" data-url="/pages/auth/auth?index=1" bind:tap="goUrl">返回首页</view>
<view class="wardrobeInfo_sub_r" data-url="/user/order/order?orderState=1" bind:tap="goUrl">查看订单</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,49 @@
/* user/appointment/paid/paid.wxss */
page{
background-color: #ffffff !important;
height: 100%;
}
.wardrobeInfo{
width: 660rpx;
margin: 130rpx auto 0;
}
.wardrobeInfo_suo{
display: block;
text-align: center;
}
.wardrobeInfo_suo image{
width: 231rpx;
height: 231rpx;
}
.wardrobeInfo_tit{
margin-top: 70rpx;
font-family: PingFang-SC-Medium;
font-size: 45rpx;
color: #333333;
font-weight: 400;
text-align: center;
}
.wardrobeInfo_tit1{
margin-top: 40rpx;
font-family: PingFang-SC-Regular;
font-size: 32rpx;
text-align: center;
color: #666666;
}
.wardrobeInfo_sub_l,.wardrobeInfo_sub_r{
margin-top: 100rpx;
width: 310rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
border-radius: 45rpx;
border: solid 2rpx #1dbf53;
font-size: 32rpx;
}
.wardrobeInfo_sub_l{
color: #1dbf53;
}
.wardrobeInfo_sub_r{
background-color: #1dbf53;
color: #ffffff;
}

View File

@@ -0,0 +1 @@
72797958-702a-4874-803a-a2da5bd27707

View File

@@ -0,0 +1,120 @@
// user/balance/balance.js
const app = getApp();
const util = app.loadUtils("util")
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "我的余额", //头部标题
isBack: true,//显示返回
current_scroll: 1,//tab选中
cardData: [],//卡列表
userInfo: {},//用户信息
},
// tab切换
handleChangeScroll({ detail }) {
this.setData({
current_scroll: detail.key
});
this.getUserCard()
},
// 获取卡劵列表
async getUserCard() {
let res = await http.http.request2({ url: `${http.api.getCard}`, method: "POST", data: { type: this.data.current_scroll } })
let rel = res.data.data
if (res.data.status == 1) {
rel.map((v, i) => {
rel[i].create_time = v.create_time.slice(0, 10)
})
this.setData({
cardData: rel
})
}
if (rel.length <= 0) {
wx.showToast({
title: '无此会员卡',
icon: 'none',
duration: 2000
})
}
},
// 跳转页面方法
goUrl(e) {
let url = e.currentTarget.dataset.url
let index = this.data.current_scroll
wx.navigateTo({
url: `${url}?index=${index}`
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (options['index']) {
this.setData({
current_scroll: options.index
})
}
this.getUserCard()
app.setWatching('userInfo', (v) => {
this.setData({
userInfo: v
});
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {
"i-tabs": "../../extend/iview/dist/tabs/index",
"i-tab": "../../extend/iview/dist/tab/index"
}
}

View File

@@ -0,0 +1,65 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/balance/balance.wxml -->
<view class="balance">
<!-- <view class="balance-tit flex-con2">
<view>
<view class="balance-tit-p">总金额(元)</view>
<view class="balance-tit-mon">{{userInfo.money}}</view>
</view>
</view> -->
<view class="mt20">
<i-tabs current="{{ current_scroll }}" scroll bindchange="handleChangeScroll">
<i-tab key="1" title="会员卡"></i-tab>
<i-tab key="2" title="礼品卡"></i-tab>
<i-tab key="3" title="团体卡"></i-tab>
<!-- <i-tab key="4" title="充值卡"></i-tab> -->
</i-tabs>
</view>
<view wx:if="{{cardData.length > 0}}" class="mt20 balance-List">
<view class="balance-row mt30" wx:for="{{cardData}}" wx:key>
<view class="balance-row-img">
<image src="{{item.src}}" />
</view>
<view class="balance-row-pa flex-con2">
<view class="dis-flex pd30 w100">
<view class="balance-row-vip nt2">
<!-- <image src="/static/img/icon/vip.png" /> -->
</view>
<view class="flex1 ml10">
<view class="balance-row-p1">
{{item.title}}{{item.discount>=99.99?'':'('+item.discount/10+'折)'}}
</view>
<view wx:if="{{item.is_upgrade == 0}}" class="balance-row-p2 mt10">
余额 ¥{{item.money}}
</view>
<view wx:else class="balance-row-p2 mt10">您还不是伊莎洗衣{{item.title}}VIP</view>
<view wx:if="{{item.is_upgrade == 0}}" class="balance-row-p2 mt5">
发卡时间 {{item.create_time}}
</view>
<view wx:if="{{item.is_upgrade == 2}}" class="balance-row-p2 mt7">
现在购买只需{{item.recharge_money}}元<span wx:if="{{current_scroll==2}}">,并赠送{{item.give_money}}元</span>
</view>
<!-- <view wx:if="{{item.is_upgrade == 0 && item.level < 4 && current_scroll == 1}}" class="balance-row-p2 mt7">
现在升级只需{{item.recharge_money}}元
</view> -->
</view>
<view class="balance-row-sub flex-con6">
<view wx:if="{{item.is_upgrade == 2}}" class="balance-row-sub-p flex-con3 colorAsh" data-url="/user/upgradeCart/upgradeCart?type={{current_scroll}}&openType=1&is_upgrade=2" catchtap="goUrl">
办卡
</view>
<view wx:if="{{item.is_upgrade == 0 && current_scroll !== '3' && item.card_id!=29}}" class="balance-row-sub-p flex-con3" data-url="/user/recharge/recharge" catchtap="goUrl">
充值
</view>
<view wx:if="{{item.is_upgrade == 0 && item.level < 4 && current_scroll == '1'}}" class="balance-row-sub-p flex-con3 colorAsh mr30" data-url="/user/upgradeCart/upgradeCart?type={{current_scroll}}&openType=0&is_upgrade=0&card_upgrade={{item.id}}&card_id={{item.card_id}}" catchtap="goUrl">
升级
</view>
<!-- <view class="balance-row-sub-p colorRed">立即充值</view> -->
</view>
</view>
</view>
</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,116 @@
/* user/balance/balance.wxss */
/* 头部 */
.balance-tit {
width: 750rpx;
height: 210rpx;
padding: 0 30rpx;
background-color: #fff;
border-top: 2rpx solid #ebebeb;
}
.balance-tit-p {
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
color: #999;
}
.balance-tit-mon {
font-family: PingFang-SC-Bold;
font-size: 55rpx;
font-weight: 600;
color: #333;
}
/* 列表 */
.balance-List {
background-color: #fff;
padding: 10rpx 30rpx 30rpx 30rpx;
}
.balance-row {
height: 200rpx;
border-radius: 15rpx;
position: relative;
overflow: hidden;
}
.balance-row-img{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100%;
width: 100%;
z-index: 9;
}
.balance-row-img image{
height: 100%;
width: 100%;
}
.balance-row-pa{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100%;
width: 100%;
z-index: 10;
}
.balance-row-p1 {
font-family: PingFang-SC-Bold;
font-size: 36rpx;
font-weight: 600;
font-stretch: normal;
color: #fff;
}
.balance-row-p2 {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
font-weight: 400;
font-stretch: normal;
color: #fff;
}
.balance-row-vip{
padding-top: 5rpx;
}
.balance-row-vip image {
width: 43rpx;
height: 43rpx;
}
.balance-row-sub {
/* width: 300rpx; */
}
.balance-row-sub-p {
width: 115rpx;
height: 50rpx;
border:solid 2rpx #ffffff;
border-radius: 25rpx;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
}
.colorAsh {
background-color: #ffffff;
color: #666666;
}
/* 修改tabs样式 */
i-tab {
width: 33.33%;
display: inline-block;
}

View File

@@ -0,0 +1 @@
2db76370-bc0e-4770-b102-a39012f7d86f

View File

@@ -0,0 +1,124 @@
// user/cashWithdrawal/cashWithdrawal.js
const app = getApp();
const util = app.loadUtils("util")
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "合伙人收益提现", //头部标题
isBack: true,//显示返回
distribution_money: 0,//可提现金额
},
async withDraw(e) {
let money = parseFloat(e.detail.value.money) || 0
if (money <= 0) {
wx.showToast({
title: '请输入正确的金额',
icon: 'none',
duration: 2000
})
return;
}
if (money < 100) {
wx.showToast({
title: '小于100元不能提现哦!!!',
icon: 'none',
duration: 2000
})
return;
}
wx.showModal({
title: '提现',
content: '提现后不能取消,是否提现?',
success(res) {
if (res.confirm) {
wx.showLoading({
title: '提现中,请稍等!!!',
})
http.http.request2({ url: `${http.api.withDraw}`, method: "POST", data: { total_money: money } })
.then(res => {
wx.hideLoading()
wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
})
setTimeout(() => {
wx.navigateBack({
delta: 2
})
}, 2000)
})
}
}
})
},
// 获取当前可提现金额接口
async getDistributionMoney() {
let res = await http.http.request2({ url: `${http.api.getDistributionMoney}`, method: "POST" })
this.setData({
distribution_money: res.data.data.distribution_money
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getDistributionMoney()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,29 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/cashWithdrawal/cashWithdrawal.wxml -->
<view class="cashWithdrawal">
<form report-submit bindsubmit="withDraw">
<view class="cash_Input pd30 mt20">
<view class="cash_Input_t">提现金额</view>
<view class="dis-flex cash_Input_text mt10">
<view class="cash_Input_m">¥</view>
<view class="cash_Input_money flex1 dis-flex">
<input name="money" class="flex1" type="number" maxlength="6" />
</view>
</view>
<view class="dis-flex mt20">
<view class="flex1 cash_Input_p1">可提现金额:{{distribution_money}}元</view>
<navigator url="/user/withdrawalsRecord/withdrawalsRecord" class="cash_Input_p2">
提现记录
</navigator>
</view>
</view>
<button form-type="submit" class="sub">确认提现</button>
</form>
<view class="cash_tips pd30">
<view>温馨提示:</view>
<view>最低提现金额为100元,提现后收益会自动转入您的微信账户中。</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,52 @@
/* user/cashWithdrawal/cashWithdrawal.wxss */
.cash_Input{
background-color: #ffffff;
padding-top: 36rpx;
padding-bottom: 33rpx;
}
.cash_Input_t{
font-family: PingFang-SC-Medium;
font-size: 32rpx;
letter-spacing: 0px;
color: #000000;
}
.cash_Input_text{
height: 66rpx;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #eaeaea;
box-sizing: initial;
}
.cash_Input_m{
font-family: PingFang-SC-Medium;
font-size: 40rpx;
font-weight: 400;
color: #000000;
}
.cash_Input_money input{
font-family: PingFang-SC-Medium;
font-size: 60rpx;
font-weight: 400;
color: #000000;
height: auto;
}
.cash_Input_p1{
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
.cash_Input_p2{
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
color: #ff4026;
}
.cash_tips{
margin-top: 40rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
line-height: 45rpx;
letter-spacing: 0px;
color: #999999;
}

View File

@@ -0,0 +1 @@
e88ea39f-2958-4198-8834-42cd3f61b1be

View File

@@ -0,0 +1,73 @@
// user/cashWithdrawal/success/success.js
const app = getApp();
const util = app.loadUtils("util")
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "合伙人收益提现", //头部标题
isBack: true,//显示返回
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,12 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!--user/cashWithdrawal/success/success.wxml-->
<view class="success">
<view class="p success_p1 mt100">恭喜,提现成功!</view>
<view class="p success_p2 mt40">余额:0.00元</view>
<view class="sub">确认</view>
<view class="p success_p2 mt40">已成功提现到该账户绑定的微信零钱包</view>
<view class="p success_p2">请注意查看!</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,16 @@
/* user/cashWithdrawal/success/success.wxss */
.success .p{
text-align: center;
}
.success_p1{
font-family: PingFang-SC-Medium;
font-size: 40rpx;
font-weight: 400;
color: #000000;
}
.success_p2{
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: normal;
color: #999999;
}

View File

@@ -0,0 +1 @@
58377994-11dc-4934-8296-7d34c01a2c4e

View File

@@ -0,0 +1,124 @@
// user/couponCard/couponCard.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const util = app.loadUtils("util")
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "使用优惠券", //头部标题
isBack: true,//显示返回
isEnv: true,//红包选中状态
couponList: [],//数据列表
total_price: 0,//订单金额
},
// 不使用红包
async noEnv() {
this.setData({
isEnv: !this.data.isEnv
})
let coupon = {}
await model.storage.setStorage("coupon", coupon)
wx.navigateBack({
})
},
// 选中红包
async selectEnv(e) {
let item = e.currentTarget.dataset.item
let coupon = {
id: item.id,
price: item.coupon_price
}
await model.storage.setStorage("coupon", coupon)
wx.navigateBack({
})
},
// 显示隐藏内容
isShow(e) {
let index = e.currentTarget.dataset.index
let list = this.data.couponList
list[index].show = !list[index].show
this.setData({
couponList: list
})
},
// 获取可用优惠券
async getCoupon() {
let res = await http.http.request2({ url: `${http.api.userCoupon}`, method: "POST", data: { total_price: this.data.total_price, status: 1 } })
if (res.data.data.length > 0) {
res.data.data.map((v, i) => {
res.data.data[i].show = true
res.data.data[i].end_time = util.formatTime(v.end_time, 'Y-M-D h:m:s')
})
this.setData({
couponList: res.data.data
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
total_price:options.price
})
this.getCoupon()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,7 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
"wux-cell": "../../extend/wux/dist/cell/index"
}
}

View File

@@ -0,0 +1,42 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/couponCard/couponCard.wxml -->
<view class="couponCard">
<view class="no_coupon mt20">
<wux-cell-group>
<wux-cell bind:tap="noEnv" title="不使用红包" rightUrl="{{ isEnv ? '/static/img/icon/wxPay1.png' : '/static/img/icon/wxPay2.png' }}"></wux-cell>
</wux-cell-group>
</view>
<view class="coupon">
<view class="coupon_list mt30" wx:for="{{couponList}}" wx:key="{{index}}" data-item="{{item}}" bind:tap="selectEnv">
<view class="coupon_list_l">
<view>
¥
<span>{{item.coupon_price}}</span>
</view>
</view>
<view class="coupon_list_r">
<view>
<view class="coupon_list_r_top">
{{item.coupon_title}}
<!-- <span class="ml40">即将过期</span> -->
</view>
<view class="coupon_list_r_p mt10">满{{item.use_min_price}}元可用</view>
<view class="coupon_list_r_p">有效期至:{{item.end_time}}</view>
<view class="coupon_list_r_p mt10">线上、线下洗衣通用</view>
<!-- <view class="coupon_list_r_p {{ item.show ? 'clamp1' : '' }}" data-index="{{index}}" bind:tap="isShow">
上装、下装、皮质类、箱包类、下装、皮质类、箱包类、其他
</view> -->
</view>
</view>
<view class="coupon_list_b">
<!-- <span data-index="{{index}}" bind:tap="isShow">
<image class="{{ item.show ? '' : 'rotate' }}" src="/static/img/icon/qwfgqfqf.png" />
</span> -->
</view>
</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,65 @@
/* user/couponCard/couponCard.wxss */
.coupon{
padding: 0 30rpx;
}
.coupon_list{
background: #ffffff;
padding: 50rpx 0;
border-left: 4rpx solid #1dbf53;
display: -webkit-flex;
display: flex;
}
.coupon_list_l{
display: inline-block;
padding: 0 34rpx;
font-size: 32rpx;
color: #1dbf53;
margin-top: 40rpx;
}
.coupon_list_l span{
font-size: 60rpx;
}
.coupon_list_r{
display: inline-block;
flex: 1;
/* padding-right: 55rpx; */
}
.coupon_list_b{
height: 100%;
width: 80rpx;
position: relative;
}
.coupon_list_b span{
position: absolute;
top: 173rpx;
left: 0;
}
.coupon_list_b span image{
width: 21px;
height: 10px;
}
.coupon_list_r_top{
font-size: 32rpx;
color: #333333;
}
.coupon_list_r_top span{
width: 105rpx;
height: 32rpx;
background-color: #fff1f0;
border-radius: 5rpx;
font-size: 20rpx;
color: #ff4026;
text-align: center;
line-height: 32rpx;
display: inline-block;
}
.coupon_list_r_p{
font-size: 24rpx;
line-height: 36rpx;
color: #999999;
}
.rotate{
transform: rotate(180deg);
}

View File

@@ -0,0 +1 @@
657b5295-fa97-441b-a4f5-2e98f1e3f2d4

View File

@@ -0,0 +1,139 @@
// user/couponExchange/couponExchange.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const util = app.loadUtils("util")
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "使用优惠券", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
page: 1,//当前页
isPage: false,//数据不足10条时变为true
couponList: [],//优惠券列表
isTips: false,//领取优惠券弹窗
changeCoupon: {},//当前选择并换的优惠券信息
userInfo: {},//个人信息
},
// 获取用户信息
userInfo() {
this.setData({
userInfo: app.globalData.userInfo
})
},
// 积分兑换卡券列表
async exchangeCList() {
let data = {
page: this.data.page,
limit: 10
}
let res = await http.http.request1({ url: `${http.api.exchangeCList}`, method: 'POST', data: data })
let rel = res.data.data.list
let couponList = this.data.couponList
if (rel.length < 10) {
this.setData({
isPage: true
})
}
this.setData({
couponList: [...couponList, ...rel],
isLoading: false
})
},
// 兑换
async confirmSub() {
let res = await http.http.request2({ url: `${http.api.jfExchange}`, method: 'POST', data: { card_id: this.data.changeCoupon.id } })
if (res.data.status == 1) {
this.closeTips1()
wx.showToast({
title: '兑换成功',
icon: 'none',
duration: 2000
})
}
},
// 打开弹窗
openTips1(e) {
let item = e.currentTarget.dataset.item
this.setData({
isTips: true,
changeCoupon: item
})
},
// 关闭弹窗
closeTips1() {
this.setData({
isTips: false
})
},
goUrl(e) {
let url = e.currentTarget.dataset.url
wx.navigateTo({
url: url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.exchangeCList()
this.userInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (!this.data.isPage) {
this.exchangeCList()
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,69 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/couponExchange/couponExchange.wxml -->
<view class="couponExchange">
<view class="coup_bac"></view>
<view class="coup_record flex-con2">
<image class="icon_jf" src="/static/img/icon/jf.png" />
<view class="coup_record_p1 ml10">我的积分</view>
<view class="coup_record_p2 ml20">{{userInfo.integral}}</view>
<view class="flex1 coup_record_p3 flex-con5" data-url="/user/parIncome/parIncome?index=1" bind:tap="goUrl">
<span>积分记录</span>
</view>
</view>
<view class="coup_List">
<view class="coup_row">
<view class="coup_tit">积分换券</view>
<view wx:if="{{couponList.length > 0}}" class="list_row" wx:for="{{couponList}}" wx:key>
<view class="coup_list_row mt30">
<image src="/static/img/jf-list.png" />
<view class="coup_list_row_a flex-con2">
<view class="coup_list_row_mon">
<view class="mon_span">
¥
<span>{{item.coupon_price}}</span>
</view>
<view>门槛:{{item.use_min_price}}</view>
</view>
<view class="flex1">
<view class="cuop_p1 mb10">{{item.title}}</view>
<view class="cuop_p2 mb5">{{item.jf}}积分兑换</view>
<view class="cuop_p2">2019-08-01 至 2019-08-31</view>
</view>
<button class="cuop_btn" data-item="{{item}}" catchtap="openTips1">
立即兑换
</button>
</view>
</view>
</view>
<view wx:if="{{couponList.length <= 0}}" class="empty flex-con3">
<view>
<image class="empty_img" src="/static/img/icon/order-konw-icon.png" />
<view class="mt20">暂无内容</view>
</view>
</view>
</view>
</view>
</view>
<!-- 领取优惠券弹窗 -->
<!-- 反洗 -->
<view wx:if="{{isTips}}" class="backwash_tips flex-con3 tips">
<view>
<view class="tips_cen">
<view class="tips_cen_tit">
本次兑换将消耗
<span>{{changeCoupon.jf}}</span>
积分
</view>
<view class="mt20 tips_cen_tit1">确认后积分将无法返还</view>
<view class="tips_cen_sub" catchtap="confirmSub">立即兑换</view>
</view>
<view class="tips_img" catchtap="closeTips1">
<image src="/static/img/icon/colse_tips.png" />
</view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,213 @@
/* user/couponExchange/couponExchange.wxss */
.couponExchange {
position: relative;
width: 100%;
padding-bottom: 20rpx;
}
.coup_bac {
width: 100%;
height: 275rpx;
background-color: #343434;
position: absolute;
z-index: -1;
}
.coup_record {
height: 184rpx;
padding: 0 24rpx;
}
.icon_jf {
width: 40rpx;
height: 40rpx;
display: inline-block;
}
.coup_record_p1 {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: 400;
font-stretch: normal;
color: #fff;
}
.coup_record_p2 {
font-family: PingFang-SC-Bold;
font-size: 45rpx;
font-weight: 600;
font-stretch: normal;
color: #fff;
}
.coup_record_p3 {
text-align: right;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
font-stretch: normal;
color: #fdaf44;
height: 100%;
}
/* 列表样式 */
.coup_List {
width: 100%;
padding: 0 24rpx;
}
.coup_row {
background-color: #fff;
border-radius: 30rpx;
padding: 38rpx 25rpx;
}
.coup_tit {
font-family: PingFang-SC-Bold;
font-size: 36rpx;
font-weight: 500;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
}
.coup_list_row {
position: relative;
height: 183rpx;
}
.coup_list_row image {
position: absolute;
top: 0;
left: 0;
z-index: 1;
height: 100%;
width: 100%;
}
.coup_list_row_a {
position: absolute;
top: 0;
left: 0;
z-index: 2;
height: 100%;
width: 100%;
}
.coup_list_row_mon {
font-family: PingFang-SC-Medium;
font-size: 18rpx;
font-weight: 400;
font-stretch: normal;
color: #fff;
width: 180rpx;
text-align: center;
}
.mon_span {
font-size: 25rpx;
}
.mon_span span {
font-size: 35rpx;
word-break: break-all;
}
.cuop_p1 {
font-family: PingFang-SC-Bold;
font-size: 30rpx;
font-weight: 500;
font-stretch: normal;
color: #fff;
}
.cuop_p2 {
font-family: PingFang-SC-Medium;
font-size: 20rpx;
font-weight: 400;
font-stretch: normal;
color: #fff;
}
.cuop_btn {
width: 160rpx;
height: 65rpx;
line-height: 65rpx;
background-color: #fff;
border-radius: 33rpx;
margin-right: 20rpx;
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
font-stretch: normal;
color: #1dbf69;
padding: 0;
}
/* 弹出层 */
.tips {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
}
.tips_cen {
width: 600rpx;
background-color: #fff;
border-radius: 10rpx;
padding-top: 58rpx;
padding-bottom: 50rpx;
}
.tips_cen_tit {
text-align: center;
font-family: PingFang-SC-Bold;
font-size: 36rpx;
font-weight: 600;
font-stretch: normal;
letter-spacing: 0px;
color: #000000;
}
.tips_cen_tit span {
color: #fdaf44;
}
.tips_cen_tit1 {
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 30rpx;
font-weight: 400;
font-stretch: normal;
letter-spacing: 0px;
color: #999999;
}
.tips_cen_sub {
margin: 45rpx auto 0;
width: 550rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background-color: #36d96c;
border-radius: 40rpx;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #fff;
}
.tips_img {
margin-top: 50rpx;
text-align: center;
}
.tips_img image {
width: 69rpx;
height: 69rpx;
}

View File

@@ -0,0 +1 @@
264d5db4-afad-4c84-864f-49bd8cfa69be

View File

@@ -0,0 +1,121 @@
// user/couponList/couponList.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
const util = app.loadUtils("util")
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "优惠券", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
current: '1',//当前所在的标签的 key 值
couponList: [],//数据列表
},
// tab选中事件
handleChange({ detail }) {
this.setData({
current: detail.key,
couponList: []
});
this.getCouponList()
},
// 显示隐藏内容
isShow(e) {
let index = e.currentTarget.dataset.index
let list = this.data.couponList
list[index].show = !list[index].show
this.setData({
couponList: list
})
},
// 获取优惠券列表
async getCouponList() {
let res = await http.http.request2({ url: `${http.api.userCoupon}`, method: "POST", data: { status: this.data.current } })
let rel = res.data.data
if (rel.length > 0) {
rel.map((v, i) => {
rel[i].end_time = util.formatTime(v.end_time, 'Y-M-D h:m:s')
})
this.setData({
couponList: rel,
isLoading: false
})
} else {
this.setData({
couponList: [],
isLoading: false
})
}
},
// 跳转
goUrl(e) {
// let url = e.currentTarget.dataset.url
if (app.globalData.userInfo.group_type == 0) {
wx.navigateTo({
url: '/pages/laundry/laundry'
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getCouponList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,7 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"i-tabs": "../../extend/iview/dist/tabs/index",
"i-tab": "../../extend/iview/dist/tab/index"
}
}

View File

@@ -0,0 +1,48 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/couponList/couponList.wxml -->
<view class="couponList">
<view class="order_tab" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
<i-tabs current="{{ current }}" color="#1dbf45" bindchange="handleChange">
<i-tab key="1" title="未使用"></i-tab>
<i-tab key="2" title="已使用"></i-tab>
<i-tab key="3" title="已过期"></i-tab>
</i-tabs>
</view>
<view class="coupon_con">
<view class="coupon" wx:if="{{couponList.length > 0}}">
<view wx:for="{{couponList}}" wx:key="{{index}}" class="coupon_list mt30 {{ item.status != 1 ? 'coupon_list2' : '' }}" bind:tap="goUrl">
<view class="coupon_list_l">
<view>
¥
<span>{{item.coupon_price}}</span>
</view>
</view>
<view class="coupon_list_r">
<view>
<view class="coupon_list_r_top">
{{item.coupon_title}}
<!-- <span class="ml40">即将过期</span> -->
</view>
<view class="coupon_list_r_p mt10">满{{item.use_min_price}}元可用</view>
<view class="coupon_list_r_p">有效期至:{{item.end_time}}</view>
<view class="coupon_list_r_p mt10">{{item.des}}</view>
</view>
</view>
<view wx:if="{{item.status == 2}}" class="gqimg">
<image src="/static/img/yhjysy.png" />
</view>
</view>
</view>
<view class="empty flex-con3" wx:elif="{{ couponList.length <= 0 }}">
<view>
<image class="empty_img" src="/static/img/icon/yhjk.png" />
<view>还没有优惠券哦</view>
</view>
</view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,127 @@
/* user/couponList/couponList.wxss */
.order_tab {
position: fixed;
width: 100%;
height: auto;
top: 0;
z-index: 9999;
}
.coupon_con {
margin-top: 54px;
}
.coupon {
padding: 0 30rpx;
}
.coupon_list {
background: #fff;
padding: 50rpx 0;
border-left: 8rpx solid #1dbf53;
display: -webkit-flex;
display: flex;
position: relative;
overflow: hidden;
}
.coupon_list_l {
display: inline-block;
padding: 0 34rpx;
font-size: 32rpx;
color: #1dbf53;
margin-top: 40rpx;
}
.coupon_list2 {
border-left: 4rpx solid #999;
}
.coupon_list2 span, .coupon_list2 view {
color: #999;
}
.coupon_list2 .gqimg {
position: absolute;
right: -30rpx;
top: -30rpx;
width: 159rpx;
height: 159rpx;
}
.gqimg image {
height: 100%;
width: 100%;
}
.coupon_list_l span {
font-size: 60rpx;
}
.coupon_list_r {
display: inline-block;
flex: 1;
/* padding-right: 55rpx; */
}
.coupon_list_b {
height: 100%;
width: 80rpx;
position: relative;
}
.coupon_list_b span {
position: absolute;
top: 173rpx;
left: 0;
}
.coupon_list_b span image {
width: 21rpx;
height: 11rpx;
}
.coupon_list_r_top {
font-size: 32rpx;
color: #333;
font-weight: 600;
}
.coupon_list_r_top span {
width: 105rpx;
height: 32rpx;
background-color: #fff1f0;
border-radius: 5rpx;
font-size: 20rpx;
color: #ff4026;
text-align: center;
line-height: 32rpx;
display: inline-block;
}
.coupon_list_r_p {
font-size: 24rpx;
line-height: 36rpx;
color: #999;
}
.rotate {
transform: rotate(180deg);
}
.empty {
height: 600rpx;
width: 100%;
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
font-stretch: normal;
color: #999;
}
.empty_img {
width: 116rpx;
height: 83rpx;
}

View File

@@ -0,0 +1 @@
e37f9b16-0deb-4f61-9e8d-eff058f60878

View File

@@ -0,0 +1,113 @@
// user/feedback/feedback.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "问题反馈", //头部标题
isBack: true,//显示返回
text: "",//输入的文字
},
//
feedText(e) {
this.setData({
text: e.detail.value
})
},
questionBack() {
let that = this
if (that.data.text.length <= 0) {
wx.showToast({
title: '请填写您的问题',
icon: 'none',
duration: 1000
})
return
}
wx.showModal({
title: '问题反馈',
content: '对于您的反馈我们一定尽快处理',
cancelText: '取消',
confirmText: '提交',
success(res) {
if (res.confirm) {
http.http.request2({ url: `${http.api.questionBack}`, method: "POST", data: { remarks: that.data.text } })
.then(res => {
if (res.data.status == 1) {
that.setData({
text: ''
})
wx.showToast({
title: '提交成功',
icon: 'none',
duration: 2000
})
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,4 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {}
}

View File

@@ -0,0 +1,12 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/feedback/feedback.wxml -->
<view class="feedback">
<view class="feed_text mt20">
<textarea bindinput="feedText" maxlength="500" value="{{text}}" placeholder="请输入10个字以上您想要反馈的问题"></textarea>
<span>{{text.length}}/500</span>
</view>
<view class="feed_sub" bind:tap="questionBack">提交反馈</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,36 @@
/* user/feedback/feedback.wxss */
.feed_text{
background: #ffffff;
height: 355rpx;
padding: 32rpx 30rpx 45rpx 30rpx;
position: relative;
}
.feed_text textarea{
height: 100%;
width: 100%;
}
.feed_text span{
position: absolute;
bottom: 10rpx;
right: 25rpx;
font-size: 32rpx;
color: #cccccc;
}
.feed_sub{
width: 690rpx;
height: 100rpx;
background-image: linear-gradient(
#1dbf53,
#1dbf53),
linear-gradient(
#2fd152,
#2fd152);
background-blend-mode: normal,
normal;
border-radius: 10rpx;
font-size: 38rpx;
text-align: center;
line-height: 100rpx;
margin: 50rpx auto 0;
color: #ffffff;
}

View File

@@ -0,0 +1 @@
3837c925-e0a9-4816-a9a6-513d45e87f68

View File

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

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--user/groupShopList/groupShopList.wxml-->
<text>user/groupShopList/groupShopList.wxml</text>

View File

@@ -0,0 +1 @@
/* user/groupShopList/groupShopList.wxss */

View File

@@ -0,0 +1 @@
13b85484-75ea-447f-bac1-3a1dea44011c

View File

@@ -0,0 +1,502 @@
// user/order/order.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
import { $wuxDialog, $wuxToast } from '../../extend/wux/dist/index';
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "我的订单", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
current: '',//当前所在的标签的 key 值
orderData: [],//订单列表数据
page: 1,//当前列表第几页
isState: true,//如果没数据了false
isTips: false,//增减衣服数量弹窗
isRemarks: false,//备注弹窗
changeCount: {},//增减衣物数量时当前选中的衣物
userInfo: {},//个人信息
ShowSupplement: false, // 是否显示补款弹窗
SupplementClickItem: {}, // 保存用户点击列表中的某个对象
defaultPayType: 2, // 支付方式默认显示 1 会员卡, 2 微信
defaultCard: 0, // 存放当前用户选中的会员卡数值下标
cardList: [] // 存放会员卡
},
// 支付方式被选择点击事件
PayTypeChange(e) {
this.setData({ defaultPayType: e.detail.value })
},
// 会员卡列表被点击选择
CardTypeChange(e) {
this.setData({ defaultCard: e.detail.value })
},
// 点击弹窗的 确定 按钮进行补款时候触发
async submitSupplement() {
console.log("支付方式: ", this.data.defaultPayType);
console.log("订单id: ", this.data.SupplementClickItem.id);
console.log("补款金额: ", this.data.SupplementClickItem.extra_money);
console.log("会员卡id: ", this.data.cardList[this.data.defaultCard].id);
let data = {}
// 如果为微信支付
if (this.data.defaultPayType == 2) {
data = {
pay_type: this.data.defaultPayType,
order_id: this.data.SupplementClickItem.id,
extra_money: this.data.SupplementClickItem.extra_money,
};
// 如果为会员卡支付
} else {
data = {
pay_type: this.data.defaultPayType,
order_id: this.data.SupplementClickItem.id,
extra_money: this.data.SupplementClickItem.extra_money,
id: this.data.cardList[this.data.defaultCard].id
};
}
let submitStatus = await http.http.request2({ url: http.api.latePay, method: "POST", data: data });
// 如果为微信支付
if (this.data.defaultPayType == 2) {
this.wxPay(submitStatus)
// 会员卡支付
} else {
this.setData({
ShowSupplement: false
})
// 重置某些值
this.setData({
page: 1,
orderData: []
});
// 更新列表
this.orderList()
}
},
// 补款按钮被点击处理事件
async Supplement(e) {
wx.showLoading({ title: '加载中..' })
// 请求所有会员卡分类的数据
let card_1 = await http.http.request2({ url: `${http.api.userCard}/1`, method: "POST", data: { kind: '' } })
let card_2 = await http.http.request2({ url: `${http.api.userCard}/2`, method: "POST", data: { kind: '' } })
let card_3 = await http.http.request2({ url: `${http.api.userCard}/3`, method: "POST", data: { kind: '' } })
// 保存会员卡数据
this.setData({
cardList: [...card_1.data.data, ...card_2.data.data, ...card_3.data.data ]
});
// 保存点击的对象
this.setData({ SupplementClickItem: e.currentTarget.dataset.items });
wx.hideLoading();
// 显示弹窗
this.setData({ ShowSupplement: true });
},
// 微信支付
wxPay(order) {
let that = this;
wx.requestPayment({
timeStamp: order.data.data.timeStamp,
nonceStr: order.data.data.nonceStr,
package: order.data.data.package,
signType: 'md5',
paySign: order.data.data.paySign,
success: res => {
if (res.errMsg == "requestPayment:ok") {
wx.showToast({
title: '支付成功',
icon: 'none',
duration: 2000,
success: () => {
that.setData({
ShowSupplement: false
})
// 重置某些值
that.setData({
page: 1,
orderData: []
})
// 更新列表
that.orderList()
}
});
}
},
fail(res) {
wx.showToast({
title: '取消支付',
icon: 'none',
duration: 1000
})
}
})
},
// 关闭弹窗
CloseViewInfo() {
this.setData({
ShowSupplement: false
})
},
// tab选中事件
handleChange({ detail }) {
this.setData({
current: detail.key,
orderData: [],
page: 1
});
this.orderList()
},
// 打开订单详情
openOrder(e) {
console.log("isopen: ", e.currentTarget.dataset.isopen)
wx.navigateTo({
url: `/user/orderInfo/orderInfo?id=${e.currentTarget.dataset.id}&isopen=${e.currentTarget.dataset.isopen}`
})
},
// 申请退款
refund(event) {
var that = this;
$wuxDialog().prompt({
resetOnClose: true,
title: '退款',
fieldtype: 'text',
placeholder: '输入退款金额',
maxlength: 8,
onConfirm: async function(e, response) {
let res = await http.http.request2({
url: `${http.api.refund}`, method: "POST", data: {
id: event.currentTarget.dataset.id,
refund_fee: response
}
});
if (res.data.status == 1) {
console.log("res: ", res.data.msg)
$wuxToast().show({
type: 'success',
duration: 1500,
color: '#fff',
text: '申请成功,3个工作日内退款',
success: () => {
// 重置某些值
that.setData({
page: 1,
orderData: []
})
// 更新列表
that.orderList()
}
});
}
},
})
},
//取消订单的方法
cancelOrder(e) {
let id = e.currentTarget.dataset.id
var that = this
wx.showModal({
title: '取消订单',
content: '点击确定取消订单',
confirmText: "确认",
cancelText: "取消",
success: (res) => {
if (res.confirm) {
http.http.request2({ url: `${http.api.cancelOrder}`, method: "POST", data: { order_id: id } })
.then(rel => {
if (rel.data.status == 1) {
model.msg.dataMsg({
content: "取消成功",
type: "success"
})
that.setData({
page: 1,
orderData: []
})
that.orderList()
}
})
}
}
})
},
// 订单列表
async orderList() {
wx.showLoading({
title: '加载中',
})
let data = {
status: parseInt(this.data.current),
page: this.data.page,
limit: 5
}
let res = await http.http.request2({ url: `${http.api.orderList}`, method: "POST", data: data })
if (res.data.data.list.length < 5) {
this.setData({
isState: false
})
}
let orderData = [...this.data.orderData, ...res.data.data.list]
this.setData({
orderData: orderData,
isLoading: false
})
wx.hideLoading()
// 请求完列表页变为false防止重复刷新
app.globalData.isOrderList = false
},
// 获取用户会员状态
async memberState() {
let res = await model.storage.getSetting("userInfo")
this.setData({
pageTitle: res.cupboard_num != -1 ? "我的衣柜订单" : "我的洗衣单",
userInfo: res
})
},
// 显示增减衣物
openTips(e) {
let type = e.currentTarget.dataset.type
let item = e.currentTarget.dataset.item
if (type == "num") {
this.setData({
isTips: true,
changeCount: item
})
} else if (type == "remarks") {
this.setData({
isRemarks: true
})
}
},
// 关闭增减衣物
closeTips(e) {
let type = e.currentTarget.dataset.type
if (type == "num") {
this.setData({
isTips: false,
changeCount: {}
})
} else if (type == "remarks") {
this.setData({
isRemarks: false
})
}
},
// 增加衣物数量
add() {
let changeCount = this.data.changeCount
++changeCount.total_count
this.setData({
changeCount: changeCount
})
},
// 减少衣物数量
reduce() {
let changeCount = this.data.changeCount
--changeCount.total_count
this.setData({
changeCount: changeCount
})
},
// 备注
remarksInput(e) {
let val = e.detail.value
this.setData({
"changeCount.remarks": val
})
},
// 开箱取衣
openCase(e) {
let that = this
let id = e.currentTarget.dataset.id
let data = {
order_id: id,
lat: "",
lng: ""
}
wx.showModal({
title: '确认打开智能衣柜?',
content: '为避免衣物遗失,请在洗衣柜附近打开衣柜!',
confirmText: '确认',
cancelText: '取消',
success(res) {
if (res.confirm) {
wx.getLocation({
type: 'gcj02',
success(res) {
data.lat = res.latitude
data.lng = res.longitude
wx.showLoading({
title: '开柜中',
})
http.http.request2({ url: `${http.api.openCupboard}`, method: "POST", data: data })
.then(res => {
if (res.data.status == 1) {
wx.hideLoading()
wx.showToast({
title: '开柜成功',
icon: 'none',
duration: 1000
})
// 重置某些值
that.setData({
page: 1,
orderData: []
})
// 更新列表
that.orderList()
}
})
}
})
}
}
})
},
// 洗衣柜增减衣物接口
chCount() {
let that = this
let changeCount = this.data.changeCount
let data = {
order_id: changeCount.id,
count: changeCount.total_count,
remarks: changeCount.remarks
}
wx.showModal({
title: '确认打开智能衣柜?',
content: '为避免衣物遗失,请在洗衣柜附近打开衣柜!',
confirmText: '确认',
cancelText: '取消',
success(res) {
if (res.confirm) {
http.http.request2({ url: `${http.api.changeCount}`, method: "POST", data: data })
.then(res => {
// 重置某些值
that.setData({
page: 1,
orderData: []
})
// 更新列表
that.orderList()
that.setData({
isTips: false
})
})
}
}
})
},
// 确认收货
receivingGoods(e) {
let that = this
let id = e.detail.target.dataset.id
let formId = e.detail.formId
wx.showModal({
title: '确认收货',
content: '请检查是否有缺失,再点击确认收货!',
confirmText: '确认',
cancelText: '取消',
success(res) {
if (res.confirm) {
http.http.request2({ url: `${http.api.receivOrder}`, method: "POST", data: { order_id: id, form_id: formId } })
.then(res => {
// 重置某些值
that.setData({
page: 1,
orderData: []
})
// 更新列表
that.orderList()
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this
// 获取页面参数显示对应tab
that.setData({
current: options.orderState || '1'
})
this.orderList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this
this.memberState()
app.setWatching('isOrderList', (v) => {
if (v) {
that.setData({
orderData: [],
page: 1
})
that.orderList()
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (this.data.isState) {
this.setData({
page: ++this.data.page
})
this.orderList()
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,15 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"i-tabs": "../../extend/iview/dist/tabs/index",
"i-tab": "../../extend/iview/dist/tab/index",
"wux-refresher": "../../extend/wux/dist/refresher/index",
"wux-dialog": "../../extend/wux/dist/dialog/index",
"wux-toast": "../../extend/wux/dist/toast/index",
"wux-button": "../../extend/wux/dist/button/index",
"wux-popup": "../../extend/wux/dist/popup/index",
"wux-input": "../../extend/wux/dist/input/index",
"wux-radio-group": "../../extend/wux/dist/radio-group/index",
"wux-radio": "../../extend/wux/dist/radio/index"
}
}

View File

@@ -0,0 +1,156 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<wux-dialog id="wux-dialog" />
<wux-dialog id="wux-dialog--alert" />
<wux-toast id="wux-toast" />
<wux-popup closable visible="{{ ShowSupplement }}" bind:close="CloseViewInfo">
<view class="default_money">
<div class="left_t">补款金额</div>
<view class="right_m">{{ SupplementClickItem.extra_money || 0 }}元</view>
</view>
<view class="default_money">
<div class="left_t">补款原因</div>
<view class="right_m">{{ SupplementClickItem.extra_reason || '无'}}</view>
</view>
<wux-radio-group title="支付方式" name="b" value="{{ defaultPayType }}" bind:change="PayTypeChange">
<wux-radio title="微信" value="2" />
<wux-radio title="会员卡" value="1" />
</wux-radio-group>
<wux-radio-group wx:if="{{ defaultPayType == 1 }}" title="会员卡选择" name="b" value="{{ defaultCard }}" bind:change="CardTypeChange">
<scroll-view scroll-y="true" style="height: 200rpx;" scroll-top="{{0}}">
<wux-radio wx:for="{{ cardList }}" wx:key="id" title="{{ item.title }}-{{ item.discount / 10 }}折-{{item.money}}元" value="{{ index }}" />
</scroll-view>
</wux-radio-group>
<view slot="footer" class="popup__button" bindtap="submitSupplement">确定</view>
</wux-popup>
<view class="order">
<view class="order_tab" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
<i-tabs current="{{ current }}" color="#1dbf45" bindchange="handleChange">
<i-tab key="1" title="全部"></i-tab>
<i-tab key="2" title="服务中"></i-tab>
<i-tab key="3" title="已完成"></i-tab>
</i-tabs>
</view>
<view wx:if="{{orderData.length>0}}" class="order_list">
<view class="order_row mt20" wx:for="{{orderData}}" wx:key="{{index}}">
<view class="order_title">
<view class="order_icon">
<image src="/static/img/icon/order-3_03.png" />
</view>
<view class="order_num">订单号:{{item.order_num}}</view>
<view class="order_state">{{item.status}}</view>
</view>
<view data-isopen="{{ ( (item.pay_status == 1 && (item.type == 1 || item.type == 2 || item.type == 3 )) || (item.logic_type == 3 && item.type == 4 && item.pay_status == 1)) ? '1':'0' }}" class="order_info flex-con2" data-id="{{item.id}}" catchtap="openOrder">
<view>
<view class="info_p">
衣物数量:{{item.total_count <= 0 ? '待录入' : item.total_count}}
</view>
<view class="info_p mt10">
订单金额:{{item.realPrice == '0.00' ? '待统计' : '¥'+item.realPrice}}
</view>
<view class="info_p mt10">下单时间:{{item.create_time}}</view>
</view>
</view>
<view class="order_sub flex-con2">
<view class="openInfo ml20" data-id="{{item.id}}" wx:if="{{item.type == 9 && item.shop_id == 2}}" catchtap="openCase">
开柜取衣
</view>
<view class="openInfo ml20" data-id="{{item.id}}" wx:if="{{item.type == 10 && item.shop_id == 2}}" catchtap="openCase">
开柜取衣
</view>
<view class="openInfo ml20" data-id="{{item.id}}" wx:if="{{item.type == 5}}" data-id="{{item.id}}" catchtap="openOrder">
去支付
</view>
<view data-type="num" catchtap="openTips" class="openInfo ml20" data-id="{{item.id}}" data-item="{{item}}" wx:if="{{(item.type == 3 || item.type == 1) && item.shop_id == 2}}">
增减衣物数量
</view>
<view class="cancel ml20" data-id="{{item.id}}" data-showextra="{{ (item.pay_status == 2 || (item.logic_type == 3 && item.type == 4 && item.pay_status == 2)) ? 'true': 'false' }}" catchtap="openOrder">查看详情</view>
<view wx:if="{{ item.extra_status == 2 }}" class="cancel ml20" data-id="{{item.id}}" data-items="{{ item }}" catchtap="Supplement">
补款
</view>
<view wx:if="{{ item.extra_status == 3 }}" class="cancel ml20">
已补款
</view>
<view data-id="{{item.id}}" wx:if="{{ (item.pay_status == 1 && (item.type == 1 || item.type == 2 || item.type == 3 )) || (item.logic_type == 3 && item.type == 4 && item.pay_status == 1) }}" class="cancel ml20" data-id="{{item.id}}" catchtap="refund">
申请退款
</view>
<view wx:if="{{ item.pay_status == 2 || (item.logic_type == 3 && item.type == 4 && item.pay_status == 2) }}" data-id="{{item.id}}" class="cancel" catchtap="cancelOrder">
取消订单
</view>
<form report-submit bindsubmit="receivingGoods">
<button wx:if="{{ item.type == 10 && item.shop_id == 1 }}" class="openInfo ml20" data-id="{{item.id}}" form-type="submit">
确认收货
</button>
</form>
</view>
</view>
</view>
<view wx:elif="{{orderData.length<=0}}" class="empty flex-con3">
<view>
<image class="empty_img" src="/static/img/icon/order-konw-icon.png" />
<view class="mt20">暂无内容</view>
</view>
</view>
</view>
<!-- 增减衣物 -->
<view wx:if="{{isTips}}" class="backwash_tips flex-con3 tips">
<view>
<view class="tips_cen">
<view class="tips_cen_tit">本次洗护数量</view>
<view class="flex-con3 mt30">
<view class="tips_cen_num flex-con3">
<view class="num_img" catchtap="reduce">
<image src="/static/img/icon/j1.png" />
</view>
<view class="num_text">{{changeCount.total_count}}</view>
<view class="num_img" catchtap="add">
<image src="/static/img/icon/j2.png" />
</view>
</view>
</view>
<view data-type="remarks" class="tips_remarks" catchtap="openTips">
<view class="flex1 clamp1">{{changeCount.remarks}}</view>
<view class="remarks_xiu">修改</view>
</view>
<view class="tips_cen_sub" catchtap="chCount">提交并打开衣柜</view>
<view class="mt20 tips_ts">提示:请在洗衣柜附近开柜!</view>
</view>
<view class="tips_img" data-type="num" catchtap="closeTips">
<image src="/static/img/icon/colse_tips.png" />
</view>
</view>
</view>
<!-- 修改备注 -->
<view wx:if="{{isRemarks}}" class="tipsRemarks flex-con3 tips">
<view>
<view class="tips_cen">
<view class="tips_cen_tit">洗护备注</view>
<view class="flex-con3 mt30">
<view class="tips_cen_text">
<textarea maxlength="50" placeholder="添加备注:如洗护要求、衣物特殊污渍等" bindinput="remarksInput" value="{{changeCount.remarks}}"></textarea>
<span class="tips_text_span">{{changeCount.remarks.length}}/50个字</span>
</view>
</view>
<view class="tips_cen_sub" data-type="remarks" catchtap="closeTips">完成</view>
</view>
<view data-type="remarks" class="tips_img" catchtap="closeTips">
<image src="/static/img/icon/colse_tips.png" />
</view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,228 @@
/* user/order/order.wxss */
.default_money {
display: flex;
justify-content: space-between;
align-items: center;
height: 100rpx;
}
.lable {
flex-grow: 1;
}
.wux-cell {
padding: 25rpx 0 !important;
}
.wux-cell:after {
border-bottom: none !important;
background: none !important;
}
.order_tab{
position: fixed;
width: 100%;
height: auto;
top: 0;
z-index: 998;
}
.popup__button {
display: block;
flex: 1;
color: #33cd5f;
position: relative;
}
.order_list{
margin-top: 52px;
}
.order_row{
width: 100%;
background-color: #ffffff;
}
.order_row:last-child{
margin-bottom: 20rpx;
}
.order_title{
width: 100%;
height: 88rpx;
padding: 0 35rpx 0 70rpx;
border-bottom: 2rpx solid #f2f2f2;
position: relative;
}
.order_num{
line-height: 88rpx;
width: 70%;
display: inline-block;
font-size: 26rpx;
letter-spacing: 0px;
color: #999999;
}
.order_state{
line-height: 88rpx;
width: 30%;
display: inline-block;
font-size: 28rpx;
letter-spacing: 0px;
color: #ff4737;
text-align: right;
}
.order_icon{
position: absolute;
left: 30rpx;
top: 50%;
margin-top: -13rpx;
width: 23rpx;
height: 26rpx;
}
.order_icon image{
width: 23rpx;
height: 26rpx;
}
.order_info{
width: 100%;
height: 230rpx;
padding: 0 35rpx 0 70rpx;
}
.info_p{
font-size: 26rpx;
letter-spacing: 0px;
color: #333333;
}
.order_sub{
width: 100%;
height: 106rpx;
padding-right: 35rpx;
border-top: 2rpx solid #f2f2f2;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.order_sub view,.order_sub button{
padding: 16rpx 30rpx;
border-radius: 150rpx;
font-size: 28rpx;
line-height: normal;
background-color: #ffffff;
}
.cancel{
text-align: center;
border: solid 1px #ebebeb;
color: #333333;
}
.openInfo{
border: solid 1px #1dbf45;
color: #1dbf45;
}
/* 弹出层 */
.tips{
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
}
.tips_cen{
width: 600rpx;
background-color: #ffffff;
border-radius: 10rpx;
padding-top: 58rpx;
padding-bottom: 50rpx;
}
.tips_cen_tit{
font-family: PingFang-SC-Bold;
font-size: 36rpx;
color: #000000;
font-weight: 600;
text-align: center;
}
.tips_cen_tit1{
text-align: center;
font-size: 28rpx;
color: #666666;
}
.tips_cen_tit1 span{
color: #ff4838;
}
.tips_cen_text{
width: 520rpx;
height: 200rpx;
background-color: #f5f5f5;
border-radius: 5rpx;
position: relative;
padding: 34rpx 25rpx;
}
.tips_cen_text textarea{
height: 100%;
width: 100%;
}
.tips_cen_num{
width: 520rpx;
height: 120rpx;
background-color: #f5f5f5;
border-radius: 5rpx;
margin: 0 auto;
}
.tips_text_span{
position: absolute;
right: 16rpx;
bottom: 13rpx;
font-family: PingFang-SC-Medium;
font-size: 20rpx;
color: #999999;
}
.tips_cen_sub{
margin: 45rpx auto 0;
width: 550rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background-color: #36d96c;
border-radius: 40rpx;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #ffffff;
}
.tips_img{
margin-top: 50rpx;
text-align: center;
}
.tips_img image{
width: 69rpx;
height: 69rpx;
}
.tips_ts{
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #999999;
}
.tips_remarks{
width: 526rpx;
display: flex;
margin: 20rpx auto 0;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #333333;
}
.remarks_xiu{
display: inline-block;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #1dbf53;
}
.num_img image{
width: 45rpx;
height: 45rpx;
}
.num_text{
line-height: 45rpx;
width: 70rpx;
text-align: center;
}
.tipsRemarks{
z-index: 99999;
}

View File

@@ -0,0 +1 @@
40733f8e-627e-4ff5-9f20-e73667f73884

View File

@@ -0,0 +1,347 @@
// user/orderInfo/orderInfo.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
import { $wuxDialog, $wuxToast } from '../../extend/wux/dist/index';
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "洗衣单详情", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
orderInfo: {},//订单详情
isTips: false,//显示反洗
isAdd: false,//增减衣物
isRemarks: false,//备注弹窗
remarks: "",//反洗备注
commodityInfo: {},//反洗衣物的信息
userInfo: {},//个人信息
id:'',//订单id
isopen: '' // 决定是否显示申请退款的按钮
},
// 获取用户会员状态
async memberState() {
let res = await model.storage.getSetting("userInfo")
this.setData({
userInfo: res
})
},
// 去支付
goPay() {
let orderInfo = this.data.orderInfo
let data = {
orederId: orderInfo.id,
order_num: orderInfo.order_number,
realPrice: orderInfo.realPrice,
fjPrice: orderInfo.fjPrice
}
wx.navigateTo({
url: `/user/payment/payment?data=${JSON.stringify(data)}`
})
},
// 获取订单详情
async getOrderInfo(id) {
let res = await http.http.request2({ url: `${http.api.shopOrderDetail}`, method: "POST", data: { order_id: id } })
this.setData({
orderInfo: res.data.data,
isLoading: false
})
},
// 显示反洗
openTips1(e) {
let item = e.currentTarget.dataset.item
this.setData({
isTips: true,
commodityInfo: item
})
},
// 关闭反洗
closeTips1() {
this.setData({
isTips: false
})
},
// 反洗备注
remarksInput(e) {
let val = e.detail.value
this.setData({
remarks: val
})
},
// 确认反洗
async confirmSub() {
let item = this.data.commodityInfo
let data = {
order_id: this.data.orderInfo.id,
order_product: item.id,
product_id: item.mall_product_id,
reason: this.data.orderInfo.remarks
}
let res = await http.http.request2({ url: `${http.api.orderBackWash}`, method: "POST", data: data })
if (res) {
this.closeTips1()
this.getOrderInfo(this.data.orderInfo.id)
app.globalData.isOrderList = true
}
},
// 显示增减衣物
openTips(e) {
let type = e.currentTarget.dataset.type
if (type == "num") {
this.setData({
isAdd: true
})
} else if (type == "remarks") {
this.setData({
isRemarks: true
})
}
},
// 关闭增减衣物
closeTips(e) {
let type = e.currentTarget.dataset.type
if (type == "num") {
this.setData({
isAdd: false
})
} else if (type == "remarks") {
this.setData({
isRemarks: false
})
}
},
// 减少衣物数量
reduce() {
let orderInfo = this.data.orderInfo
--orderInfo.total_count
this.setData({
orderInfo: orderInfo
})
},
// 增加衣物数量
add() {
let orderInfo = this.data.orderInfo
++orderInfo.total_count
this.setData({
orderInfo: orderInfo
})
},
// 备注
remarksInput(e) {
let val = e.detail.value
this.setData({
"orderInfo.remarks": val
})
},
// 洗衣柜增减衣物接口
chCount() {
let that = this
let orderInfo = this.data.orderInfo
let data = {
order_id: orderInfo.id,
count: orderInfo.total_count,
remarks: orderInfo.remarks
}
wx.showModal({
title: '确认打开智能衣柜?',
content: '为避免衣物遗失,请在洗衣柜附近打开衣柜!',
confirmText: '确认',
cancelText: '取消',
success(res) {
if (res.confirm) {
http.http.request2({ url: `${http.api.changeCount}`, method: "POST", data: data })
.then(res => {
// 更新列表
that.getOrderInfo(orderInfo.id)
that.setData({
isAdd: false
})
})
}
}
})
},
// 开箱取衣
openCase(e) {
let that = this
let id = e.currentTarget.dataset.id
let data = {
order_id: id,
lat: "",
lng: ""
}
wx.showModal({
title: '确认打开智能衣柜?',
content: '为避免衣物遗失,请在洗衣柜附近打开衣柜!',
confirmText: '确认',
cancelText: '取消',
success(res) {
if (res.confirm) {
wx.getLocation({
type: 'gcj02',
success(res) {
data.lat = res.latitude
data.lng = res.longitude
wx.showLoading({
title: '开柜中',
})
http.http.request2({ url: `${http.api.openCupboard}`, method: "POST", data: data })
.then(res => {
if (res.data.status == 1) {
wx.hideLoading()
wx.showToast({
title: '开柜成功',
icon: 'none',
duration: 1000
})
// 更新列表
that.getOrderInfo(id)
// 改变变量使返回列表页刷新
app.globalData.isOrderList = true
}
})
}
})
}
}
})
},
refund(event) {
var that = this;
$wuxDialog().prompt({
resetOnClose: true,
title: '退款',
fieldtype: 'text',
placeholder: '输入退款金额',
maxlength: 8,
onConfirm: async function(e, response) {
let res = await http.http.request2({
url: `${http.api.refund}`, method: "POST", data: {
id: event.currentTarget.dataset.id,
refund_fee: response
}
});
if (res.data.status == 1) {
console.log("res: ", res.data.msg)
$wuxToast().show({
type: 'success',
duration: 1500,
color: '#fff',
text: '申请成功,3个工作日内退款',
success: () => {
// that.getOrderInfo(that.data.id)
}
});
}
},
})
},
//取消订单的方法
cancelOrder(e) {
let id = e.currentTarget.dataset.id
var that = this
wx.showModal({
title: '取消订单',
content: '点击确定取消订单',
confirmText: "确认",
cancelText: "取消",
success: (res) => {
if (res.confirm) {
http.http.request2({ url: `${http.api.cancelOrder}`, method: "POST", data: { order_id: id } })
.then(rel => {
if (rel.data.status == 1) {
model.msg.dataMsg({
content: "取消成功",
type: "success"
})
// 更新列表
that.getOrderInfo(id)
// 改变变量使返回列表页刷新
app.globalData.isOrderList = true
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if(options.isopen == "1") {
this.setData({
isopen: options.isopen
})
console.log("显示申请退款按钮")
}
if(!!options.id){
this.setData({
id:options.id
})
this.getOrderInfo(options.id)
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(!!this.data.id){
this.getOrderInfo(this.data.id)
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,8 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"wux-button": "../../extend/wux/dist/button/index",
"wux-dialog": "../../extend/wux/dist/dialog/index",
"wux-toast": "../../extend/wux/dist/toast/index"
}
}

View File

@@ -0,0 +1,192 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<wux-dialog id="wux-dialog" />
<wux-dialog id="wux-dialog--alert" />
<wux-toast id="wux-toast" />
<!-- user/orderInfo/orderInfo.wxml -->
<view class="orderInfo">
<view class="panel pd30 mt20">
<view class="panel_title">客户信息</view>
<view class="panel_list pdtb10">
<view class="panel_p">
<view class="panel_pl">{{orderInfo.user_name}} {{orderInfo.telnum}}</view>
</view>
<view class="panel_p">
<view class="panel_pl">{{orderInfo.address}}</view>
</view>
</view>
</view>
<view wx:if="{{orderInfo.product_info.length > 0}}" class="panel pd30 mt20">
<view class="panel_title">衣物信息</view>
<view class="panel_list pdtb10">
<view class="panel_p mt20" wx:for="{{orderInfo.product_info}}" wx:key="{{index}}">
<view class="panel_pl flex-con2">
<span class="flex1">
{{item.name}} {{item.wash_remark.length > 0 ?'('+item.wash_remark+')':''}}
</span>
<span data-item="{{item}}" wx:if="{{ orderInfo.back_wash_status == 1 && item.is_return == 2 }}" class="backwash" catchtap="openTips1">
反洗
</span>
<span wx:elif="{{ orderInfo.back_wash_status == 1 && item.is_return == 1 }}" class="backwash1">
反洗中
</span>
</view>
<view class="panel_pr pan_num">
<view class="pan_numl flex-con3">×{{item.count}}</view>
<view class="pan_numr flex-con5 {{item.cloth_status==13?'c_red':''}}">{{item.cloth_status==13?'已取消':item.price+'元'}}</view>
</view>
</view>
</view>
<view class="panel_list pdtb10 border_t">
<view class="panel_p mt20">
<view class="panel_pl">附件(附件不算在折扣中)</view>
<view class="panel_pr pan_num">
<view class="pan_numr flex-con5">{{orderInfo.fjPrice}}元</view>
</view>
</view>
<view class="panel_p mt20">
<view class="panel_pl">运费({{orderInfo.postage_desc}})</view>
<view class="panel_pr pan_num" wx:if="{{orderInfo.postage_price >= 0}}">
<view class="pan_numr flex-con5">¥{{orderInfo.postage_price}}元</view>
</view>
</view>
<view class="panel_p mt20">
<view class="panel_pl">优惠</view>
<view class="panel_pr pan_num">
<view class="pan_numr flex-con5 c_red">-¥{{orderInfo.coupon_price}}元</view>
</view>
</view>
<view class="panel_p mt20">
<view class="panel_pl">订单总额</view>
<view class="panel_pr pan_num">
<view class="pan_numr flex-con5">¥{{orderInfo.allPrice}}元</view>
</view>
</view>
<view class="panel_p mt20">
<view class="panel_pl">实付款</view>
<view class="panel_pr pan_num">
<view class="pan_numr flex-con5 c_red">{{orderInfo.realPrice}}元</view>
</view>
</view>
</view>
<!-- <view class="cus_ser pdtb30 flex-con3 border_t">
<view class="cus flex-con3">
<image class="ser" src="/static/img/icon/kf_03.png" />
<view class="cus_p ml10">联系客服</view>
</view>
</view> -->
</view>
<view class="panel pd30 mt20">
<view class="panel_title">订单信息</view>
<view class="panel_p2">订单号: {{orderInfo.order_number}}</view>
<view class="panel_p2">
衣物数量:{{orderInfo.total_count <= 0 ? '待录入' : orderInfo.total_count}}
</view>
<view class="panel_p2">
订单金额:{{orderInfo.realPrice == '0.00' ? '待统计' : '¥'+orderInfo.realPrice}}
</view>
<view class="panel_p2">订单状态:{{orderInfo.order_status}}</view>
<view class="panel_p2">下单时间:{{orderInfo.create_time}}</view>
<view class="panel_p2">收衣联系人:{{orderInfo.logistics_name}}{{orderInfo.logistics_tel}}</view>
<view class="panel_p2 dis-flex">
订单备注:
<span class="flex1">{{orderInfo.remarks}}</span>
</view>
<!-- <view class="cus_ser pdtb30 flex-con3" wx:if="{{orderInfo.order_status_num == 1}}">
<view class="cus flex-con3">
<image class="ser" src="/static/img/icon/kf_03.png" />
<view class="cus_p ml10">联系客服</view>
</view>
</view> -->
</view>
</view>
<!-- 反洗 -->
<view wx:if="{{isTips}}" class="backwash_tips flex-con3 tips">
<view>
<view class="tips_cen">
<view class="tips_cen_tit">衣物反洗</view>
<view class="mt20 tips_cen_tit1">
反洗衣物:
<span>{{commodityInfo.name}}</span>
</view>
<view class="flex-con3 mt30">
<view class="tips_cen_text">
<textarea maxlength="50" placeholder="给您带来困扰,我们深表歉意!请填写反洗原因,以便我们更好的为您服务。" bindinput="remarksInput" value="{{remarks}}"></textarea>
<span class="tips_text_span">1/50个字</span>
</view>
</view>
<view class="tips_cen_sub" catchtap="confirmSub">提交</view>
<!-- <view class="mt20 tips_ts">为了避免衣物遗失,请在洗衣柜附近开柜!</view> -->
</view>
<view class="tips_img" catchtap="closeTips1">
<image src="/static/img/icon/colse_tips.png" />
</view>
</view>
</view>
<!-- 付款或者取消 -->
<view class="pay_cancel flex-con5 pd30">
<span wx:if="{{orderInfo.order_status_num == 5}}" data-id="{{orderInfo.id}}" bind:tap="goPay" class="lau_pay ml20">
去支付
</span>
<span wx:if="{{isopen == '1'}}" data-id="{{orderInfo.id}}" bind:tap="refund" class="lau_cancel ml20">
申请退款
</span>
<span wx:if="{{(orderInfo.order_status_num == 1 || orderInfo.order_status_num == 3) && orderInfo.shop_id == 2}}" data-type="num" bind:tap="openTips" class="lau_cancel ml20">
增减衣物数量
</span>
<span wx:if="{{orderInfo.order_status_num == 10 && orderInfo.shop_id != 1}}" data-id="{{orderInfo.id}}" bind:tap="orderCancel" class="lau_cancel ml20">
开柜取衣
</span>
<button open-type="contact" class="lau_service ml20">联系客服</button>
</view>
<!-- 增减衣物 -->
<view wx:if="{{isAdd}}" class="backwash_tips flex-con3 tips">
<view>
<view class="tips_cen">
<view class="tips_cen_tit">本次洗护数量</view>
<view class="flex-con3 mt30">
<view class="tips_cen_num flex-con3">
<view class="num_img" catchtap="reduce">
<image src="/static/img/icon/j1.png" />
</view>
<view class="num_text">{{orderInfo.total_count}}</view>
<view class="num_img" catchtap="add">
<image src="/static/img/icon/j2.png" />
</view>
</view>
</view>
<view data-type="remarks" class="tips_remarks" catchtap="openTips">
<view class="flex1 clamp1">{{orderInfo.remarks}}</view>
<view class="remarks_xiu">修改</view>
</view>
<view class="tips_cen_sub" catchtap="chCount">提交并打开衣柜</view>
<view class="mt20 tips_ts">提示:请在洗衣柜附近开柜!</view>
</view>
<view class="tips_img" data-type="num" catchtap="closeTips">
<image src="/static/img/icon/colse_tips.png" />
</view>
</view>
</view>
<!-- 修改备注 -->
<view wx:if="{{isRemarks}}" class="tipsRemarks flex-con3 tips">
<view>
<view class="tips_cen">
<view class="tips_cen_tit">洗护备注</view>
<view class="flex-con3 mt30">
<view class="tips_cen_text">
<textarea maxlength="50" placeholder="添加备注:如洗护要求、衣物特殊污渍等" bindinput="remarksInput" value="{{orderInfo.remarks}}"></textarea>
<span class="tips_text_span">{{orderInfo.remarks.length}}/50个字</span>
</view>
</view>
<view class="tips_cen_sub" data-type="remarks" catchtap="closeTips">完成</view>
</view>
<view data-type="remarks" class="tips_img" catchtap="closeTips">
<image src="/static/img/icon/colse_tips.png" />
</view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,318 @@
/* user/orderInfo/orderInfo.wxss */
.orderInfo {
padding-bottom: 120rpx;
}
.panel {
background: var(--white);
}
.panel_title {
height: 92rpx;
line-height: 92rpx;
font-size: 32rpx;
letter-spacing: 0px;
color: #333;
border-bottom: 2rpx solid #ebebeb;
}
.panel_p2 {
height: 82rpx;
line-height: 82rpx;
font-size: 32rpx;
letter-spacing: 0px;
color: #999;
border-bottom: 2rpx solid #ebebeb;
}
.panel_p2:last-child {
border: 0;
height: auto;
line-height: normal;
padding: 16rpx 0;
word-wrap: break-word;
word-break: normal;
}
.panel_p {
display: flex;
/* height: 52rpx; *//* line-height: 52rpx; */
padding: 10rpx 0;
font-size: 28rpx;
color: #999;
}
.panel_pl {
flex: 10;
}
.panel_pr {
flex: 7;
}
.order_state {
height: 90rpx;
width: 100%;
line-height: 90rpx;
text-align: center;
font-weight: 700;
font-size: 36rpx;
color: #333;
}
.pan_num {
display: flex;
}
.pan_numl {
flex: 1;
font-size: 28rpx;
letter-spacing: 0px;
color: #999;
}
.pan_numr {
flex: 2;
font-size: 28rpx;
color: #333;
text-align: right;
}
.border_t {
border-top: 2rpx solid #ebebeb;
}
/* 客服 */
.cus_ser {
width: 100%;
}
.cus {
width: 262rpx;
height: 60rpx;
line-height: 60rpx;
background-color: #fff;
border-radius: 30rpx;
border: solid 1px #aaa;
}
.ser {
width: 32rpx;
height: 32rpx;
}
.cus_p {
font-size: 28rpx;
letter-spacing: 0px;
color: #333;
}
.backwash {
padding: 0 24rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
height: 45rpx;
line-height: 45rpx;
color: #fff;
background-color: #1dbf45;
border-radius: 100px;
}
.backwash1 {
padding: 0 24rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
height: 45rpx;
line-height: 45rpx;
color: #fff;
background-color: #ff614c;
border-radius: 100px;
}
/* 弹出层 */
.tips {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
}
.tips_cen {
width: 600rpx;
background-color: #fff;
border-radius: 10rpx;
padding-top: 58rpx;
padding-bottom: 50rpx;
}
.tips_cen_tit {
font-family: PingFang-SC-Bold;
font-size: 36rpx;
color: #000;
font-weight: 600;
text-align: center;
}
.tips_cen_tit1 {
text-align: center;
font-size: 28rpx;
color: #666;
}
.tips_cen_tit1 span {
color: #ff4838;
}
.tips_cen_text {
width: 520rpx;
height: 200rpx;
background-color: #f5f5f5;
border-radius: 5rpx;
position: relative;
padding: 34rpx 25rpx;
}
.tips_cen_text textarea {
height: 100%;
width: 100%;
}
.tips_cen_num {
width: 520rpx;
height: 120rpx;
background-color: #f5f5f5;
border-radius: 5rpx;
margin: 0 auto;
}
.tips_text_span {
position: absolute;
right: 16rpx;
bottom: 13rpx;
font-family: PingFang-SC-Medium;
font-size: 20rpx;
color: #999;
}
.tips_cen_sub {
margin: 45rpx auto 0;
width: 550rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background-color: #36d96c;
border-radius: 40rpx;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #fff;
}
.tips_img {
margin-top: 50rpx;
text-align: center;
}
.tips_img image {
width: 69rpx;
height: 69rpx;
}
.tips_ts {
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #999;
}
.tips_remarks {
width: 526rpx;
display: flex;
margin: 20rpx auto 0;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #333;
}
.remarks_xiu {
display: inline-block;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #1dbf53;
}
.num_img image {
width: 45rpx;
height: 45rpx;
}
.num_text {
line-height: 45rpx;
width: 70rpx;
text-align: center;
}
.tipsRemarks {
z-index: 99999;
}
/* 底部 */
.pay_cancel {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #fff;
z-index: 998;
}
.pay_cancel span, .pay_cancel button {
padding: 15rpx 40rpx !important;
border: solid 1px #ebebeb !important;
font-family: PingFang-SC-Medium !important;
font-size: 26rpx !important;
color: #333 !important;
border-radius: 40rpx !important;
font-weight: 400 !important;
}
.pay_cancel button {
line-height: normal;
margin: 0;
background-color: #fff;
box-shadow: 0;
}
.pay_cancel button::after {
border: 0;
}
.lau_pay {
border: solid 2rpx #1dbf45 !important;
color: #1dbf45 !important;
}
.more_shop {
margin: 20rpx 30rpx 0;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background-color: #f6f6f6;
border-radius: 10rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
color: #999;
}
.more_shop image {
width: 21rpx;
height: 10rpx;
}

View File

@@ -0,0 +1 @@
cbef32dc-8f9a-4e53-ba36-2c4ff07ca5f3

View File

@@ -0,0 +1,186 @@
// user/parIncome/parIncome.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "我的返利", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
current: '0',//当前所在的标签的 key 值
tabs: ["我推荐的人", "积分记录", "佣金记录"],
page: 1,//当前页码
isPage: true,//当前接口无数据,
recommendList: [],//推荐人列表
score: [],//积分记录
commission: [],//佣金记录
userInfo: {},//用户信息
},
// 获取用户个人信息
userInfo() {
this.setData({
userInfo: app.globalData.userInfo
})
},
// tab选中事件
// 切换tab时把该清空的清空
handleChange(e) {
let index = e.currentTarget.dataset.index
this.setData({
current: index,
page: 1,
isPage: true,
recommendList: [],
score: [],
commission: []
});
this.isSwitch(index)
},
isSwitch(index) {
switch (index) {
case 0:
this.allRecord(http.api.recommend, 0)
break;
case 1:
this.allRecord(http.api.score, 1)
break;
case 2:
this.allRecord(http.api.withDrawRecord, 2)
break;
default:
break;
}
},
//回到顶部
goTop: function (e) { // 一键回到顶部
if (wx.pageScrollTo) {
wx.pageScrollTo({
scrollTop: 0
})
} else {
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
// 所有记录 0 推荐人列表 1 积分记录 2 佣金记录
async allRecord(url, index) {
if (!this.data.isPage) {
return
}
let data = {
page: this.data.page,
limit: 10
}
let res = await http.http.request2({ url: url, method: "POST", data: data })
if (res.data.data.list.length < 10) {
this.setData({
isPage: false
})
}
let rel = res.data.data.list
switch (index) {
case 0:
let recommendList = this.data.recommendList
this.setData({
recommendList: [...recommendList, ...rel],
isLoading: false
})
break;
case 1:
let score = this.data.score
this.setData({
score: [...score, ...rel],
isLoading: false
})
break;
case 2:
let commission = this.data.commission
this.setData({
commission: [...commission, ...rel],
isLoading: false
})
break;
default:
this.setData({
isLoading: false
})
break;
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
current: options.index || 0
})
if (options['index']) {
this.isSwitch(parseInt(options['index']))
} else {
this.isSwitch(0)
}
this.userInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.userInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (this.data.isPage) {
this.setData({
page: ++this.data.page
})
this.isSwitch(this.data.current)
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,5 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
}
}

View File

@@ -0,0 +1,68 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/parIncome/parIncome.wxml -->
<view class="parIncome">
<view class="parIncome_title" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
<view class="parIncome_img">
<view class="flex1">
<view class="par_title">
<span>积分合计</span>
</view>
<view class="par_num">{{userInfo.integral}} <navigator class="span" url="/user/couponExchange/couponExchange">兑换</navigator></view>
</view>
<view class="flex1">
<view class="par_title">
<span>佣金合计(元)</span>
</view>
<view class="par_num">{{userInfo.distribution_money}} <navigator class="span" url="/user/cashWithdrawal/cashWithdrawal">提现</navigator></view>
</view>
</view>
<view class="mt20">
<view class="tabs">
<view wx:for="{{tabs}}" wx:key="{{index}}" bind:tap="handleChange" data-index="{{index}}" class="tab {{current == index?'tabActiv':''}}">
{{item}}
</view>
</view>
</view>
</view>
<view class="data_con">
<scroll-view wx:if="{{ current == 0 }}" class="recommender">
<view wx:for="{{recommendList}}" wx:key="{{index}}" class="recom_list">
<view class="recom_list_row">
<image src="{{item.avatar}}" />
<span class="ml20">{{item.nickname}}</span>
</view>
<view class="recom_list_row recom_row_r">{{item.create_time}}</view>
</view>
<view wx:if="{{ !isPage }}" class="ending">没有更多了</view>
</scroll-view>
<scroll-view wx:if="{{ current == 1 }}" class="recommender">
<view wx:for="{{score}}" wx:key="{{index}}" class="recom_list">
<view class="recom_list_row">
<view>
<view class="mode">{{item.title}}</view>
<view class="mode_time mt10">{{item.create_time}}</view>
</view>
</view>
<view class="recom_list_row recom_row_r mode_num">{{item.intergral}}</view>
</view>
<view wx:if="{{ !isPage }}" class="ending">没有更多了</view>
</scroll-view>
<scroll-view wx:if="{{ current == 2 }}" class="recommender">
<view wx:for="{{commission}}" wx:key="{{index}}" class="recom_list">
<view class="recom_list_row">
<view>
<view class="mode">{{item.type == 1?'提现':'佣金收益'}}</view>
<view class="mode_time mt10">{{item.create_time}}</view>
</view>
</view>
<view class="recom_list_row recom_row_r mode_num">{{item.distribution_money}}</view>
</view>
<view wx:if="{{ !isPage }}" class="ending">没有更多了</view>
</scroll-view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,169 @@
/* user/parIncome/parIncome.wxss */
page{
background: #ffffff;
}
.parIncome_title{
position: fixed;
height: 360rpx;
width: 100%;
background: #f5f5f5;
padding: 30rpx 30rpx 0rpx 30rpx;
z-index: 998;
}
.parIncome_img{
height: 210rpx;
background: #fdaf44 center no-repeat;
background-size: 100%;
position: relative;
display: flex;
justify-content: center;
overflow: hidden;
align-items: center;
}
.parIncome_img .images{
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
width: 100%;
mix-blend-mode: screen;
}
.par_title{
font-size: 28rpx;
color: #ffffff;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
.par_title span{
display: inline-block;
}
.par_num{
margin-top: 14rpx;
font-size: 60rpx;
color: #ffffff;
text-align: center;
overflow: hidden;
}
.par_num .span{
font-family: PingFang-SC-Medium;
text-decoration: underline;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
line-height: 36px;
letter-spacing: 0px;
color: #ffffff;
display: inline-block;
background-color: rgba(0, 0, 0, 0);
}
.tabs{
width: 100%;
display: flex;
}
.tab{
line-height: 100rpx;
text-align: center;
flex: 2;
font-size: 28rpx;
color: #333333;
position: relative;
}
.tabActiv{
font-size: 40rpx;
}
.tabActiv::before{
position: absolute;
content: "";
bottom: 0;
left: 50%;
margin-left: -32rpx;
width: 64rpx;
height: 8rpx;
background-color: #1dbf53;
border-radius: 4rpx;
}
.data_con{
margin-top: 360rpx;
}
.recom_list{
height: 100rpx;
display: flex;
border-bottom: 2rpx solid #ebebeb;
padding: 0 30rpx;
}
.recom_list_row{
flex: 2;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
}
.recom_list_row image{
width: 50rpx;
height: 50rpx;
border-radius: 50%;
overflow: hidden;
}
.recom_list_row span{
font-size: 32rpx;
color: #333333;
}
.recom_row_r{
text-align: right;
font-size: 26rpx;
color: #999999;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.mode{
font-size: 30rpx;
color: #333333;
}
.mode_time{
font-size: 22rpx;
color: #999999;
}
.mode_num{
font-family: PingFang-SC-Bold;
font-size: 28rpx;
color: #fd933f;
font-weight: 600;
}
.ending{
height: 120rpx;
line-height: 120rpx;
text-align: center;
font-size: 26rpx;
color: #999999;
position: relative;
}
.ending::after{
position: absolute;
content: "";
width: 50rpx;
height: 4rpx;
background-color: #cccccc;
top: 50%;
left: 50%;
margin: -2rpx 0 0 100rpx;
}
.ending::before{
position: absolute;
content: "";
width: 50rpx;
height: 4rpx;
background-color: #cccccc;
top: 50%;
right: 50%;
margin: -2rpx 100rpx 0 0;
}

View File

@@ -0,0 +1 @@
538bde40-f4ed-40e0-9cbd-abce1b9df7d2

View File

@@ -0,0 +1 @@
3b2418b1-a368-4206-aa08-66d5acbb3c65

View File

@@ -0,0 +1,118 @@
// user/payment/card/card.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "会员卡支付", //头部标题
isBack: true,//显示返回
current: '1',//当前所在的标签的 key 值
cardList: [],//会员卡列表
type: '',//1为商城订单
},
// tab选中事件
handleChange({ detail }) {
this.setData({
current: detail.key
});
this.userCard()
},
// 获取礼品卡
async userCard() {
this.setData({
cardList: []
})
let res = await http.http.request2({ url: `${http.api.userCard}/${this.data.current}`, method: "POST", data: { kind: this.data.type } })
this.setData({
cardList: res.data.data
})
},
// 选择礼品卡
async selectGiftCard(e) {
let item = e.currentTarget.dataset.item
await model.storage.setStorage("itemGiftCard", item)
let giftCard = {
id: item.id,
price: item.discount / 10,
title: item.title,
logo: item.logo
}
await model.storage.setStorage("giftCard", giftCard)
wx.navigateBack({
})
},
// 办卡
goCard(){
wx.navigateTo({
url:`/user/balance/balance?index=${this.data.current}`
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!!options.type) {
this.setData({
type: options.type
})
}
this.userCard()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,7 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"i-tabs": "../../../extend/iview/dist/tabs/index",
"i-tab": "../../../extend/iview/dist/tab/index"
}
}

View File

@@ -0,0 +1,113 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/payment/card/card.wxml -->
<view class="card">
<view class="order_tab" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
<i-tabs current="{{ current }}" scroll color="#1dbf45" bindchange="handleChange">
<i-tab key="1" title="会员卡"></i-tab>
<i-tab key="2" title="礼品卡"></i-tab>
<i-tab key="3" title="团体卡"></i-tab>
</i-tabs>
</view>
<view class="tab_con">
<view wx:if="{{current == 1}}" class="con_lsit_card">
<view class="list_card mt20" wx:for="{{cardList}}" wx:key="{{index}}" data-item="{{item}}" bind:tap="selectGiftCard">
<view class="card_lv">
<image src="{{item.src}}" />
</view>
<view class="card_lv2">
<view class="card_text">
<view class="text_cen">
<view class="text_top">
<view class="text_l">
<image src="/static/img/icon/vip.png" />
<span class="ml10">{{item.title}}</span>
</view>
<view class="text_r">
<span>{{item.discount/10}}</span>
折
</view>
</view>
<view class="text_botton mt10">
<view class="text_botton_l">发卡时间 {{item.create_time}}</view>
<view class="text_botton_r">余额 ¥{{item.money}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{current == 2}}" class="con_lsit_card" wx:for="{{cardList}}" wx:key="{{index}}" data-item="{{item}}" bind:tap="selectGiftCard">
<view class="list_card mt20">
<view class="card_lv">
<image src="{{item.src}}" />
</view>
<view class="card_lv2">
<view class="card_text">
<view class="text_cen">
<view class="text_top">
<view class="text_l">
<image src="/static/img/icon/vip.png" />
<span class="ml10">{{item.title}}</span>
</view>
<!-- <view class="text_r card2">
余额¥
<span>{{item.money}}</span>
</view> -->
</view>
<view class="text_botton mt20">
<view class="card2_text">
<view class="card2_p">发卡时间{{item.create_time}}</view>
<!-- <view class="card2_p">
卡号 YS123456789 有效期{{item.create_time}}
</view> -->
<view class="text_r card2">
余额¥
<span>{{item.money}}</span>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{current == 3}}" class="con_lsit_card">
<view class="list_card mt20" wx:for="{{cardList}}" wx:key="{{index}}" data-item="{{item}}" bind:tap="selectGiftCard">
<view class="card_lv">
<image src="{{item.src}}" />
</view>
<view class="card_lv2">
<view class="card_text">
<view class="text_cen">
<view class="text_top">
<view class="text_l">
<image src="/static/img/icon/vip.png" />
<span class="ml10">{{item.title}}</span>
</view>
<view class="text_r">
<span>{{item.discount/10}}</span>
折
</view>
</view>
<view class="text_botton mt10">
<view class="text_botton_l">发卡时间 {{item.create_time}}</view>
<view class="text_botton_r">余额 ¥{{item.money}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{cardList.length <= 0}}" class="rech-nothing">
<view class="rech-nothing-img">
<image src="/static/img/rech-nothing-icon.png" />
</view>
<view class="rech-nothing-tips mt50">您还没有当前的会员卡哦~</view>
<view class="rech-nothing-p mt10">办理会员卡,可享会员折扣</view>
<view wx:if="{{current != 3}}" class="rech-nothing-btn" bind:tap="goCard">办卡</view>
</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,164 @@
/* user/payment/card/card.wxss */
.order_tab{
position: fixed;
width: 100%;
height: auto;
top: 0;
z-index: 9999;
}
.tab_con{
margin-top: 52px;
padding: 0 30rpx;
}
.list_card{
width: 100%;
height: 200rpx;
position: relative;
}
.card_lv{
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 997;
}
.card_lv2{
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 998;
}
.card_lv image{
width: 100%;
height: 100%;
}
.card_text{
display: block;
padding: 0 30rpx;
height: 100%;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
.text_cen{
width: 100%;
}
.text_top{
display: flex;
}
.text_l,.text_r{
flex: 2;
color: black;
}
.text_l{
text-align: left;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
}
.text_l image{
width: 43rpx;
height: 43rpx;
}
.text_l span{
font-size: 36rpx;
font-weight: 700;
color: #ffffff;
}
.text_r{
text-align: right;
font-size: 30rpx;
color: #ffffff;
}
.text_r span{
font-size: 60rpx;
}
.text_botton{
display: flex;
}
.text_botton_l,.text_botton_r{
flex: 2;
font-size: 26rpx;
color: #ffffff;
opacity: 0.6;
}
.text_botton_l{
text-align: left;
}
.text_botton_r{
text-align: right;
}
.card2{
font-size: 26rpx;
}
.card2 span{
font-size: 40rpx;
color: #ffffff;
}
.card2_text{
flex: 1;
}
.card2_p{
font-size: 22rpx;
color: #ffffff;
padding-left: 53rpx;
}
/* 修改tabs样式 */
i-tab {
width: 33.33%;
display: inline-block;
}
/* 无卡 */
/* 没有会员卡 */
.rech-nothing{
margin-top: 150rpx;
text-align: center;
}
.rech-nothing-img{
text-align: center;
}
.rech-nothing-img image{
width: 232rpx;
height: 232rpx;
}
.rech-nothing-tips{
font-family: PingFang-SC-Medium;
font-size: 36rpx;
font-weight: 400;
font-stretch: normal;
color: #666666;
}
.rech-nothing-p{
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
font-stretch: normal;
color: #999999;
}
.rech-nothing-btn{
width: 274rpx;
height: 75rpx;
margin: 30rpx auto 0;
line-height: 75rpx;
background-color: #1dbf53;
border-radius: 37rpx;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: 400;
color: #ffffff;
text-align: center;
}

Some files were not shown because too many files have changed in this diff Show More