123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788 |
- <template>
- <block>
-
- <view class="content">
- <view class="orderStatus">
- <image :src="
- info.state == 2
- ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/74354f7d56ad4043e279760e09307bef.png'
- : info.state == 3
- ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/cb6d9cec19387616fa955f95d8470bc5.png'
- : info.state == 5
- ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/f05de1ad262ae8a303f5b38ca2419eae.png'
- : ''
- "></image>
- <view>
- {{
- info.state == 2
- ? '待发货'
- : info.state == 3
- ? '待收货'
- : info.state == 5
- ? '已完成'
- : ''
- }}
- </view>
- </view>
- <view class="p-common">
- <view class="p-list icenterY">
- <text>手机号码</text>
- <text class="cPhone">{{ info.delivery.username }}{{ info.delivery.mobile }}</text>
- </view>
- <view class="p-list">
- <text>收货地址</text>
- <text class="cArea">{{ info.delivery.address }}</text>
- <view class="cDetailAddress">{{ info.receiver_address }}</view>
- </view>
- </view>
-
- {{ info.deliver_no || '暂无物流信息' }}
- {{ info.send_comp || '暂无物流信息' }}
- <view class="p-common iflex radiuBot">
- <image class="p-goodsImg" :src="info.products[0].image"></image>
- <view class="p-goods">
- <text class="p-goodsName bold">{{ info.products[0].title }}</text>
- {{ info.good_info ? info.good_info : '' }}
- <view class="p-sku ibetween">
- {{info.pay_money}}{{info.pay_money}}{{info.integral}}{{unit}}
- <text class="p-con">×{{ info.products[0].number }}</text>
- </view>
- </view>
- </view>
- <view class="p-common radiuTop">
- <view class="ibetween p-list icenterY">
- <text>商品价格:</text>
- <text class="p-con">¥{{ info.products[0].price }}</text>
- </view>
- <view class="ibetween p-list">
- <text>商品积分:</text>
- <text class="p-con">{{ info.products[0].price }}积分</text>
- </view>
- <view class="ibetween p-list">
- <text>运费:</text>
- <text class="p-con">¥{{ info.delivery_price }}</text>
- </view>
- <view class="ibetween p-list icenterY">
- <text>支付方式:</text>
- <text class="p-con">
- {{ info.remark }}
- </text>
- </view>
- <view class="ibetween p-list">
- <text>实际支付:</text>
- <text class="p-con colorActive">
- <text class="p-red">
- <text v-if="info.delivery_price!='0.00'">¥{{ info.delivery_price }}+</text>
- {{ info.products[0].price}}
- </text>
- 积分
- </text>
- </view>
- </view>
-
- {{ info.user_mark ? info.user_mark : '暂无留言' }}
- {{ info.inorder_comment ? info.inorder_comment.content : '暂无评价' }}
-
- {{info.reply ? info.reply : '暂无回复'}}
-
-
- <view class="orderInfo">
- <view class="orderInfoTip">订单信息</view>
-
- <view class="orderItem">
- <view>下单编号:</view>
- <view>{{ info.out_trade_no }}</view>
- <view @tap="copy" :data-on="info.out_trade_no">复制</view>
- </view>
-
- <view class="orderItem">
- <view>下单时间:</view>
- <view>{{ info.createtime }}</view>
- </view>
- </view>
- </view>
-
- <view class="p-footer iflex isFixed icenterY"
- v-if="info.state == 3 || info.state == 5">
- {{info.integral_money}}
-
-
- <button @tap="confirm(id)" v-if="info.state == 3" class="activeBtn1">确认收货</button>
- <button @click.stop="buyNext(info.products[0].id)" v-if="info.state == 5" class="activeBtn2">再次购买</button>
- </view>
- </block>
- </template>
- <script>
- var app = getApp();
- export default {
- data() {
- return {
- info: {
- },
- id: '',
- };
- }
-
- ,
- onLoad: function(options) {
- this.id = options.id;
- this.getInfo()
- },
- onShow: function() {},
- onPullDownRefresh: function() {
- this.getInfo();
- },
-
- onReachBottom: function() {},
-
- onShareAppMessage: function() {},
- methods: {
- async confirm(id) {
-
-
- let that = this;
- let [error, res] = await uni.showModal({
- title: '确认收货?'
- });
- if (res.confirm == true) {
- let res = await that.$api.request('/order/received', 'GET', {
- order_id: id,
- type:1
- });
- if (res) {
- that.getInfo()
-
- }
- return true;
- }
- this.$api.msg('收货失败');
- return false;
-
-
-
-
- },
-
- buyNext(id) {
- uni.navigateTo({
- url: `/pages/intergalShop/goodsDetail?id=${id}`
- });
- },
- copy(e) {
- uni.setClipboardData({
- data: e.currentTarget.dataset.on,
- success: function(res) {
- uni.showToast({
- title: '复制成功',
- icon: 'none'
- });
- }
- });
- },
- lookOrder() {
- uni.navigateTo({
- url: `/pages/other/logistics/logistics?phone=${this.info.receiver_mobile}&no=${this.info.deliver_no}`
- });
- },
- async getInfo() {
- let data = await this.$api.request('/order/detail', 'GET', {
- type: 1,
- order_id: this.id
- });
- console.log(data)
- this.info = data;
- },
- toPage(e) {
- app.globalData.toPage(e);
- }
- }
- };
- </script>
- <style>
-
- page {
- background: #f4f4f4;
- }
- .content {
- width: 100%;
- box-sizing: border-box;
- padding: 20rpx 20rpx 120rpx;
- }
- .p-common {
- border-radius: 20rpx;
- padding: 26rpx 30rpx;
- margin-bottom: 20rpx;
- background: white;
-
- position: relative;
- }
- .p-common input {
- width: 74%;
- }
- .p-img {
- height: 44rpx;
- width: 44rpx;
- margin-right: 8rpx;
- color: #333;
- vertical-align: top;
- }
- .shareicon {
- position: absolute;
- right: 30rpx;
- top: calc(50% - 8px);
- }
- .p-goods {
- width: 72%;
- }
- .p-goodsImg {
- height: 128rpx;
- width: 128rpx;
- margin-right: 18rpx;
- flex-shrink: 0;
- }
- .p-goodsName {
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- display: block;
- font-size: 32rpx;
- }
- .p-goodsTips {
- color: #666;
- font-size: 24rpx;
- }
- .p-con {
- font-size: 24rpx;
- color: #666;
- }
- .p-list {
- border-bottom: 1px solid #f2f2f2;
- padding: 26rpx 0;
- }
- .p-list:first-child {
- padding-top: 0;
- }
- .p-list:last-child {
- border: none;
- padding-bottom: 0;
- }
- .p-red {
- color: #fe6000;
- font-size: 28rpx;
- font-weight: 700;
- }
- .isFixed {
- position: fixed;
- bottom: 32rpx;
- }
- .p-total {
- width: 50%;
- text-align: center;
- }
- .p-btn {
- border: none;
- background: #f62e2e;
- color: white;
- height: 100%;
- border-radius: 0 20rpx 20rpx 0;
- width: 50%;
- }
- .p-common:last-child {
- padding: 0;
-
- margin-bottom: 0;
- }
- .bold {
- font-weight: bold;
- }
- input {
- margin-top: -4rpx;
- }
- .p-icon {
- height: 30rpx;
- width: 30rpx;
- margin-right: 8rpx;
- vertical-align: center;
- }
- .p-sku {
- position: absolute;
- bottom: 20rpx;
- width: calc(72% - 30rpx);
- }
- .message {
- flex-shrink: 0;
- }
- .p-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- left: 0;
- background: white;
- height: 100rpx;
- display: flex;
- flex-direction: row-reverse !important;
- }
- button {
- width: 188rpx;
- border-radius: 40rpx;
- border: 1px solid #999;
- background: none;
- color: #666;
- font-size: 28rpx;
- margin-right: 22rpx;
- margin-left: 0;
- }
- button::after {
- border: none;
- }
- .p-common:last-child {
- padding: 26rpx 30rpx !important;
-
- margin-bottom: 0;
- }
- .orderStatus {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 12rpx 0 30rpx;
- }
- .orderStatus>image {
- width: 46rpx;
- height: 46rpx;
- margin-top: 8rpx;
- }
- .orderStatus>view {
- font-size: 35rpx;
- font-weight: 700;
- color: #333333;
- margin-left: 16rpx;
- }
- .hxCode {
- display: flex;
- align-items: center;
- }
- .hxCode>view {
- color: #fe6b05;
- font-size: 28rpx;
- }
- .hxCode>image {
- width: 28rpx;
- margin-right: 10rpx;
- margin-top: 4rpx;
- }
- .cPhone {
- font-size: 28rpx;
- color: #333333;
- margin-left: 30rpx;
- }
- .cArea {
- font-size: 28rpx;
- color: #333333;
- margin-left: 30rpx;
- }
- .cDetailAddress {
- color: #666666;
- margin-top: 12rpx;
- }
- .shopInfo {
- padding: 24rpx 24rpx 30rpx 24rpx;
- margin: 18rpx 0rpx;
- border-radius: 20rpx;
- }
- .shopTop-name {
- font-size: 28rpx;
- width: 500rpx;
- color: #000;
- }
- .shopTop-btn {
- width: 83rpx;
- height: 35rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #fd6000;
- border: 1px solid #fd6000;
- border-radius: 30rpx;
- font-size: 25rpx;
- }
- .shopBot {
- margin-top: 30rpx;
- }
- .shopTD {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .l-shopTime,
- .l-shopAddress {
- font-size: 25rpx;
- color: #666;
- line-height: 1;
- }
- .l-shopAddress {
- width: 410rpx;
- margin-top: 18rpx;
- }
- .shoploc:first-of-type {
- max-width: 104rpx;
- }
- .shoploc {
- font-size: 20rpx;
- color: #999;
- line-height: 1;
- }
- .shoploc image {
- width: 42rpx;
- height: 42rpx;
- margin-bottom: 12rpx;
- }
- .shopSu {
- height: 48rpx;
- width: 1rpx;
- background: #999999;
- margin: 0 38rpx;
- }
- .radiuBot {
- border-radius: 20rpx 20rpx 0 0 !important;
- margin-bottom: 0;
- }
- .radiuTop {
- border-radius: 0 0 20rpx 20rpx !important;
- }
- .colorActive {
- color: #fe6000;
- }
- .orderInfo {
- margin-top: 20rpx;
- background: #fff;
- border-radius: 20rpx;
- padding-bottom: 20rpx;
- }
- .iflexC {
- display: flex;
- flex-direction: column
- }
- .orderInfoTip {
- padding: 30rpx 30rpx 26rpx 30rpx;
- box-sizing: border-box;
- font-weight: 700;
- font-size: 28rpx;
- color: #333333;
- border-bottom: 1px solid #dcdcdc;
- margin-bottom: 30rpx;
- }
- .orderItem {
- padding: 0rpx 0 0rpx 30rpx;
- display: flex;
- align-items: center;
- margin: 20rpx 0;
- }
- .orderItem>view:nth-child(1) {
- font-size: 26rpx;
- color: #999999;
- }
- .orderItem>view:nth-child(2) {
- font-size: 26rpx;
- color: #333;
- margin-left: 8rpx;
- }
- .orderItem>view:nth-child(3) {
- width: 72rpx;
- height: 34rpx;
- line-height: 34rpx;
- text-align: center;
- border-radius: 12rpx;
- font-size: 25rpx;
- color: #000;
- border: 1px solid #898989;
- margin-left: 22rpx;
- }
- .activeBtn1 {
- background:#FB4C6F;
- color: #fff !important;
- border: none;
- }
- .activeBtn2 {
- background:#FB4C6F;
- color: #fff !important;
- border: none;
- }
- .boxWrap {
- width: 524rpx;
- border-radius: 30rpx;
- background: #fff;
- }
- .codeInfo {
- box-sizing: border-box;
- display: flex;
- align-items: center;
- background: linear-gradient(to right, #fda401, #fe6b05);
- padding: 35rpx 53rpx 27rpx 17rpx;
- border-radius: 12rpx 12rpx 0 0;
- }
- .codeInfo>image {
- width: 86rpx;
- height: 86rpx;
- border-radius: 12rpx;
- }
- .goodBoxInfo {
- color: #fff;
- margin-left: 18rpx;
- }
- .goodBoxInfo>view:nth-child(1) {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: 700;
- }
- .goodBoxInfo>view:nth-child(2) {
- font-size: 28rpx;
- color: #ffffff;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- .codeWrap {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 33rpx 0;
- }
- .code1 {
- display: flex;
- align-items: center;
- }
- .code1>view:nth-child(1),
- .code1>view:nth-child(3) {
- width: 74rpx;
- height: 1px;
- background: #333333;
- }
- .code1>view:nth-child(2) {
- font-size: 24rpx;
- color: #333;
- font-weight: 700;
- margin: 0 20rpx;
- }
- .hxcodeImg {
- width: 340rpx;
- height: 340rpx;
- margin: 20rpx 0;
- }
- .codeTip {
- font-size: 24rpx;
- color: #333;
- }
- .download {
- width: 351rpx;
- height: 82rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background: linear-gradient(to right, #fda401, #fe6b05);
- border-radius: 40rpx;
- margin-top: 20rpx;
- }
- .download>view {
- font-size: 31rpx;
- color: #fff;
- }
- .download>image {
- width: 30rpx;
- height: 30rpx;
- margin-left: 24rpx;
- }
- .allBox {
- display: flex;
- flex-direction: column;
- align-items: center;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .closeBox {
- width: 50rpx;
- height: 50rpx;
- margin-top: 30rpx;
- }
- .iflex {
- display: flex;
- }
- .icentery,
- .icenterY {
- display: flex;
- align-items: center;
- flex-direction: row;
- }
- .ibetween {
- display: flex;
- justify-content: space-between
- }
- .mengban {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.7);
- }
- </style>
|