123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <template>
- <view style="background-color: #fff;height: 100vh;">
- <view class="address flexB ">
- <view class="flexV">
- <view class="address_tip red">
- 收货人
- </view>
- <view>
- <view>
- <text>{{ form.user_name }}</text>
- <text style="margin-left: 24rpx;">{{ form.mobile }}</text>
- </view>
- <view class="gray">
- {{ form.province + form.city + form.area + form.address }}
- </view>
- </view>
- </view>
- </view>
- <view class="soapBox">
- <view class="soapBox_middle">
- <view class="flexB">
- <image :src="type ? image[0] : image[1]" style="width: 200rpx;height:160rpx;margin-right: 20rpx;"></image>
- <view class="middleFlex">
- <view class="middleFlex_title">
- {{ type ? '【大卫博士健康内裤】专用洗涤皂' : '【大卫博士健康内裤】专用打包胶带' }}
- </view>
- <view class="middleFlex_dan">
- <view style="font-weight: bold;">
- ¥{{ type ? 8 : 20 }}
- </view>
- <view class="num">
- x{{ form.num }}
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="soapBox_bottom">
- <text class="text1">共{{ `${form.num + (type ? '块' : '卷')}` }},</text>
- <text>合计;</text>
- <text class="text2">¥</text>
- <text class="text3">{{ form.cost }}</text>
- </view>
- </view>
- <view class="botFlex">
- <view class="flexB botFlex_flex">
- <view class="title">
- 订单编号:
- <text style="font-weight: 400;">{{ form.order_num }}</text>
- </view>
- <view class="anniu" @click="copy(form.order_num)">
- 复制
- </view>
- </view>
- <view class="flexB botFlex_flex">
- <view class="title">
- 下单时间:
- <text style="font-weight: 400;">{{ newDate(form.created_at) }}</text>
- </view>
- </view>
- <view class="flexB botFlex_flex">
- <view class="title">
- 商品总额:
- </view>
- <view class="right">
- ¥{{ form.cost }}
- </view>
- </view>
- <view class="flexB botFlex_flex">
- <view class="title">
- 商品数量:
- </view>
- <view class="right">
- {{ `${form.num + (type ? '块' : '卷')}` }}
- </view>
- </view>
- <view v-if="form.remark" class="flexT botFlex_flex">
- <view class="title">
- 订单备注:
- </view>
- <view class="remark">
- {{ form.remark }}
- </view>
- </view>
- </view>
- <view class="submitPay">
- <view class="anniu red" @click="again">
- 再次下单
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- type: '',
- image: [
- require('../../static/Buy_soap_tape/soap-s.png'),
- require('../../static/Buy_soap_tape/tape-s.png')
- ],
- form: {}
- }
- },
- onLoad(opt){
- this.form = JSON.parse(decodeURIComponent(opt.data))
- this.type = this.form.goods_type == 1 ? 1 : 0
- },
- methods: {
- newDate(time) {
- var date = new Date(time)
- var y = date.getFullYear()
- var m = date.getMonth() + 1
- m = m < 10 ? '0' + m : m
- var d = date.getDate()
- d = d < 10 ? '0' + d : d
- var h = date.getHours()
- h = h < 10 ? '0' + h : h
- var minute = date.getMinutes()
- minute = minute < 10 ? '0' + minute : minute
- var s = date.getSeconds()
- s = s < 10 ? '0' + s : s
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + s
- },
- // 再次下单
- again() {
- const type = this.type == 1 ? 'soap' : 'tape'
- uni.navigateTo({
- url: './goods?type=' + type
- })
- },
- /*复制单号*/
- copy(order_num) {
- try {
- uni.setClipboardData({
- data: order_num,
- success: () => {
- uni.showToast({
- title: '复制成功'
- })
- }
- })
- } catch (e) {
- uni.showModal({
- content: '您的手机暂不支持复制',
- showCancel: false
- })
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .address {
- padding: 40rpx 0;
- margin: 0 24rpx;
- background-color: #fff;
- &_tip {
- width: 92rpx;
- color: #fff;
- font-size: 24rpx;
- font-weight: bold;
- line-height: 50rpx;
- text-align: center;
-
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- margin-right: 20rpx;
- }
- .green {
- background: linear-gradient(180deg, #46DBA1 0%, #19D16E 100%);
- }
- .red {
- background: linear-gradient(180deg, #FF232C 0%, #FF571B 100%);
- }
- &_title {
- font-size: 28rpx;
- font-weight: 400;
- color: $uni-text-color;
- }
- text {
- font-size: 34rpx;
- font-weight: bold;
- }
-
- .gray {
- width: 570rpx;
- font-size: 28rpx;
- color: #999999;
- margin-top: 8rpx;
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden; //溢出内容隐藏
- text-overflow: ellipsis; //文本溢出部分用省略号表示
- display: -webkit-box; //特别显示模式
- line-clamp: 2;
- -webkit-line-clamp: 2; //行数
- -webkit-box-orient: vertical;
- }
- }
- .soapBox {
- border-top: 24rpx solid #F5F5F5;
- border-bottom: 24rpx solid #F5F5F5;
- padding: 24rpx 24rpx 48rpx 24rpx;
- background: #FFFFFF;
- position: relative;
- &_statusImg {
- width: 148rpx;
- position: absolute;
- right: 0;
- top: 0;
- }
- &_middle {
- display: flex;
- justify-content: space-between;
- align-items: flex-end;
- margin-top: 24rpx;
- .num {
- font-size: 28rpx;
- color: #999999;
- }
- .middleFlex {
- height: 130rpx;
- display: flex;
- justify-content: flex-start;
- flex-direction: column;
- &_title {
- font-size: 30rpx;
- font-weight: bold;
- }
- &_dan {
- margin-top: 24rpx;
- font-size: 28rpx;
- width: 472rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- }
- }
- &_bottom {
- text-align: right;
- // margin-top: 34rpx;
- font-weight: bold;
- font-size: 28rpx;
- .text1 {
- color: #999;
- }
- .text2 {
- color: #FB231F;
- }
- .text3 {
- font-size: 44rpx;
- color: #FB231F;
- }
- }
- }
- .botFlex {
- background-color: #fff;
- margin-top: 30rpx;
- padding: 20rpx 30rpx;
-
- .botzuofei {
- align-items: flex-start;
-
- .red {
- padding-top: 10rpx;
- width: 500rpx;
- font-size: 28rpx;
- line-height: 35rpx;
- color: #FB231F;
- // text-align: ri;
- display: flex;
- justify-content: flex-end;
- }
- }
-
- &_flex {
- .title {
- line-height: 56rpx;
- font-size: 28rpx;
- font-weight: bold;
- }
- .anniu {
- width: 72rpx;
- height: 42rpx;
- background: #FFF4F3;
- border-radius: 8rpx;
- text-align: center;
- line-height: 42rpx;
- font-size: 24rpx;
- color: #FB231F;
- }
-
- .right {
- font-size: 28rpx;
- font-weight: bold;
- color: #FB231F;
- }
- .remark {
- text-align: right;
- width: 60%;
- font-size: 28rpx;
- }
- }
- }
- .submitPay {
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- height: 102rpx;
- background-color: #fff;
- box-shadow: 0px -4px 24px 2px rgba(0, 0, 0, 0.1);
- display: flex;
- justify-content: flex-end;
- align-items: center;
- border-top: 2rpx solid #EEEEEE;
- .anniu {
- width: 160rpx;
- height: 64rpx;
- text-align: center;
- line-height: 64rpx;
- border-radius: 34rpx;
- margin-left: 20rpx;
- font-size: 28rpx;
- margin-right: 30rpx;
- }
- .grays {
- border: 2rpx solid #CCCCCC;
- color: 333;
- }
- .red {
- background: linear-gradient(84deg, #F30000 0%, #FE4815 100%);
- color: #fff;
- }
- }
- </style>
|