Browse Source
- Remove 11 gift/points shop pages (giftList, giftDetail,
conformOrder, siteList, siteEdit, orderEnd, orderDetail,
myGift, priceDetail, scoreRule, dtpDurg) from gift subpackage
- Replace local /images/ paths with {{imageUrl}} + Timestamp
- Rename project from "愈见昕生" to "gMG给力
master
53 changed files with 13 additions and 2954 deletions
File diff suppressed because one or more lines are too long
@ -1,6 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "确认订单", |
|
||||||
"usingComponents": { |
|
||||||
"van-icon": "@vant/weapp/icon/index" |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,184 +0,0 @@ |
|||||||
.page { |
|
||||||
padding: 34rpx 40rpx; |
|
||||||
.site { |
|
||||||
padding: 40rpx 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.wrap { |
|
||||||
.title { |
|
||||||
.label { |
|
||||||
width: 72rpx; |
|
||||||
height: 36rpx; |
|
||||||
border: 1rpx solid #e04775; |
|
||||||
font-size: 24rpx; |
|
||||||
color: #e04775; |
|
||||||
text-align: center; |
|
||||||
border-radius: 10rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
} |
|
||||||
.name { |
|
||||||
margin-top: -42rpx; |
|
||||||
text-indent: 80rpx; |
|
||||||
font-size: 36rpx; |
|
||||||
line-height: 46rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
min-width: 0; |
|
||||||
overflow: hidden; |
|
||||||
text-overflow: ellipsis; |
|
||||||
display: -webkit-box; |
|
||||||
-webkit-line-clamp: 2; |
|
||||||
-webkit-box-orient: vertical; |
|
||||||
&.no-indent { |
|
||||||
margin-top: 0; |
|
||||||
text-indent: 0; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.content { |
|
||||||
margin-top: 0; |
|
||||||
margin-top: 12rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
} |
|
||||||
} |
|
||||||
.more { |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
} |
|
||||||
.shop { |
|
||||||
margin-top: 16px; |
|
||||||
padding: 40rpx 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
.shop-header { |
|
||||||
padding-bottom: 10px; |
|
||||||
display: flex; |
|
||||||
.shop-img { |
|
||||||
flex-shrink: 0; |
|
||||||
width: 204rpx; |
|
||||||
height: 204rpx; |
|
||||||
border-radius: 24rpx; |
|
||||||
} |
|
||||||
.wrap { |
|
||||||
padding-top: 8rpx; |
|
||||||
flex: 1; |
|
||||||
padding-left: 24rpx; |
|
||||||
.name { |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: bold; |
|
||||||
color: #3f3f3f; |
|
||||||
line-height: 44rpx; |
|
||||||
min-width: 0; |
|
||||||
overflow: hidden; |
|
||||||
text-overflow: ellipsis; |
|
||||||
display: -webkit-box; |
|
||||||
-webkit-line-clamp: 2; |
|
||||||
-webkit-box-orient: vertical; |
|
||||||
} |
|
||||||
.specification { |
|
||||||
margin-top: 8rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
} |
|
||||||
.price { |
|
||||||
margin-top: 14rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.num { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
} |
|
||||||
.sub { |
|
||||||
font-size: 22rpx; |
|
||||||
} |
|
||||||
.val { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.row { |
|
||||||
margin-top: 32rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.label { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
} |
|
||||||
.content { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
&.yellow { |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
.sub { |
|
||||||
font-size: 22rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.remark { |
|
||||||
margin-top: 16px; |
|
||||||
padding: 40rpx 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
.title { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.textarea { |
|
||||||
margin-top: 10rpx; |
|
||||||
padding: 24rpx 32rpx; |
|
||||||
background-color: #fafafa; |
|
||||||
min-height: 196rpx; |
|
||||||
border-radius: 16rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
} |
|
||||||
} |
|
||||||
.footer { |
|
||||||
padding: 24rpx 48rpx 48rpx; |
|
||||||
position: fixed; |
|
||||||
bottom: 0; |
|
||||||
left: 0; |
|
||||||
width: 100vw; |
|
||||||
box-sizing: border-box; |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
height: 168rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 0, 0, 0.26); |
|
||||||
.price { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
.num { |
|
||||||
font-size: 40rpx; |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
.sub { |
|
||||||
font-size: 24rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.submit { |
|
||||||
width: 260rpx; |
|
||||||
height: 96rpx; |
|
||||||
background: #e04775; |
|
||||||
border-radius: 48rpx; |
|
||||||
text-align: center; |
|
||||||
line-height: 96rpx; |
|
||||||
color: #fff; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,86 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
id: "", |
|
||||||
detail: {}, |
|
||||||
select: false, |
|
||||||
addressDetail: {} as any, |
|
||||||
remark: "", |
|
||||||
}, |
|
||||||
onLoad(options) { |
|
||||||
this.setData({ |
|
||||||
id: options.id, |
|
||||||
}); |
|
||||||
}, |
|
||||||
onShow() { |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getDetail(); |
|
||||||
if (!this.data.select) { |
|
||||||
this.getDefaultAddress(); |
|
||||||
} else { |
|
||||||
this.setData({ |
|
||||||
select: false, |
|
||||||
}); |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDefaultAddress() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-address/get-default-address", |
|
||||||
data: {}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
addressDetail: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/gift-order/get-order-detail", |
|
||||||
data: { |
|
||||||
orderId: this.data.id, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
detail: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSite() { |
|
||||||
if (this.data.addressDetail) { |
|
||||||
wx.navigateTo({ |
|
||||||
url: "/gift/pages/siteList/index", |
|
||||||
}); |
|
||||||
} else { |
|
||||||
wx.navigateTo({ |
|
||||||
url: "/gift/pages/siteEdit/index", |
|
||||||
}); |
|
||||||
} |
|
||||||
}, |
|
||||||
handleSubmit() { |
|
||||||
if (!this.data.addressDetail?.addressId) { |
|
||||||
wx.showToast({ |
|
||||||
icon: "none", |
|
||||||
title: "请选择地址", |
|
||||||
}); |
|
||||||
return; |
|
||||||
} |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/gift-order/confirm-order", |
|
||||||
data: { |
|
||||||
orderId: this.data.id, |
|
||||||
addressId: this.data.addressDetail.addressId, |
|
||||||
remark: this.data.remark, |
|
||||||
}, |
|
||||||
loading: true, |
|
||||||
}).then(() => { |
|
||||||
wx.reLaunch({ |
|
||||||
url: `/gift/pages/orderEnd/index?id=${this.data.id}`, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,56 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view class="site" bind:tap="handleSite"> |
|
||||||
<view class="wrap"> |
|
||||||
<block wx:if="{{addressDetail}}"> |
|
||||||
<view class="title"> |
|
||||||
<view class="label" wx:if="{{addressDetail.isDefault==1}}">默认</view> |
|
||||||
<view class="name {{addressDetail.isDefault!=1 && 'no-indent'}}"> |
|
||||||
{{addressDetail.provinceName}}{{addressDetail.cityName}}{{addressDetail.countyName}}{{addressDetail.address}} |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="content">{{addressDetail.receiveUserName}} {{addressDetail.receiveTelephone}}</view> |
|
||||||
</block> |
|
||||||
<view class="title" wx:else>请添加收货地址</view> |
|
||||||
</view> |
|
||||||
<van-icon class="more" name="arrow" /> |
|
||||||
</view> |
|
||||||
<view class="shop"> |
|
||||||
<view class="shop-header"> |
|
||||||
<image class="shop-img" src="{{detail.giftBigImg}}"></image> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="name">{{detail.giftName}}</view> |
|
||||||
<view class="specification" wx:if="{{detail.specName}}">规格:{{detail.specName}}</view> |
|
||||||
<view class="price"> |
|
||||||
<view class="num">{{detail.giftScore}}<text class="sub">能量</text></view> |
|
||||||
<view class="val">x{{detail.orderCount}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">礼品总价</view> |
|
||||||
<view class="content yellow">{{detail.orderScore}}<text class="sub">能量</text></view> |
|
||||||
</view> |
|
||||||
<view class="row" > |
|
||||||
<view class="label">配送方式</view> |
|
||||||
<view class="content" style="font-weight:normal">快递配送</view> |
|
||||||
</view> |
|
||||||
<view class="row" > |
|
||||||
<view class="label">商家电话</view> |
|
||||||
<view class="content" style="font-weight:normal">{{detail.serviceTel}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="remark"> |
|
||||||
<view class="title">留言</view> |
|
||||||
<textarea class="textarea" model:value="{{remark}}" placeholder="请输入留言" auto-height></textarea> |
|
||||||
</view> |
|
||||||
<view class="footer"> |
|
||||||
<view class="price"> |
|
||||||
共{{detail.orderCount}}件 |
|
||||||
<view> |
|
||||||
合计消耗 |
|
||||||
<text class="num">{{detail.orderScore}}<text class="sub">能量</text></text> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="submit" bind:tap="handleSubmit">提交订单</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "双通道药房", |
|
||||||
"usingComponents": {} |
|
||||||
} |
|
||||||
@ -1,128 +0,0 @@ |
|||||||
.page { |
|
||||||
position: relative; |
|
||||||
.banner { |
|
||||||
width: 100%; |
|
||||||
min-height: 344rpx; |
|
||||||
} |
|
||||||
.container { |
|
||||||
padding: 48rpx 40rpx; |
|
||||||
position: absolute; |
|
||||||
top: 316rpx; |
|
||||||
left: 0; |
|
||||||
width: 100%; |
|
||||||
min-height: 100vh; |
|
||||||
border-radius: 24rpx 24rpx 0 0; |
|
||||||
background-color: #fafafa; |
|
||||||
box-sizing: border-box; |
|
||||||
.title { |
|
||||||
font-size: 36rpx; |
|
||||||
color: #484848; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.tags { |
|
||||||
margin-top: 16rpx; |
|
||||||
display: flex; |
|
||||||
.tag { |
|
||||||
margin-right: 16rpx; |
|
||||||
padding-right: 8rpx; |
|
||||||
font-size: 22rpx; |
|
||||||
color: #e04775; |
|
||||||
line-height: 1; |
|
||||||
border-radius: 8rpx; |
|
||||||
background-color: #f5dfe6; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.icon { |
|
||||||
margin-right: 8rpx; |
|
||||||
padding: 4rpx; |
|
||||||
width: 24rpx; |
|
||||||
max-height: 24rpx; |
|
||||||
background-color: #e04775; |
|
||||||
border-radius: 8rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.content { |
|
||||||
margin-top: 32rpx; |
|
||||||
margin-bottom: 20rpx; |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
.inner { |
|
||||||
.site { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #9e9e9e; |
|
||||||
} |
|
||||||
.tel { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #9b9ea6; |
|
||||||
} |
|
||||||
} |
|
||||||
.options { |
|
||||||
flex-shrink: 0; |
|
||||||
display: flex; |
|
||||||
.option { |
|
||||||
margin-left: 30rpx; |
|
||||||
.phone { |
|
||||||
width: 48rpx; |
|
||||||
height: 48rpx; |
|
||||||
border-radius: 50%; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
background-color: #fff; |
|
||||||
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1); |
|
||||||
&-img { |
|
||||||
width: 24rpx; |
|
||||||
height: 24rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.name { |
|
||||||
margin-top: 8rpx; |
|
||||||
font-size: 24rpx; |
|
||||||
color: #484848; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.card { |
|
||||||
margin-bottom: 16rpx; |
|
||||||
padding: 32rpx 30rpx; |
|
||||||
border-radius: 24rpx; |
|
||||||
background-color: #fff; |
|
||||||
.c-title { |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: bold; |
|
||||||
color: #484848; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.c-icon { |
|
||||||
margin-right: 16rpx; |
|
||||||
width: 36rpx; |
|
||||||
height: 36rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.c-content{ |
|
||||||
margin-top: 24rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #9E9E9E; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.remark{ |
|
||||||
padding: 32rpx; |
|
||||||
border-radius: 24rpx; |
|
||||||
background-color: #fff; |
|
||||||
.r-title{ |
|
||||||
font-size: 32rpx; |
|
||||||
color: #484848; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.r-content{ |
|
||||||
margin-top: 20rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #9E9E9E; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,52 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
id: "", |
|
||||||
detail: {} as any, |
|
||||||
}, |
|
||||||
onLoad(options) { |
|
||||||
this.setData({ |
|
||||||
id: options.id, |
|
||||||
}); |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getDetail(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/dtp-pharmacy/detail", |
|
||||||
data: { |
|
||||||
Id: this.data.id, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
detail: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSite() { |
|
||||||
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail; |
|
||||||
wx.openLocation({ |
|
||||||
latitude: LAT, |
|
||||||
longitude: LNG, |
|
||||||
name: Name, |
|
||||||
address: `${ProvinceName}${CityName}${CountyName}${Address}`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handlePhone() { |
|
||||||
const tel = this.data.detail.Telephone; |
|
||||||
if (!tel) { |
|
||||||
wx.showToast({ |
|
||||||
icon: "none", |
|
||||||
title: "电话暂未开通", |
|
||||||
}); |
|
||||||
return; |
|
||||||
} |
|
||||||
wx.makePhoneCall({ |
|
||||||
phoneNumber: tel, |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,61 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<image wx:if="{{detail.ImgUrl}}" class="banner" mode="widthFix" src="{{detail.ImgUrl}}"></image> |
|
||||||
<image wx:else class="banner" mode="widthFix" src="{{imageUrl}}/nrdl/dtp-durg.png"></image> |
|
||||||
<view class="container"> |
|
||||||
<view class="title">{{detail.Name}}</view> |
|
||||||
<view class="tags"> |
|
||||||
<view class="tag" wx:if="{{detail.IsOwnInfusionCenter==1}}"> |
|
||||||
<image class="icon" mode="widthFix" src="{{imageUrl}}/nrdl/inject.png"></image> |
|
||||||
<!-- {{detail.OwnInfusionCenterName}} --> |
|
||||||
自有输注中心 |
|
||||||
</view> |
|
||||||
<view class="tag" wx:if="{{detail.IsCooperationInfusionCenter==1}}"> |
|
||||||
<image class="icon" mode="widthFix" src="{{imageUrl}}/nrdl/cooperate.png"></image> |
|
||||||
<!-- {{detail.CooperationInfusionCenterName}} --> |
|
||||||
合作输注中心 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="content"> |
|
||||||
<view class="inner"> |
|
||||||
<view class="site">{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}}</view> |
|
||||||
<view class="tel">{{detail.Telephone}}</view> |
|
||||||
</view> |
|
||||||
<view class="options"> |
|
||||||
<view class="option" bind:tap="handleSite" wx:if="{{detail.Address}}"> |
|
||||||
<view class="phone"> |
|
||||||
<image class="phone-img" src="{{imageUrl}}/nrdl/site.png"></image> |
|
||||||
</view> |
|
||||||
<view class="name">地址</view> |
|
||||||
</view> |
|
||||||
<view class="option" bind:tap="handlePhone"> |
|
||||||
<view class="phone"> |
|
||||||
<image class="phone-img" src="{{imageUrl}}/nrdl/phone.png"></image> |
|
||||||
</view> |
|
||||||
<view class="name">电话</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="card" wx:if="{{detail.IsOwnInfusionCenter==1}}"> |
|
||||||
<view class="c-title"> |
|
||||||
<image |
|
||||||
class="c-icon" |
|
||||||
src="{{imageUrl}}/nrdl/cooperate-1.png" |
|
||||||
style="width: 32rpx; height: 30rpx; margin-right: 18rpx" |
|
||||||
></image> |
|
||||||
自有输注中心 |
|
||||||
</view> |
|
||||||
<view class="c-content">{{detail.OwnInfusionCenterName}}</view> |
|
||||||
</view> |
|
||||||
<view class="card" wx:if="{{detail.IsCooperationInfusionCenter==1}}"> |
|
||||||
<view class="c-title"> |
|
||||||
<image class="c-icon" src="{{imageUrl}}/nrdl/inject-1.png" style="width: 36rpx; height: 36rpx"></image> |
|
||||||
合作输注中心 |
|
||||||
</view> |
|
||||||
<view class="c-content">{{detail.CooperationInfusionCenterName}}</view> |
|
||||||
</view> |
|
||||||
<view class="remark" wx:if="{{detail.Remark}}"> |
|
||||||
<view class="r-title">备注</view> |
|
||||||
<view class="r-content">{{detail.Remark}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
@ -1,7 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "礼品详情", |
|
||||||
"usingComponents": { |
|
||||||
"van-stepper": "@vant/weapp/stepper/index", |
|
||||||
"toast": "/components/toast/index" |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,185 +0,0 @@ |
|||||||
.page { |
|
||||||
background-color: #f9f9f9; |
|
||||||
padding-bottom: 400rpx; |
|
||||||
.banner { |
|
||||||
width: 100%; |
|
||||||
.banner-img { |
|
||||||
display: block; |
|
||||||
width: 100%; |
|
||||||
height: 562rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.container { |
|
||||||
padding: 30rpx 40rpx; |
|
||||||
.price { |
|
||||||
display: flex; |
|
||||||
align-items: baseline; |
|
||||||
.num { |
|
||||||
font-size: 56rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.sub { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
} |
|
||||||
.title { |
|
||||||
margin-top: 22rpx; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
line-height: 48rpx; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.list { |
|
||||||
margin-top: 24rpx; |
|
||||||
padding: 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
.list-title { |
|
||||||
padding-bottom: 16rpx; |
|
||||||
position: relative; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
&::before { |
|
||||||
content: ""; |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: -32rpx; |
|
||||||
width: 12rpx; |
|
||||||
height: 44rpx; |
|
||||||
background: #e04775; |
|
||||||
border-radius: 0rpx 8rpx 8rpx 0rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.list-img { |
|
||||||
display: block; |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.footer { |
|
||||||
padding: 30rpx 40rpx 40rpx; |
|
||||||
position: fixed; |
|
||||||
bottom: 0; |
|
||||||
left: 0; |
|
||||||
width: 100vw; |
|
||||||
box-sizing: border-box; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 0, 0, 0.26); |
|
||||||
.options { |
|
||||||
padding-bottom: 25rpx; |
|
||||||
.row { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.label { |
|
||||||
margin-right: 24rpx; |
|
||||||
flex-shrink: 0; |
|
||||||
font-size: 32rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
} |
|
||||||
.radios { |
|
||||||
display: flex; |
|
||||||
overflow: auto; |
|
||||||
&::-webkit-scrollbar { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.radio { |
|
||||||
margin-right: 16rpx; |
|
||||||
border-radius: 8rpx; |
|
||||||
border: 1px solid #d0d0d0; |
|
||||||
line-height: 40rpx; |
|
||||||
padding: 0 20rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #aaaaaa; |
|
||||||
white-space: nowrap; |
|
||||||
&.active { |
|
||||||
background-color: #e04775; |
|
||||||
border-color: #e04775; |
|
||||||
color: #fff; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.stepper { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.custom-class { |
|
||||||
border: 1px solid #e5e5e5; |
|
||||||
border-radius: 8rpx; |
|
||||||
} |
|
||||||
.input-class { |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
background-color: #ffffff; |
|
||||||
margin: 0; |
|
||||||
} |
|
||||||
.plus-class, |
|
||||||
.minus-class { |
|
||||||
margin: 0; |
|
||||||
background-color: #f8f8f8; |
|
||||||
} |
|
||||||
.minus-class { |
|
||||||
border-right: 1px solid #d7d7d7; |
|
||||||
} |
|
||||||
.plus-class { |
|
||||||
border-left: 1px solid #d7d7d7; |
|
||||||
} |
|
||||||
.status { |
|
||||||
margin-left: 8rpx; |
|
||||||
font-size: 32rpx; |
|
||||||
color: #e1e1e1; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.row:not(:first-of-type) { |
|
||||||
margin-top: 24rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.module { |
|
||||||
border-top: 1px solid #f2f2f2; |
|
||||||
padding-top: 25rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.wrap { |
|
||||||
.price { |
|
||||||
display: flex; |
|
||||||
align-items: baseline; |
|
||||||
.sub { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
.num { |
|
||||||
font-size: 40rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
} |
|
||||||
.doc { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
font-size: 24rpx; |
|
||||||
color: #999999; |
|
||||||
.checkbox { |
|
||||||
transform: scale(0.7); |
|
||||||
} |
|
||||||
.a { |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.submit { |
|
||||||
width: 298rpx; |
|
||||||
height: 96rpx; |
|
||||||
background: #e04775; |
|
||||||
border-radius: 48rpx; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #ffffff; |
|
||||||
line-height: 96rpx; |
|
||||||
text-align: center; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,150 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
id: "", |
|
||||||
detail: {}, |
|
||||||
specVecItem: {} as any, |
|
||||||
num: 1, |
|
||||||
allPrice: "", |
|
||||||
|
|
||||||
toastShow: false, |
|
||||||
toastType: "giftEnter", |
|
||||||
|
|
||||||
toastParams: { |
|
||||||
doc: "", |
|
||||||
}, |
|
||||||
protocol: false, |
|
||||||
}, |
|
||||||
onLoad(options) { |
|
||||||
this.setData({ |
|
||||||
id: options.id, |
|
||||||
toastParams: { |
|
||||||
doc: `<p style="text-indent: 24pt; line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">为让用户更好的享受再鼎愈见昕生的服务,愈见昕生平台向用户提供了能量兑换服务,并提供了丰富的礼品,平台注册用户可使用有效的能量兑换礼品。</span></p><p style="text-indent: 24pt; line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">愈见昕生的礼品库将提供:</span></p><p style="text-indent: 24pt; line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 微软雅黑;">1) </span><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">查看用户在能量商城选择兑换的商品信息;</span></p><p style="text-indent: 24pt; line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 微软雅黑;">2) </span><span style="color: rgb(89, 89, 89); font-size: 14p ... (very long line, trimmed to 1000 chars)
|
|
||||||
// doc:` <p style="line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">为让用户更好的享受再鼎愈见昕生的服务,愈见昕生平台向用户提供了能量兑换服务,并提供了丰富的礼品,平台注册用户可使用有效的能量兑换礼品。</span></p><p style="line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">愈见昕生的礼品库将提供:</span></p><p style="line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 微软雅黑;">1) </span><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">查看用户在能量商城选择兑换的商品信息;</span></p><p style="line-height: 1.5;"><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 微软雅黑;">2) </span><span style="color: rgb(89, 89, 89); font-size: 14px; font-family: 宋体;">确认兑换商品的订单信息;</span></p>< ... (very long line, trimmed to 1000 chars)
|
|
||||||
}, |
|
||||||
}); |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.setView(); |
|
||||||
this.getDetail(); |
|
||||||
this.getProtocol(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
setView() { |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/gift-spu/set-visit-num", |
|
||||||
data: { spuId: this.data.id }, |
|
||||||
showMsg: false, |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/gift-spu/get-detail", |
|
||||||
data: { |
|
||||||
spuId: this.data.id, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
detail: { |
|
||||||
...res, |
|
||||||
detailList: JSON.parse(res.detail), |
|
||||||
}, |
|
||||||
specVecItem: res.specVec[0], |
|
||||||
allPrice: res.specVec[0].score, |
|
||||||
num: res.specVec[0].stock >= 1 ? 1 : 0, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getProtocol() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/agreement/get-user-agreement", |
|
||||||
data: {}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
protocol: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
setProtocol() { |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/agreement/set-user-agreement", |
|
||||||
data: {}, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSpec(e: any) { |
|
||||||
const { index } = e.currentTarget.dataset; |
|
||||||
const specVecItem: any = this.data.detail.specVec[index]; |
|
||||||
console.log(specVecItem.stock>=1) |
|
||||||
this.setData({ |
|
||||||
specVecItem: specVecItem, |
|
||||||
allPrice: specVecItem.score, |
|
||||||
num: specVecItem.stock >= 1 ? 1 : 0, |
|
||||||
}); |
|
||||||
}, |
|
||||||
onChangeNumber(e: any) { |
|
||||||
this.setData({ |
|
||||||
num: e.detail, |
|
||||||
allPrice: this.data.specVecItem.score * e.detail, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleDoc() { |
|
||||||
this.setData({ |
|
||||||
toastShow: true, |
|
||||||
toastType: "giftEnter", |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleToastOk(e) { |
|
||||||
if (!e.detail.protocol) { |
|
||||||
wx.showToast({ |
|
||||||
title: "请先勾选《用户须知》", |
|
||||||
icon: "none", |
|
||||||
}); |
|
||||||
return; |
|
||||||
} |
|
||||||
this.setProtocol(); |
|
||||||
this.setData({ |
|
||||||
protocol: e.detail.protocol, |
|
||||||
}); |
|
||||||
this.handleToastCancel(); |
|
||||||
}, |
|
||||||
handleToastCancel() { |
|
||||||
this.setData({ |
|
||||||
toastShow: false, |
|
||||||
toastType: "", |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleProtocol() { |
|
||||||
if (!this.data.protocol) { |
|
||||||
this.setProtocol(); |
|
||||||
} |
|
||||||
this.setData({ |
|
||||||
protocol: !this.data.protocol, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSubmit() { |
|
||||||
if (!this.data.protocol) { |
|
||||||
wx.showToast({ |
|
||||||
icon: "none", |
|
||||||
title: "请先同意《用户须知》", |
|
||||||
}); |
|
||||||
return; |
|
||||||
} |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/gift-order/place-order", |
|
||||||
data: { |
|
||||||
giftId: this.data.specVecItem.giftId, |
|
||||||
count: this.data.num, |
|
||||||
}, |
|
||||||
loading: true, |
|
||||||
}).then((res) => { |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/conformOrder/index?id=${res}`, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,80 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view class="banner"> |
|
||||||
<image class="banner-img" mode="aspectFill" src="{{detail.bigImg}}"></image> |
|
||||||
</view> |
|
||||||
<view class="container"> |
|
||||||
<view class="price"> |
|
||||||
<view class="num">{{specVecItem.score}}</view> |
|
||||||
<view class="sub">能量</view> |
|
||||||
</view> |
|
||||||
<view class="title">{{detail.giftName}}</view> |
|
||||||
<view class="list"> |
|
||||||
<view class="list-title">礼品详情</view> |
|
||||||
<image class="list-img" mode="widthFix" wx:for="{{detail.detailList}}" wx:key="index" src="{{item.url}}"></image> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
|
|
||||||
<view class="footer"> |
|
||||||
<view class="options"> |
|
||||||
<view class="row" wx:if="{{detail.specVec.length > 0 && detail.specVec[0].specName}}"> |
|
||||||
<view class="label">规格</view> |
|
||||||
<view class="radios"> |
|
||||||
<view |
|
||||||
class="radio {{specVecItem.giftId==item.giftId && 'active'}}" |
|
||||||
wx:for="{{detail.specVec}}" |
|
||||||
wx:key="index" |
|
||||||
data-index="{{index}}" |
|
||||||
bind:tap="handleSpec" |
|
||||||
> |
|
||||||
{{item.specName }} |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">数量</view> |
|
||||||
<view class="stepper"> |
|
||||||
<van-stepper |
|
||||||
custom-class="custom-class" |
|
||||||
value="{{ num }}" |
|
||||||
min="{{0}}" |
|
||||||
input-width="{{48}}" |
|
||||||
input-class="input-class" |
|
||||||
plus-class="plus-class" |
|
||||||
minus-class="minus-class" |
|
||||||
integer |
|
||||||
disable-input |
|
||||||
bind:change="onChangeNumber" |
|
||||||
disable-plus="{{num>=specVecItem.stock}}" |
|
||||||
/> |
|
||||||
<view class="status" wx:if="{{num<=specVecItem.stock && specVecItem.stock>0 }}">有库存</view> |
|
||||||
<view class="status" wx:else>无库存</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="module"> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="price"> |
|
||||||
<view class="sub"> |
|
||||||
合计 |
|
||||||
<text decode="true"> </text> |
|
||||||
</view> |
|
||||||
<view class="num">{{allPrice}}</view> |
|
||||||
</view> |
|
||||||
<view class="doc"> |
|
||||||
<checkbox class="checkbox" checked="{{protocol}}" color="#DB3E6A" bind:tap="handleProtocol"></checkbox> |
|
||||||
已阅读 |
|
||||||
<view class="a" bind:tap="handleDoc">《用户须知》</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="submit" bind:tap="handleSubmit">立即兑换</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
|
|
||||||
<toast |
|
||||||
show="{{toastShow}}" |
|
||||||
type="{{toastType}}" |
|
||||||
params="{{toastParams}}" |
|
||||||
bind:ok="handleToastOk" |
|
||||||
bind:cancel="handleToastCancel" |
|
||||||
></toast> |
|
||||||
@ -1,8 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "礼品中心", |
|
||||||
"navigationStyle": "custom", |
|
||||||
"usingComponents": { |
|
||||||
"van-icon": "@vant/weapp/icon/index", |
|
||||||
"navBar": "/components/navBar/navBar" |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,185 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #f9f9f9; |
|
||||||
} |
|
||||||
.page { |
|
||||||
.bg { |
|
||||||
width: 100%; |
|
||||||
height: 902rpx; |
|
||||||
} |
|
||||||
.page-container { |
|
||||||
position: absolute; |
|
||||||
left: 0; |
|
||||||
top: 0; |
|
||||||
width: 100%; |
|
||||||
padding: 0 40rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
padding-bottom: 200rpx; |
|
||||||
.notice { |
|
||||||
height: 44rpx; |
|
||||||
background: linear-gradient(90deg, rgba(241, 241, 241, 0) 0%, #f1f1f1 52%, rgba(241, 241, 241, 0) 100%); |
|
||||||
border-radius: 16rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
font-size: 24rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
.icon { |
|
||||||
margin-right: 5rpx; |
|
||||||
width: 30rpx; |
|
||||||
height: 24rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.banner { |
|
||||||
margin-top: 16rpx; |
|
||||||
background: #fafafa; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
border: 2rpx solid rgba(151, 151, 151, 0.14); |
|
||||||
.banner-header { |
|
||||||
padding: 32rpx 0 32rpx 32rpx; |
|
||||||
display: flex; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
border-bottom: 2rpx solid rgba(151, 151, 151, 0.14); |
|
||||||
display: flex; |
|
||||||
.user { |
|
||||||
width: 106rpx; |
|
||||||
height: 106rpx; |
|
||||||
border-radius: 50%; |
|
||||||
} |
|
||||||
.wrap { |
|
||||||
flex: 1; |
|
||||||
padding: 0 150rpx 0 22rpx; |
|
||||||
.title { |
|
||||||
font-size: 24rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
} |
|
||||||
.price { |
|
||||||
font-size: 48rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
} |
|
||||||
.rule { |
|
||||||
font-size: 24rpx; |
|
||||||
color: #ffffff; |
|
||||||
width: 136rpx; |
|
||||||
height: 44rpx; |
|
||||||
background: #f5ab1f; |
|
||||||
border-radius: 24rpx 0 0 24rpx; |
|
||||||
text-align: center; |
|
||||||
line-height: 44rpx; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
} |
|
||||||
.banner-footer { |
|
||||||
padding: 20rpx 0 28rpx; |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
.ver-line { |
|
||||||
width: 2rpx; |
|
||||||
height: 40rpx; |
|
||||||
background-color: rgba(221, 221, 221, 0.6); |
|
||||||
} |
|
||||||
.option { |
|
||||||
flex: 1; |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
align-items: center; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #484848; |
|
||||||
font-weight: bold; |
|
||||||
.icon { |
|
||||||
margin-right: 22rpx; |
|
||||||
width: 50rpx; |
|
||||||
height: 50rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.list { |
|
||||||
margin-top: 48rpx; |
|
||||||
.list-title { |
|
||||||
margin-bottom: 20rpx; |
|
||||||
width: 180rpx; |
|
||||||
height: 40rpx; |
|
||||||
} |
|
||||||
.list-cate { |
|
||||||
padding: 20rpx 0; |
|
||||||
display: flex; |
|
||||||
flex-wrap: nowrap; |
|
||||||
max-width: 100vw; |
|
||||||
box-sizing: border-box; |
|
||||||
overflow-x: auto; |
|
||||||
&::-webkit-scrollbar { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.cate { |
|
||||||
margin-right: 20rpx; |
|
||||||
padding: 10rpx 24rpx; |
|
||||||
white-space: nowrap; |
|
||||||
line-height: 1; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #484848; |
|
||||||
background-color: #f2f2f2; |
|
||||||
border-radius: 24rpx; |
|
||||||
&.active { |
|
||||||
color: #fff; |
|
||||||
background-color: #e04775; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.list-container { |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 16rpx 22rpx; |
|
||||||
.list-item { |
|
||||||
margin-bottom: 16rpx; |
|
||||||
width: 324rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
.photo { |
|
||||||
border-radius: 24rpx 24rpx 0 0; |
|
||||||
width: 100%; |
|
||||||
height: 324rpx; |
|
||||||
} |
|
||||||
.content { |
|
||||||
padding: 18rpx 20rpx 22rpx; |
|
||||||
.title { |
|
||||||
margin-top: 18rpx; |
|
||||||
font-size: 32rpx; |
|
||||||
color: #484848; |
|
||||||
font-weight: bold; |
|
||||||
overflow: hidden; |
|
||||||
white-space: nowrap; |
|
||||||
text-overflow: ellipsis; |
|
||||||
} |
|
||||||
.footer { |
|
||||||
margin-top: 6rpx; |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
.price { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
.btn { |
|
||||||
width: 100rpx; |
|
||||||
height: 44rpx; |
|
||||||
text-align: center; |
|
||||||
line-height: 44rpx; |
|
||||||
font-size: 24rpx; |
|
||||||
color: #ffffff; |
|
||||||
background: #e04775; |
|
||||||
border-radius: 24rpx; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,114 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
bottom: 0, |
|
||||||
selfScore: { |
|
||||||
expire: {}, |
|
||||||
}, |
|
||||||
cateList: [], |
|
||||||
|
|
||||||
cateId: "", |
|
||||||
list: [], |
|
||||||
pagination: { |
|
||||||
page: 1, |
|
||||||
pages: 1, |
|
||||||
count: 1, |
|
||||||
}, |
|
||||||
}, |
|
||||||
onLoad() { |
|
||||||
const SystemInfo = app.globalSystemInfo; |
|
||||||
if (SystemInfo) { |
|
||||||
const { bottom } = SystemInfo.capsulePosition; |
|
||||||
this.setData({ |
|
||||||
bottom: bottom, |
|
||||||
}); |
|
||||||
} |
|
||||||
app.waitLogin().then(() => { |
|
||||||
app.getUserInfo(this, true); |
|
||||||
this.getScore(); |
|
||||||
this.getList(); |
|
||||||
this.getCateList(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getScore() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-score/get-self-score", |
|
||||||
data: {}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
selfScore: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getCateList() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/gift-spu/get-cate-all-list", |
|
||||||
data: {}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
cateList: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleCate(e) { |
|
||||||
const { id } = e.currentTarget.dataset; |
|
||||||
this.setData({ |
|
||||||
cateId: id, |
|
||||||
}); |
|
||||||
this.getList(); |
|
||||||
}, |
|
||||||
getList(newPage = 1) { |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: `?r=igg4/gift-spu/get-list&page=${newPage}`, |
|
||||||
data: { |
|
||||||
cateId: this.data.cateId ? [this.data.cateId] : [], |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
let list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; |
|
||||||
this.setData({ |
|
||||||
list: list, |
|
||||||
pagination: { |
|
||||||
page: res.page, |
|
||||||
pages: res.pages, |
|
||||||
count: res.count, |
|
||||||
}, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handlePirceDetail() { |
|
||||||
wx.navigateTo({ |
|
||||||
url: "/gift/pages/priceDetail/index", |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleMyGift() { |
|
||||||
wx.navigateTo({ |
|
||||||
url: "/gift/pages/myGift/index", |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleDetail(e) { |
|
||||||
const { id } = e.currentTarget.dataset; |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/giftDetail/index?id=${id}`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleRule() { |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/scoreRule/index`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleBack() { |
|
||||||
wx.reLaunch({ |
|
||||||
url: "/pages/my/index", |
|
||||||
}); |
|
||||||
}, |
|
||||||
onReachBottom() { |
|
||||||
const { page, pages } = this.data.pagination; |
|
||||||
if (pages > page) { |
|
||||||
this.getList(page + 1); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,51 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<navBar color="#222222" background="{{background}}" fixed title="礼品中心" back bind:back="handleBack"></navBar> |
|
||||||
<image class="bg" src="{{imageUrl}}1/my-bg.png?t={{Timestamp}}"></image> |
|
||||||
<view class="page-container" style="padding-top:{{bottom+26}}px"> |
|
||||||
<view class="notice" wx:if="{{selfScore.expire.expireStatus==1}}"> |
|
||||||
<image class="icon" src="{{imageUrl}}2/notice.png?t={{Timestamp}}"></image> |
|
||||||
你有{{selfScore.expire.expireScore}}能量将于7月1日过期 |
|
||||||
</view> |
|
||||||
<view class="banner"> |
|
||||||
<view class="banner-header"> |
|
||||||
<image class="user" src="{{userInfo.UserImg}}"></image> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="title">我的能量</view> |
|
||||||
<view class="price">{{selfScore.score}}</view> |
|
||||||
</view> |
|
||||||
<view class="rule" bind:tap="handleRule">能量规则</view> |
|
||||||
</view> |
|
||||||
<view class="banner-footer"> |
|
||||||
<view class="option" bind:tap="handlePirceDetail"> |
|
||||||
<image class="icon" style="width:52rpx;height: 50rpx;" src="{{imageUrl}}2/money.png?t={{Timestamp}}"></image> |
|
||||||
能量明细 |
|
||||||
</view> |
|
||||||
<view class="ver-line"></view> |
|
||||||
<view class="option" bind:tap="handleMyGift"> |
|
||||||
<image class="icon" style="width:48rpx;height: 54rpx;" src="{{imageUrl}}2/gift.png?t={{Timestamp}}"></image> |
|
||||||
我的礼品 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="list"> |
|
||||||
<image class="list-title" src="{{imageUrl}}2/gift-list-title.png?t={{Timestamp}}"></image> |
|
||||||
<view class="list-cate"> |
|
||||||
<view class="cate {{!cateId && 'active'}}" data-id="" bind:tap="handleCate">全部</view> |
|
||||||
<view class="cate {{cateId == item.cateId && 'active'}}" wx:for="{{cateList}}" wx:key="cateId" data-id="{{item.cateId}}" bind:tap="handleCate">{{item.cateName}}</view> |
|
||||||
</view> |
|
||||||
<view class="list-container"> |
|
||||||
<view class="list-item" wx:for="{{list}}" wx:key="index" data-id="{{item.spuId}}" bind:tap="handleDetail"> |
|
||||||
<image class="photo" src="{{item.bigImg}}"></image> |
|
||||||
<view class="content"> |
|
||||||
<view class="title">{{item.giftName}}</view> |
|
||||||
<view class="footer"> |
|
||||||
<view class="price">{{item.lowestScore}}能量</view> |
|
||||||
<view class="btn">兑换</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<pagination pagination="{{pagination}}"></pagination> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "我的礼品", |
|
||||||
"usingComponents": {} |
|
||||||
} |
|
||||||
@ -1,110 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #f7f7f7; |
|
||||||
} |
|
||||||
.page { |
|
||||||
padding: 32rpx 40rpx; |
|
||||||
.card { |
|
||||||
margin-bottom: 16rpx; |
|
||||||
padding: 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
border-radius: 24rpx; |
|
||||||
.header { |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
padding-bottom: 32rpx; |
|
||||||
border-bottom: 1px solid #ebebeb; |
|
||||||
.on { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #bbbcbe; |
|
||||||
} |
|
||||||
.status { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #e04775; |
|
||||||
} |
|
||||||
.suc { |
|
||||||
color: #24d8c8; |
|
||||||
} |
|
||||||
} |
|
||||||
.shop { |
|
||||||
padding: 32rpx 0; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.shop-img { |
|
||||||
flex-shrink: 0; |
|
||||||
width: 200rpx; |
|
||||||
height: 200rpx; |
|
||||||
border-radius: 24rpx; |
|
||||||
} |
|
||||||
.wrap { |
|
||||||
flex: 1; |
|
||||||
padding-left: 24rpx; |
|
||||||
.name { |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: bold; |
|
||||||
color: #3f3f3f; |
|
||||||
line-height: 44rpx; |
|
||||||
min-width: 0; |
|
||||||
overflow: hidden; |
|
||||||
text-overflow: ellipsis; |
|
||||||
display: -webkit-box; |
|
||||||
-webkit-line-clamp: 2; |
|
||||||
-webkit-box-orient: vertical; |
|
||||||
} |
|
||||||
.specification { |
|
||||||
display: inline-block; |
|
||||||
margin-top: 8rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
border-radius: 10rpx; |
|
||||||
} |
|
||||||
.price { |
|
||||||
margin-top: 14rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.num { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
.sub { |
|
||||||
font-size: 22rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.val { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.footer { |
|
||||||
border-top: 1px solid #ebebeb; |
|
||||||
padding-top: 32rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.content { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #bbbcbe; |
|
||||||
display: flex; |
|
||||||
align-items: baseline; |
|
||||||
.num { |
|
||||||
font-size: 42rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
} |
|
||||||
.btn { |
|
||||||
width: 152rpx; |
|
||||||
height: 52rpx; |
|
||||||
border-radius: 8rpx; |
|
||||||
border: 1rpx solid rgba(158, 158, 158, 0.42); |
|
||||||
font-size: 28rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
text-align: center; |
|
||||||
line-height: 52rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,48 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
list: [], |
|
||||||
pagination: { |
|
||||||
page: 1, |
|
||||||
pages: 1, |
|
||||||
count: 1, |
|
||||||
}, |
|
||||||
}, |
|
||||||
onLoad() { |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getList(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getList(newPage = 1) { |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/gift-order/get-order-list", |
|
||||||
data: { |
|
||||||
page: newPage, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
let list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; |
|
||||||
this.setData({ |
|
||||||
list: list, |
|
||||||
pagination: { |
|
||||||
page: res.page, |
|
||||||
pages: res.pages, |
|
||||||
count: res.count, |
|
||||||
}, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleDetail(e: any) { |
|
||||||
const { id } = e.currentTarget.dataset; |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/orderDetail/index?id=${id}`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
onReachBottom() { |
|
||||||
const { page, pages } = this.data.pagination; |
|
||||||
if (pages > page) { |
|
||||||
this.getList(page + 1); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,28 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view class="card" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-id="{{item.orderId}}"> |
|
||||||
<view class="header"> |
|
||||||
<view class="on">订单号:{{item.orderNo}}</view> |
|
||||||
<view class="status" wx:if="{{item.status==2}}">{{item.statusName}}</view> |
|
||||||
<view class="status suc" wx:else>{{item.statusName}}</view> |
|
||||||
</view> |
|
||||||
<view class="shop"> |
|
||||||
<image class="shop-img" src="{{item.giftBigImg}}"></image> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="name">{{item.giftName}}</view> |
|
||||||
<view class="specification" wx:if="{{item.specName}}">规格:{{item.specName}}</view> |
|
||||||
<view class="price"> |
|
||||||
<view class="num">{{item.giftScore}}<text class="sub">能量</text></view> |
|
||||||
<view class="val">x{{item.orderCount}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="footer"> |
|
||||||
<view class="content"> |
|
||||||
共{{item.orderCount}}件 消耗能量: |
|
||||||
<view class="num">{{item.orderScore}}</view> |
|
||||||
</view> |
|
||||||
<view class="btn" wx:if="{{item.status==3}}">查看物流</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<pagination pagination="{{pagination}}"></pagination> |
|
||||||
</view> |
|
||||||
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "订单详情", |
|
||||||
"usingComponents": {} |
|
||||||
} |
|
||||||
@ -1,129 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #f7f7f7; |
|
||||||
} |
|
||||||
.page { |
|
||||||
padding: 40rpx; |
|
||||||
.status-line { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
font-size: 40rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
.icon { |
|
||||||
margin-right: 16rpx; |
|
||||||
width: 48rpx; |
|
||||||
height: 50rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.site { |
|
||||||
margin-top: 26rpx; |
|
||||||
padding: 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
border-radius: 24rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.icon { |
|
||||||
margin-right: 16rpx; |
|
||||||
flex-shrink: 0; |
|
||||||
width: 44rpx; |
|
||||||
height: 44rpx; |
|
||||||
} |
|
||||||
.wrap { |
|
||||||
.title { |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: bold; |
|
||||||
color: #3f3f3f; |
|
||||||
} |
|
||||||
.content { |
|
||||||
margin-top: 12rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #bebfc1; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.shop { |
|
||||||
margin-top: 16rpx; |
|
||||||
padding: 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
border-radius: 24rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.shop-img { |
|
||||||
flex-shrink: 0; |
|
||||||
width: 204rpx; |
|
||||||
height: 204rpx; |
|
||||||
border-radius: 24rpx; |
|
||||||
} |
|
||||||
.wrap { |
|
||||||
flex: 1; |
|
||||||
padding-left: 24rpx; |
|
||||||
.name { |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: bold; |
|
||||||
color: #3f3f3f; |
|
||||||
line-height: 44rpx; |
|
||||||
min-width: 0; |
|
||||||
overflow: hidden; |
|
||||||
text-overflow: ellipsis; |
|
||||||
display: -webkit-box; |
|
||||||
-webkit-line-clamp: 2; |
|
||||||
-webkit-box-orient: vertical; |
|
||||||
} |
|
||||||
.specification { |
|
||||||
display: inline-block; |
|
||||||
margin-top: 8rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
border-radius: 10rpx; |
|
||||||
} |
|
||||||
.price { |
|
||||||
margin-top: 14rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.num { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
.sub { |
|
||||||
font-size: 22rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.val { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #b6b7ba; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.detail { |
|
||||||
margin-top: 16rpx; |
|
||||||
padding: 8rpx 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
border-radius: 24rpx; |
|
||||||
.row { |
|
||||||
padding: 24rpx 0; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
.label { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #bbbcbe; |
|
||||||
} |
|
||||||
.content { |
|
||||||
padding-left: 46rpx; |
|
||||||
flex: 1; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
&.yellow { |
|
||||||
color: #f5ad1d; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.row:not(:first-of-type) { |
|
||||||
border-top: 1rpx solid #ebebeb; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,29 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
id: "", |
|
||||||
detail: {}, |
|
||||||
}, |
|
||||||
onLoad(options) { |
|
||||||
this.setData({ |
|
||||||
id: options.id, |
|
||||||
}); |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getDetail(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/gift-order/get-order-detail", |
|
||||||
data: { |
|
||||||
orderId: this.data.id, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
detail: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,54 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view class="status-line"> |
|
||||||
<image class="icon" src="{{imageUrl}}2/order-status1.png?t={{Timestamp}}"></image> |
|
||||||
{{detail.statusName}} |
|
||||||
</view> |
|
||||||
<view class="site"> |
|
||||||
<image class="icon" src="{{imageUrl}}2/order-site.png?t={{Timestamp}}"></image> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="title">{{detail.receiveUserName}} {{detail.receiveTelephone}}</view> |
|
||||||
<view class="content">{{detail.receiveAddress}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="shop"> |
|
||||||
<image class="shop-img" src="{{detail.giftBigImg}}"></image> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="name">{{detail.giftName}}</view> |
|
||||||
<view class="specification" wx:if="{{detail.specName}}">规格:{{detail.specName}}</view> |
|
||||||
<view class="price"> |
|
||||||
<view class="num">{{detail.giftScore}}<text class="sub">能量</text></view> |
|
||||||
<view class="val">x{{detail.orderCount}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="detail"> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">消耗能量</view> |
|
||||||
<view class="content">{{detail.orderScore}}</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">订单编号</view> |
|
||||||
<view class="content">{{detail.orderNo}}</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">客服电话</view> |
|
||||||
<view class="content">{{detail.serviceTel}}</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">创建时间</view> |
|
||||||
<view class="content">{{detail.orderTime}}</view> |
|
||||||
</view> |
|
||||||
<view class="row" wx:if="{{detail.status==3}}"> |
|
||||||
<view class="label">发货时间</view> |
|
||||||
<view class="content">{{detail.sendTime}}</view> |
|
||||||
</view> |
|
||||||
<view class="row" wx:if="{{detail.status==3}}"> |
|
||||||
<view class="label">物流公司</view> |
|
||||||
<view class="content">{{detail.logisticsCompany}}</view> |
|
||||||
</view> |
|
||||||
<view class="row" wx:if="{{detail.status==3}}"> |
|
||||||
<view class="label">物流单号</view> |
|
||||||
<view class="content">{{detail.logisticsOrderNo}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "下单成功", |
|
||||||
"usingComponents": {} |
|
||||||
} |
|
||||||
@ -1,40 +0,0 @@ |
|||||||
.page { |
|
||||||
text-align: center; |
|
||||||
.content-img { |
|
||||||
margin-top: 196rpx; |
|
||||||
width: 454rpx; |
|
||||||
height: 356rpx; |
|
||||||
} |
|
||||||
.title { |
|
||||||
margin-top: -80rpx; |
|
||||||
font-size: 44rpx; |
|
||||||
color: #e04775; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.order-no { |
|
||||||
margin-top: 16rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #9b9ea6; |
|
||||||
} |
|
||||||
.detail-btn-bd { |
|
||||||
margin: 64rpx auto 0; |
|
||||||
width: 422rpx; |
|
||||||
height: 96rpx; |
|
||||||
background: #fff; |
|
||||||
border-radius: 48rpx; |
|
||||||
line-height: 96rpx; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #e04775; |
|
||||||
border: 4rpx solid #e04775; |
|
||||||
} |
|
||||||
.detail-btn { |
|
||||||
margin: 64rpx auto 0; |
|
||||||
width: 422rpx; |
|
||||||
height: 96rpx; |
|
||||||
background: #e04775; |
|
||||||
border-radius: 48rpx; |
|
||||||
line-height: 96rpx; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #ffffff; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,39 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
id: "", |
|
||||||
detail: {}, |
|
||||||
}, |
|
||||||
onLoad(options) { |
|
||||||
this.setData({ |
|
||||||
id: options.id, |
|
||||||
}); |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getDetail(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/gift-order/get-order-detail", |
|
||||||
data: { |
|
||||||
orderId: this.data.id, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
detail: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleDetail() { |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/orderDetail/index?id=${this.data.id}`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleGift() { |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/giftList/index`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,7 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<image class="content-img" src="{{imageUrl}}2/order-end.png?t={{Timestamp}}"></image> |
|
||||||
<view class="title">下单成功</view> |
|
||||||
<view class="order-no">订单号:{{detail.orderNo}}</view> |
|
||||||
<view class="detail-btn-bd" bind:tap="handleDetail">查看订单详情</view> |
|
||||||
<view class="detail-btn" bind:tap="handleGift">返回礼品中心</view> |
|
||||||
</view> |
|
||||||
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "能量明细", |
|
||||||
"usingComponents": {} |
|
||||||
} |
|
||||||
@ -1,78 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #fafafa; |
|
||||||
} |
|
||||||
|
|
||||||
.page { |
|
||||||
padding: 48rpx 40rpx 120rpx; |
|
||||||
.banner { |
|
||||||
position: relative; |
|
||||||
padding: 46rpx 48rpx; |
|
||||||
background-color: #e6658d; |
|
||||||
border-radius: 24rpx; |
|
||||||
.title { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #ffffff; |
|
||||||
} |
|
||||||
.num { |
|
||||||
font-size: 64rpx; |
|
||||||
color: 1897; |
|
||||||
font-weight: bold; |
|
||||||
color: #fff; |
|
||||||
} |
|
||||||
.icon{ |
|
||||||
position: absolute; |
|
||||||
top: 40rpx; |
|
||||||
right: 40rpx; |
|
||||||
width: 124rpx; |
|
||||||
height: 122rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.list { |
|
||||||
margin-top: 48rpx; |
|
||||||
.list-title { |
|
||||||
font-size: 36rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
&::before { |
|
||||||
margin-right: 16rpx; |
|
||||||
display: inline-block; |
|
||||||
content: ""; |
|
||||||
width: 12rpx; |
|
||||||
height: 44rpx; |
|
||||||
background: #e04775; |
|
||||||
vertical-align: middle; |
|
||||||
border-radius: 0rpx 8rpx 8rpx 0rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.list-container { |
|
||||||
padding: 0 30rpx; |
|
||||||
margin-top: 20rpx; |
|
||||||
background: #ffffff; |
|
||||||
border-radius: 24rpx; |
|
||||||
.row { |
|
||||||
padding: 30rpx 0; |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
.wrap { |
|
||||||
.title { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
} |
|
||||||
.date { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #bbbcbe; |
|
||||||
} |
|
||||||
} |
|
||||||
.price { |
|
||||||
margin-left: 10rpx; |
|
||||||
flex-shrink: 0; |
|
||||||
font-size: 40rpx; |
|
||||||
color: #f5ad1d; |
|
||||||
} |
|
||||||
} |
|
||||||
.row:not(:last-of-type) { |
|
||||||
border-bottom: 1px solid #ebebeb; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,53 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
score: 0, |
|
||||||
list: [], |
|
||||||
pagination: { |
|
||||||
page: 1, |
|
||||||
pages: 1, |
|
||||||
count: 1, |
|
||||||
}, |
|
||||||
}, |
|
||||||
onLoad() { |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getList(); |
|
||||||
this.getDetail() |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-score/get-self-score", |
|
||||||
data: {}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
score: res.score, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getList(newPage = 1) { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-score/get-self-record-list", |
|
||||||
data: { page: newPage }, |
|
||||||
}).then((res) => { |
|
||||||
let list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; |
|
||||||
this.setData({ |
|
||||||
list: list, |
|
||||||
pagination: { |
|
||||||
page: res.page, |
|
||||||
pages: res.pages, |
|
||||||
count: res.count, |
|
||||||
}, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
onReachBottom() { |
|
||||||
const { page, pages } = this.data.pagination; |
|
||||||
if (pages > page) { |
|
||||||
this.getList(page + 1); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,26 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view |
|
||||||
class="banner" |
|
||||||
style="background: url({{imageUrl}}/2/price-detail-banner-bg.png?t={{Timestamp}}) no-repeat top center / 100%;" |
|
||||||
> |
|
||||||
<view class="title">当前能量</view> |
|
||||||
<view class="num">{{score}}</view> |
|
||||||
<image class="icon" src="{{imageUrl}}2/big-money.png?t={{Timestamp}}"></image> |
|
||||||
</view> |
|
||||||
<view class="list"> |
|
||||||
<view class="list-title">能量收支明细</view> |
|
||||||
<view class="list-container"> |
|
||||||
<view class="row" wx:for="{{list}}" wx:key="index"> |
|
||||||
<view class="wrap"> |
|
||||||
<view class="title"> |
|
||||||
{{item.recordTypeName}} |
|
||||||
<block wx:if="{{item.recordType==51}}">:{{item.giftName}}</block> |
|
||||||
</view> |
|
||||||
<view class="date">{{item.createTime}}</view> |
|
||||||
</view> |
|
||||||
<view class="price">{{item.scoreChange}}</view> |
|
||||||
</view> |
|
||||||
<pagination pagination="{{pagination}}"></pagination> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
@ -1,7 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "能量规则", |
|
||||||
"navigationStyle": "custom", |
|
||||||
"usingComponents": { |
|
||||||
"navBar": "/components/navBar/navBar" |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,139 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #f5f5f5; |
|
||||||
} |
|
||||||
.page { |
|
||||||
padding: 200rpx 40rpx 80rpx; |
|
||||||
.banner { |
|
||||||
position: relative; |
|
||||||
.b-title { |
|
||||||
position: absolute; |
|
||||||
left: 50%; |
|
||||||
top: 0; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
width: 310rpx; |
|
||||||
height: 86rpx; |
|
||||||
} |
|
||||||
.b-content { |
|
||||||
padding: 72rpx 30rpx 36rpx; |
|
||||||
background: #fbf0f3; |
|
||||||
box-shadow: 0rpx 14rpx 32rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
border: 2rpx solid rgba(224, 71, 117, 0.52); |
|
||||||
} |
|
||||||
} |
|
||||||
.list { |
|
||||||
margin-top: 78rpx; |
|
||||||
padding: 76rpx 30rpx; |
|
||||||
background: #ffffff; |
|
||||||
box-shadow: 0rpx 14rpx 32rpx 0rpx rgba(0, 0, 0, 0.05); |
|
||||||
border-radius: 24rpx; |
|
||||||
position: relative; |
|
||||||
.l-title { |
|
||||||
position: absolute; |
|
||||||
left: 50%; |
|
||||||
top: 0; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
width: 310rpx; |
|
||||||
height: 86rpx; |
|
||||||
} |
|
||||||
.l-tip { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #333333; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.module { |
|
||||||
.m-title { |
|
||||||
position: relative; |
|
||||||
margin: 26rpx 96rpx 0 16rpx; |
|
||||||
line-height: 60rpx; |
|
||||||
padding: 0 24rpx; |
|
||||||
background: linear-gradient(270deg, rgba(242, 125, 173, 0) 0%, rgba(224, 71, 117, 0.87) 57%, #e04775 100%); |
|
||||||
font-size: 28rpx; |
|
||||||
color: #ffffff; |
|
||||||
font-weight: bold; |
|
||||||
.num { |
|
||||||
position: absolute; |
|
||||||
left: 0; |
|
||||||
top: 0; |
|
||||||
transform: translate(-100%, 0); |
|
||||||
width: 60rpx; |
|
||||||
height: 60rpx; |
|
||||||
background-color: #24d8c8; |
|
||||||
text-align: center; |
|
||||||
line-height: 60rpx; |
|
||||||
&::before { |
|
||||||
position: absolute; |
|
||||||
top: -6rpx; |
|
||||||
left: 0; |
|
||||||
content: ""; |
|
||||||
width: 0; |
|
||||||
height: 0; |
|
||||||
border-style: solid; |
|
||||||
border-width: 0 0 6rpx 14rpx; |
|
||||||
border-color: transparent transparent #007167 transparent; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.m-content { |
|
||||||
margin-top: 24rpx; |
|
||||||
padding: 32rpx 30rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #666666; |
|
||||||
border-radius: 16rpx; |
|
||||||
background-color: #f5f5f5; |
|
||||||
} |
|
||||||
.ul { |
|
||||||
.ol { |
|
||||||
margin-top: 34rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #666666; |
|
||||||
.o-title { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #666666; |
|
||||||
font-weight: bold; |
|
||||||
margin-bottom: 12rpx; |
|
||||||
display: flex; |
|
||||||
.o-num { |
|
||||||
margin-right: 12rpx; |
|
||||||
flex-shrink: 0; |
|
||||||
width: 34rpx; |
|
||||||
height: 34rpx; |
|
||||||
font-size: 24rpx; |
|
||||||
color: #ffffff; |
|
||||||
background-color: #e04775; |
|
||||||
text-align: center; |
|
||||||
line-height: 34rpx; |
|
||||||
border-radius: 50%; |
|
||||||
} |
|
||||||
} |
|
||||||
&.no-title { |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.tip { |
|
||||||
margin-top: 32rpx; |
|
||||||
.t-title { |
|
||||||
font-size: 32rpx; |
|
||||||
color: #666666; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 1; |
|
||||||
&::before { |
|
||||||
margin-right: 16rpx; |
|
||||||
display: inline-block; |
|
||||||
vertical-align: middle; |
|
||||||
content: ""; |
|
||||||
width: 10rpx; |
|
||||||
height: 34rpx; |
|
||||||
background-color: #e04775; |
|
||||||
} |
|
||||||
} |
|
||||||
.t-content { |
|
||||||
margin-top: 10rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #666666; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,33 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
list: [], |
|
||||||
}, |
|
||||||
onLoad() { |
|
||||||
const SystemInfo = app.globalSystemInfo; |
|
||||||
if (SystemInfo) { |
|
||||||
const { bottom } = SystemInfo.capsulePosition; |
|
||||||
this.setData({ |
|
||||||
bottom: bottom, |
|
||||||
}); |
|
||||||
} |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getDetail(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-score/get-score-explain", |
|
||||||
data: {}, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
list: res, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleBack() { |
|
||||||
wx.navigateBack(); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,59 +0,0 @@ |
|||||||
<view class="page" style="background:url({{imageUrl}}2/score-rule-bg.png?t={{Timestamp}}) no-repeat top center / 100%"> |
|
||||||
<navBar fixed title="" home="{{false}}" back bind:back="handleBack"></navBar> |
|
||||||
<view class="page-container" style="padding-top:{{bottom+26}}px"> |
|
||||||
<view class="banner"> |
|
||||||
<image class="b-title" src="{{imageUrl}}2/score-rule-title1.png?t={{Timestamp}}"></image> |
|
||||||
<view class="b-content">{{ list[0].content }}</view> |
|
||||||
</view> |
|
||||||
<view class="list"> |
|
||||||
<image class="l-title" src="{{imageUrl}}2/score-rule-title2.png?t={{Timestamp}}"></image> |
|
||||||
<view class="l-tip">{{list[1].content}}</view> |
|
||||||
<view class="module" wx:for="{{list[1].children}}" wx:key="index"> |
|
||||||
<view class="m-title"> |
|
||||||
<view class="num">{{index+1}}</view> |
|
||||||
{{item.title}} |
|
||||||
</view> |
|
||||||
<view class="m-content" wx:if="{{item.content}}">{{item.content}}</view> |
|
||||||
<view class="ul" wx:if="{{item.children.length}}"> |
|
||||||
<view |
|
||||||
class="ol {{!subItem.title && 'no-title'}}" |
|
||||||
wx:for="{{item.children}}" |
|
||||||
wx:for-item="subItem" |
|
||||||
wx:for-index="subIndex" |
|
||||||
wx:key="subIndex" |
|
||||||
> |
|
||||||
<view class="o-title"> |
|
||||||
<view class="o-num">{{subIndex+1}}</view> |
|
||||||
{{subItem.title}} |
|
||||||
</view> |
|
||||||
{{subItem.content}} |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="list"> |
|
||||||
<image class="l-title" src="{{imageUrl}}2/score-rule-title3.png?t={{Timestamp}}" style="width: 328rpx"></image> |
|
||||||
<view class="l-tip">{{list[2].content}}</view> |
|
||||||
<view class="module" wx:for="{{list[2].children}}" wx:key="index"> |
|
||||||
<view class="m-title" wx:if="{{item.title}}"> |
|
||||||
<view class="num">{{index+1}}</view> |
|
||||||
{{item.title}} |
|
||||||
</view> |
|
||||||
<view class="m-content" wx:if="{{item.content}}">{{item.content}}</view> |
|
||||||
<view class="ul" wx:if="{{item.children.length}}"> |
|
||||||
<view class="ol" wx:for="{{item.children}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex"> |
|
||||||
<view class="o-title"> |
|
||||||
<view class="o-num">{{subIndex+1}}</view> |
|
||||||
{{subItem.title}} |
|
||||||
</view> |
|
||||||
{{subItem.content}} |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="tip"> |
|
||||||
<view class="t-title">{{list[3].title}}</view> |
|
||||||
<view class="t-content">{{list[3].content}}</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
@ -1,8 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "添加收货地址", |
|
||||||
"usingComponents": { |
|
||||||
"van-switch": "@vant/weapp/switch/index", |
|
||||||
"van-popup": "@vant/weapp/popup/index", |
|
||||||
"van-cascader": "@vant/weapp/cascader/index" |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,96 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #f7f7f7; |
|
||||||
} |
|
||||||
|
|
||||||
.page { |
|
||||||
padding: 40rpx; |
|
||||||
.form { |
|
||||||
padding: 0 32rpx; |
|
||||||
background-color: #fff; |
|
||||||
border-radius: 24rpx; |
|
||||||
.row { |
|
||||||
padding: 32rpx 0; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.label { |
|
||||||
flex-shrink: 0; |
|
||||||
width: 4em; |
|
||||||
font-size: 32rpx; |
|
||||||
color: #3f3f3f; |
|
||||||
font-weight: bold; |
|
||||||
} |
|
||||||
.content { |
|
||||||
flex: 1; |
|
||||||
padding-left: 18rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.input { |
|
||||||
flex: 1; |
|
||||||
font-size: 32rpx; |
|
||||||
} |
|
||||||
.place-input { |
|
||||||
color: #bbbcbe; |
|
||||||
} |
|
||||||
.site { |
|
||||||
border-left: 2rpx solid rgba(170, 170, 170, 0.3); |
|
||||||
padding-left: 16rpx; |
|
||||||
font-size: 32rpx; |
|
||||||
color: #e04775; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.icon { |
|
||||||
margin-right: 10rpx; |
|
||||||
width: 36rpx; |
|
||||||
height: 36rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.row:not(:last-of-type) { |
|
||||||
border-bottom: 1rpx solid #edeff3; |
|
||||||
} |
|
||||||
} |
|
||||||
.default { |
|
||||||
margin-top: 16rpx; |
|
||||||
padding: 26rpx 32rpx; |
|
||||||
background-color: #fff; |
|
||||||
border-radius: 24rpx; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
} |
|
||||||
.footer { |
|
||||||
padding: 40rpx; |
|
||||||
position: fixed; |
|
||||||
left: 0; |
|
||||||
bottom: 0; |
|
||||||
width: 100vw; |
|
||||||
box-sizing: border-box; |
|
||||||
bottom: 248rpx; |
|
||||||
display: flex; |
|
||||||
.cancel { |
|
||||||
margin-right: 32rpx; |
|
||||||
flex-shrink: 0; |
|
||||||
width: 248rpx; |
|
||||||
height: 96rpx; |
|
||||||
border-radius: 48rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
line-height: 92rpx; |
|
||||||
text-align: center; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #e04775; |
|
||||||
border: 2rpx solid #e04775; |
|
||||||
} |
|
||||||
.submit { |
|
||||||
flex: 1; |
|
||||||
height: 96rpx; |
|
||||||
background: #e04775; |
|
||||||
border-radius: 48rpx; |
|
||||||
text-align: center; |
|
||||||
line-height: 96rpx; |
|
||||||
text-align: center; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #ffffff; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,272 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
LAT: "", |
|
||||||
LNG: "", |
|
||||||
|
|
||||||
addressId: "", |
|
||||||
receiveUserName: "", |
|
||||||
receiveTelephone: "", |
|
||||||
address: "", |
|
||||||
isDefault: false, |
|
||||||
provinceName: "", |
|
||||||
provinceId: "", |
|
||||||
cityId: "", |
|
||||||
cityName: "", |
|
||||||
countyId: "", |
|
||||||
countyName: "", |
|
||||||
|
|
||||||
pcc: "", |
|
||||||
|
|
||||||
cascaderShow: false, |
|
||||||
options: [], |
|
||||||
areaValue: [] as number[], |
|
||||||
cascaderValue: "", |
|
||||||
fieldNames: { text: "label", value: "value", children: "children" }, |
|
||||||
}, |
|
||||||
onLoad(options) { |
|
||||||
if (options.id) { |
|
||||||
wx.setNavigationBarTitle({ |
|
||||||
title: "编辑收货地址", |
|
||||||
}); |
|
||||||
this.setData({ |
|
||||||
addressId: options.id, |
|
||||||
}); |
|
||||||
} |
|
||||||
app.waitLogin().then((_res) => { |
|
||||||
this.getArea(); |
|
||||||
if (options.id) { |
|
||||||
this.getDetail(); |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
getDetail() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-address/get-address-detail", |
|
||||||
data: { |
|
||||||
addressId: this.data.addressId, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
console.log("res: ", res); |
|
||||||
this.setData({ |
|
||||||
...res, |
|
||||||
isDefault: res.isDefault == 1 ? true : false, |
|
||||||
pcc: `${res.provinceName}/${res.cityName}/${res.countyName}`, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
onChange(e) { |
|
||||||
this.setData({ |
|
||||||
isDefault: e.detail, |
|
||||||
}); |
|
||||||
}, |
|
||||||
getArea() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "/js/area.json", |
|
||||||
isJSON: true, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
options: res.map((item) => { |
|
||||||
return { |
|
||||||
...item, |
|
||||||
children: item.children.map((item2) => { |
|
||||||
return { |
|
||||||
label: item2.label, |
|
||||||
value: item2.value, |
|
||||||
children: item2.children.map((item3) => { |
|
||||||
return { |
|
||||||
label: item3.label, |
|
||||||
value: item3.value, |
|
||||||
}; |
|
||||||
}), |
|
||||||
}; |
|
||||||
}), |
|
||||||
}; |
|
||||||
}), |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleCascader() { |
|
||||||
this.setData({ |
|
||||||
cascaderShow: true, |
|
||||||
}); |
|
||||||
}, |
|
||||||
onFinish(e: any) { |
|
||||||
const selectedOptions = e.detail.selectedOptions; |
|
||||||
console.log(selectedOptions); |
|
||||||
this.setData({ |
|
||||||
cascaderValue: e.detail.value, |
|
||||||
areaValue: [selectedOptions[0].value, selectedOptions[1].value, selectedOptions[2].value], |
|
||||||
pcc: `${selectedOptions[0].label}/${selectedOptions[1].label}/${selectedOptions[2].label}`, |
|
||||||
provinceId: selectedOptions[0].value, |
|
||||||
provinceName: selectedOptions[0].label, |
|
||||||
cityId: selectedOptions[1].value, |
|
||||||
cityName: selectedOptions[1].label, |
|
||||||
countyId: selectedOptions[2].value, |
|
||||||
countyName: selectedOptions[2].label, |
|
||||||
}); |
|
||||||
this.onClose(); |
|
||||||
}, |
|
||||||
onClose() { |
|
||||||
this.setData({ |
|
||||||
cascaderShow: false, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSite() { |
|
||||||
const that = this; |
|
||||||
wx.getSetting({ |
|
||||||
success(res) { |
|
||||||
if ( |
|
||||||
res.authSetting["scope.userFuzzyLocation"] != undefined && |
|
||||||
res.authSetting["scope.userFuzzyLocation"] == true |
|
||||||
) { |
|
||||||
//获取当前位置
|
|
||||||
that.getFuzzyLocation(); |
|
||||||
} else if (res.authSetting["scope.userFuzzyLocation"] == undefined) { |
|
||||||
//获取当前位置
|
|
||||||
that.getFuzzyLocation(); |
|
||||||
} else { |
|
||||||
wx.showModal({ |
|
||||||
title: "请求授权当前位置", |
|
||||||
content: "需要获取您的地理位置,请确认授权", |
|
||||||
confirmColor: "#cf5375", |
|
||||||
success: function (res) { |
|
||||||
if (res.cancel) { |
|
||||||
//取消授权
|
|
||||||
wx.showToast({ |
|
||||||
title: "拒绝授权", |
|
||||||
icon: "none", |
|
||||||
duration: 1000, |
|
||||||
}); |
|
||||||
} else if (res.confirm) { |
|
||||||
//确定授权,通过wx.openSetting发起授权请求
|
|
||||||
wx.openSetting({ |
|
||||||
success: function (res) { |
|
||||||
if (res.authSetting["scope.userFuzzyLocation"] == true) { |
|
||||||
//再次授权,调用wx.getLocation的API
|
|
||||||
that.getFuzzyLocation(); |
|
||||||
} else { |
|
||||||
wx.showToast({ |
|
||||||
title: "授权失败", |
|
||||||
icon: "none", |
|
||||||
duration: 1000, |
|
||||||
}); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
}, |
|
||||||
getFuzzyLocation() { |
|
||||||
const that = this; |
|
||||||
wx.getFuzzyLocation({ |
|
||||||
success(res) { |
|
||||||
that.setData({ |
|
||||||
LNG: res.longitude, |
|
||||||
LAT: res.latitude, |
|
||||||
}); |
|
||||||
that.getLocationInfo(); |
|
||||||
}, |
|
||||||
fail(err) { |
|
||||||
console.log(err); |
|
||||||
}, |
|
||||||
}); |
|
||||||
}, |
|
||||||
getLocationInfo() { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/nrdl-hospital/location-info", |
|
||||||
data: { |
|
||||||
lat: this.data.LAT, |
|
||||||
lng: this.data.LNG, |
|
||||||
}, |
|
||||||
loading: true, |
|
||||||
}).then((res) => { |
|
||||||
this.setData({ |
|
||||||
cityId: res.CityId, |
|
||||||
cityName: res.CityName, |
|
||||||
countyId: res.CountyId, |
|
||||||
countyName: res.CountyName, |
|
||||||
provinceId: res.ProvinceId, |
|
||||||
provinceName: res.ProvinceName, |
|
||||||
|
|
||||||
pcc: `${res.ProvinceName}/${res.CityName}/${res.CountyName}`, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSubmit() { |
|
||||||
const { |
|
||||||
receiveUserName, |
|
||||||
receiveTelephone, |
|
||||||
address, |
|
||||||
isDefault, |
|
||||||
addressId, |
|
||||||
provinceName, |
|
||||||
provinceId, |
|
||||||
cityId, |
|
||||||
cityName, |
|
||||||
countyId, |
|
||||||
countyName, |
|
||||||
} = this.data; |
|
||||||
let toast = ""; |
|
||||||
if (!receiveUserName) toast = "请输入收货人姓名"; |
|
||||||
if (!receiveTelephone) toast = "请输入联系电话"; |
|
||||||
if (!provinceName) toast = "请选择所在地区"; |
|
||||||
if (!address) toast = "请输入详细地址"; |
|
||||||
|
|
||||||
const params = { |
|
||||||
receiveUserName, |
|
||||||
receiveTelephone, |
|
||||||
provinceName, |
|
||||||
address, |
|
||||||
isDefault: isDefault ? 1 : 2, |
|
||||||
addressId, |
|
||||||
provinceId, |
|
||||||
cityId, |
|
||||||
cityName, |
|
||||||
countyId, |
|
||||||
countyName, |
|
||||||
}; |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/patient-address/save-address", |
|
||||||
data: params, |
|
||||||
}).then(() => { |
|
||||||
wx.navigateBack(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleDel() { |
|
||||||
wx.showModal({ |
|
||||||
title: "确认删除?", |
|
||||||
confirmColor: "#DE406A", |
|
||||||
success: (res) => { |
|
||||||
if (res.confirm) { |
|
||||||
wx.ajax({ |
|
||||||
method: "POST", |
|
||||||
url: "?r=igg4/patient-address/del-address", |
|
||||||
data: { |
|
||||||
addressId: this.data.addressId, |
|
||||||
}, |
|
||||||
loading: true, |
|
||||||
}).then((res) => { |
|
||||||
wx.navigateBack({ |
|
||||||
success() { |
|
||||||
wx.showToast({ |
|
||||||
icon: "none", |
|
||||||
title: res, |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
}); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,80 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view class="form"> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">收货人</view> |
|
||||||
<view class="content"> |
|
||||||
<input |
|
||||||
type="text" |
|
||||||
model:value="{{receiveUserName}}" |
|
||||||
class="input" |
|
||||||
maxlength="{{10}}" |
|
||||||
placeholder-class="place-input" |
|
||||||
placeholder="请输入收货人姓名" |
|
||||||
/> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">联系电话</view> |
|
||||||
<view class="content"> |
|
||||||
<input |
|
||||||
type="number" |
|
||||||
model:value="{{receiveTelephone}}" |
|
||||||
maxlength="{{11}}" |
|
||||||
class="input" |
|
||||||
placeholder-class="place-input" |
|
||||||
placeholder="请输入联系电话" |
|
||||||
/> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">所在地区</view> |
|
||||||
<view class="content"> |
|
||||||
<input |
|
||||||
type="text" |
|
||||||
value="{{pcc}}" |
|
||||||
class="input" |
|
||||||
disabled |
|
||||||
bind:tap="handleCascader" |
|
||||||
placeholder-class="place-input" |
|
||||||
placeholder="请选择省市区、街道" |
|
||||||
/> |
|
||||||
<view class="site" bind:tap="handleSite"> |
|
||||||
<image class="icon" src="{{imageUrl}}2/site.png?t={{Timestamp}}"></image> |
|
||||||
定位 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="row"> |
|
||||||
<view class="label">详细地址</view> |
|
||||||
<view class="content"> |
|
||||||
<input |
|
||||||
type="text" |
|
||||||
model:value="{{address}}" |
|
||||||
class="input" |
|
||||||
placeholder-class="place-input" |
|
||||||
placeholder="小区单元门牌号、乡村名称" |
|
||||||
/> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="default"> |
|
||||||
设置为默认地址 |
|
||||||
<van-switch checked="{{ isDefault }}" bind:change="onChange" active-color="#E04775" size="24px" /> |
|
||||||
</view> |
|
||||||
<view class="footer"> |
|
||||||
<view class="cancel" wx:if="{{addressId}}" bind:tap="handleDel">删除</view> |
|
||||||
<view class="submit" bind:tap="handleSubmit">保存</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
|
|
||||||
<van-popup show="{{ cascaderShow }}" round position="bottom"> |
|
||||||
<van-cascader |
|
||||||
wx:if="{{ cascaderShow }}" |
|
||||||
value="{{ cascaderValue }}" |
|
||||||
title="请选择所在地区" |
|
||||||
options="{{ options }}" |
|
||||||
field-names="{{fieldNames}}" |
|
||||||
bind:close="onClose" |
|
||||||
bind:finish="onFinish" |
|
||||||
/> |
|
||||||
</van-popup> |
|
||||||
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"navigationBarTitleText": "地址管理", |
|
||||||
"usingComponents": {} |
|
||||||
} |
|
||||||
@ -1,73 +0,0 @@ |
|||||||
page { |
|
||||||
background-color: #fafafa; |
|
||||||
} |
|
||||||
.page { |
|
||||||
padding: 34rpx 40rpx 240rpx; |
|
||||||
.card { |
|
||||||
margin-bottom: 20rpx; |
|
||||||
padding: 32rpx; |
|
||||||
background: #ffffff; |
|
||||||
border-radius: 24rpx; |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
.wrap { |
|
||||||
flex: 1; |
|
||||||
width: calc(100% - 100rpx); |
|
||||||
.title { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
.name { |
|
||||||
flex: 1; |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: bold; |
|
||||||
align-items: center; |
|
||||||
overflow: hidden; |
|
||||||
white-space: nowrap; |
|
||||||
text-overflow: ellipsis; |
|
||||||
} |
|
||||||
.label { |
|
||||||
flex-shrink: 0; |
|
||||||
margin-right: 20rpx; |
|
||||||
padding: 0 10rpx; |
|
||||||
display: inline-block; |
|
||||||
vertical-align: middle; |
|
||||||
font-size: 24rpx; |
|
||||||
line-height: 34rpx; |
|
||||||
color: #e04775; |
|
||||||
border: 1rpx solid #e04775; |
|
||||||
border-radius: 10rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
.content { |
|
||||||
margin-top: 12rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #bbbcbe; |
|
||||||
} |
|
||||||
} |
|
||||||
.edit { |
|
||||||
margin-left: 15rpx; |
|
||||||
width: 32rpx; |
|
||||||
flex-shrink: 0; |
|
||||||
.edit-img { |
|
||||||
width: 32rpx; |
|
||||||
height: 32rpx; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.submit { |
|
||||||
position: fixed; |
|
||||||
bottom: 120rpx; |
|
||||||
left: 40rpx; |
|
||||||
height: 96rpx; |
|
||||||
width: calc(100% - 80rpx); |
|
||||||
background: #e04775; |
|
||||||
border-radius: 48rpx; |
|
||||||
text-align: center; |
|
||||||
line-height: 96rpx; |
|
||||||
text-align: center; |
|
||||||
font-size: 36rpx; |
|
||||||
color: #ffffff; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,64 +0,0 @@ |
|||||||
const app = getApp<IAppOption>(); |
|
||||||
|
|
||||||
Page({ |
|
||||||
data: { |
|
||||||
list: [], |
|
||||||
pagination: { |
|
||||||
page: 1, |
|
||||||
pages: 1, |
|
||||||
count: 1, |
|
||||||
}, |
|
||||||
}, |
|
||||||
onShow() { |
|
||||||
app.waitLogin().then(() => { |
|
||||||
this.getList(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
getList(newPage = 1) { |
|
||||||
wx.ajax({ |
|
||||||
method: "GET", |
|
||||||
url: "?r=igg4/patient-address/get-list", |
|
||||||
data: { |
|
||||||
page: newPage, |
|
||||||
}, |
|
||||||
}).then((res) => { |
|
||||||
let list = res.page == 1 ? res.list : [...this.data.list, ...res.list]; |
|
||||||
this.setData({ |
|
||||||
list: list, |
|
||||||
pagination: { |
|
||||||
page: res.page, |
|
||||||
pages: res.pages, |
|
||||||
count: res.count, |
|
||||||
}, |
|
||||||
}); |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleSelect(e) { |
|
||||||
const { index } = e.currentTarget.dataset; |
|
||||||
let pages = getCurrentPages(); |
|
||||||
|
|
||||||
let prevPage = pages[pages.length - 2]; |
|
||||||
prevPage.setData({ |
|
||||||
select: true, |
|
||||||
addressDetail: this.data.list[index], |
|
||||||
}); |
|
||||||
wx.navigateBack(); |
|
||||||
}, |
|
||||||
handleEdit(e) { |
|
||||||
const { id } = e.currentTarget.dataset; |
|
||||||
wx.navigateTo({ |
|
||||||
url: `/gift/pages/siteEdit/index?id=${id}`, |
|
||||||
}); |
|
||||||
}, |
|
||||||
handleAdd() { |
|
||||||
wx.navigateTo({ |
|
||||||
url: "/gift/pages/siteEdit/index", |
|
||||||
}); |
|
||||||
}, |
|
||||||
onReachBottom() { |
|
||||||
const { page, pages } = this.data.pagination; |
|
||||||
if (pages > page) { |
|
||||||
this.getList(page + 1); |
|
||||||
} |
|
||||||
}, |
|
||||||
}); |
|
||||||
@ -1,17 +0,0 @@ |
|||||||
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> |
|
||||||
<view class="card" wx:for="{{list}}" wx:key="index"> |
|
||||||
<view class="wrap" bind:tap="handleSelect" data-index="{{index}}"> |
|
||||||
<view class="title"> |
|
||||||
<view class="label" wx:if="{{item.isDefault==1}}">默认</view> |
|
||||||
<view class="name">{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.address}}</view> |
|
||||||
</view> |
|
||||||
<view class="content">{{item.receiveUserName}} {{item.receiveTelephone}}</view> |
|
||||||
</view> |
|
||||||
<view class="edit" bind:tap="handleEdit" data-id="{{item.addressId}}"> |
|
||||||
<image class="edit-img" src="{{imageUrl}}2/edit.png?t={{Timestamp}}"></image> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<pagination pagination="{{pagination}}"></pagination> |
|
||||||
|
|
||||||
<view class="submit" bind:tap="handleAdd">新增地址</view> |
|
||||||
</view> |
|
||||||
@ -1,8 +1,7 @@ |
|||||||
{ |
{ |
||||||
"navigationBarTitleText": "活动列表页", |
"navigationBarTitleText": "活动列表页", |
||||||
"navigationBarBackgroundColor": "#fafafa", |
"navigationBarBackgroundColor": "#F7F7F7", |
||||||
"usingComponents": { |
"usingComponents": { |
||||||
"van-icon": "@vant/weapp/icon/index", |
"van-icon": "@vant/weapp/icon/index" |
||||||
"navBar": "/components/navBar/navBar" |
|
||||||
} |
} |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue