mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 08:25:55 +08:00
feat: 更新售后细节和用户工具页面 (master)
- 修改afterSalesDetailExpress.vue中gotoGoodsDetail函数参数 - 调整快递公司、快递单号和发货时间选择器样式 - 在tool.vue中添加邀请用户功能和分享弹窗 - 在request.js中增加请求头带上邀请人信息 - 移除tpl_goods.vue中的调试日志 - App.vue增加启动时设置邀请人逻辑 - storage.js新增邀请人信息的存取方法
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="goods-item-view" @click="gotoGoodsDetail(sku.skuId)">
|
||||
<view class="goods-item-view" @click="gotoGoodsDetail(sku)">
|
||||
<view class="goods-img">
|
||||
<u-image border-radius="6" width="131rpx" height="131rpx" :src="sku.image"></u-image>
|
||||
</view>
|
||||
@@ -33,30 +33,38 @@
|
||||
<div style="width: 100%; text-align: right;">快递至第三方卖家</div>
|
||||
</u-form-item>
|
||||
<u-form-item label="快递公司" :label-width="150">
|
||||
<div style="width: 100%; text-align: right;" @click="companySelectShow = true" >{{ form.courierCompany || '请选择快递公司' }}</div>
|
||||
<div style="width: 100%; text-align: right;" @click="companySelectShow = true">
|
||||
{{ form.courierCompany || '请选择快递公司' }}
|
||||
</div>
|
||||
</u-form-item>
|
||||
<u-form-item label="快递单号" :label-width="150">
|
||||
<u-input input-align="right" v-model="form.logisticsNo" placeholder="请输入快递单号" />
|
||||
<u-input input-align="right" v-model="form.logisticsNo" placeholder="请输入快递单号"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="发货时间" :label-width="150">
|
||||
<div style="width: 100%; text-align: right;" @click="timeshow = true" >{{ form.mDeliverTime || '请选择发货时间' }}</div>
|
||||
<div style="width: 100%; text-align: right;" @click="timeshow = true">{{
|
||||
form.mDeliverTime || '请选择发货时间'
|
||||
}}
|
||||
</div>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="submit-view">
|
||||
<u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" @click="onSubmit">提交申请</u-button>
|
||||
<u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" @click="onSubmit">
|
||||
提交申请
|
||||
</u-button>
|
||||
</view>
|
||||
</u-form>
|
||||
<u-select mode="single-column" :list="companyList" v-model="companySelectShow" @confirm="companySelectConfirm"></u-select>
|
||||
<u-select mode="single-column" :list="companyList" v-model="companySelectShow"
|
||||
@confirm="companySelectConfirm"></u-select>
|
||||
<u-calendar v-model="timeshow" :mode="'date'" @change="onTimeChange"></u-calendar>
|
||||
<u-toast ref="uToast" />
|
||||
<u-toast ref="uToast"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLogistics } from "@/api/address.js";
|
||||
import { fillShipInfo } from "@/api/after-sale.js";
|
||||
import {getLogistics} from "@/api/address.js";
|
||||
import {fillShipInfo} from "@/api/after-sale.js";
|
||||
import storage from "@/utils/storage";
|
||||
|
||||
export default {
|
||||
@@ -77,7 +85,7 @@ export default {
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
|
||||
this.sku = storage.getAfterSaleData();
|
||||
let navTitle = "服务单详情";
|
||||
uni.setNavigationBarTitle({
|
||||
@@ -122,13 +130,39 @@ export default {
|
||||
* 点击提交
|
||||
*/
|
||||
onSubmit() {
|
||||
delete this.form.courierCompany;
|
||||
|
||||
if (this.form.logisticsId == "") {
|
||||
this.$refs.uToast.show({
|
||||
title: "请选择快递公司",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.form.logisticsNo == "") {
|
||||
this.$refs.uToast.show({
|
||||
title: "请填写快递单号",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.form.mDeliverTime == "") {
|
||||
this.$refs.uToast.show({
|
||||
title: "请选择发货时间",
|
||||
type: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true,
|
||||
});
|
||||
delete this.form.courierCompany;
|
||||
fillShipInfo(this.serviceDetail.sn, this.form).then((res) => {
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (this.$store.state.isShowToast) {
|
||||
uni.hideLoading()
|
||||
}
|
||||
;
|
||||
if (res.statusCode === 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: "提交成功",
|
||||
@@ -139,6 +173,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
gotoGoodsDetail(sku) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/product/goods?id=${sku.skuId}&goodsId=${sku.goodsId}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -149,12 +188,15 @@ page,
|
||||
background: $page-color-base;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mp-iphonex-bottom {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.after-sales-goods-detail-view {
|
||||
background-color: #fff;
|
||||
padding: 10rpx 0rpx;
|
||||
|
||||
.header {
|
||||
background-color: #f7f7f7;
|
||||
color: #999999;
|
||||
@@ -164,15 +206,18 @@ page,
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 70rpx;
|
||||
|
||||
.header-text {
|
||||
background-color: #999999;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.seller-name {
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-item-view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -182,15 +227,18 @@ page,
|
||||
.goods-info {
|
||||
padding-left: 30rpx;
|
||||
flex: 1;
|
||||
|
||||
.goods-title {
|
||||
margin-bottom: 10rpx;
|
||||
color: $font-color-dark;
|
||||
}
|
||||
|
||||
.goods-specs {
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -198,23 +246,27 @@ page,
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: $light-color;
|
||||
|
||||
.num {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-num {
|
||||
width: 60rpx;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.opt-view {
|
||||
background-color: #fff;
|
||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
|
||||
font-size: 26rpx;
|
||||
|
||||
.how-view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -223,18 +275,21 @@ page,
|
||||
height: 80rpx;
|
||||
border-bottom: 1px solid $page-color-base;
|
||||
}
|
||||
|
||||
.explain-view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.img-title {
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.images-view {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
@@ -243,6 +298,7 @@ page,
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
.submit-view {
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
|
||||
@@ -108,7 +108,6 @@ export default {
|
||||
handler(val) {
|
||||
// 监听父级的值 如果有值将值赋给selected
|
||||
if (val) {
|
||||
console.log(val)
|
||||
// 如果第一个标签页绑定为商品
|
||||
this.selected.val = this.res.list[0].listWay[0] ? this.res.list[0].listWay[0].type: '';
|
||||
// 如果第一个标签为绑定为分类
|
||||
|
||||
@@ -97,6 +97,10 @@
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="interact-item" @click="inviter()">-->
|
||||
<!-- <image src="/static/mine/share.png" mode=""></image>-->
|
||||
<!-- <view>邀新</view>-->
|
||||
<!-- </view>-->
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
||||
<image src="/static/mine/setting.png" mode=""></image>
|
||||
<view>设置</view>
|
||||
@@ -105,6 +109,23 @@
|
||||
|
||||
</view>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<u-popup v-model="sharingShow" mode="bottom" border-radius="14">
|
||||
<view style="margin: 10px; text-align: center;"> 请邀请用户扫描二维码或者将地址复制转发给其他用户 </view>
|
||||
<view class='qrcode'>
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="sharingLink" :options="{ margin: 10 }">
|
||||
</uqrcode>
|
||||
</view>
|
||||
|
||||
<view class="copy-text" @click="getDetail(sharingLink)">
|
||||
{{sharingLink}}
|
||||
</view>
|
||||
<view class="confrim-btn">
|
||||
<u-button @click="sharingShow = false;">关闭</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -117,8 +138,11 @@ import storage from "@/utils/storage";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
configs,
|
||||
storage
|
||||
configs,
|
||||
storage,
|
||||
repayingShow: false, //分销清退弹框
|
||||
sharingShow: false,
|
||||
sharingLink: ""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -128,6 +152,18 @@ export default {
|
||||
url,
|
||||
});
|
||||
},
|
||||
inviter() {
|
||||
if (storage.getUserInfo().id) {
|
||||
this.sharingLink = this.configs.shareLink + "?inviter=" + this.storage.getUserInfo().id
|
||||
this.sharingShow = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "请先登录",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
navigateTo(url) {
|
||||
const ignores = [
|
||||
'/pages/mine/set/setUp',
|
||||
@@ -194,41 +230,58 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.copy-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 10px;
|
||||
line-break: anywhere;
|
||||
}
|
||||
|
||||
.interact-tools {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
|
||||
|
||||
.interactBox {
|
||||
height: 156rpx;
|
||||
}
|
||||
.interact-container {
|
||||
margin: 0 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
|
||||
.interact-item-img {
|
||||
width: 52rpx !important;
|
||||
height: 52rpx !important;
|
||||
// margin-bottom: !important;
|
||||
margin: 0 auto 6rpx auto !important;
|
||||
}
|
||||
image {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
text-align: center;
|
||||
.interactBox {
|
||||
height: 156rpx;
|
||||
}
|
||||
|
||||
.interact-item {
|
||||
font-size: $font-sm;
|
||||
width: 25%;
|
||||
height: 160rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
}
|
||||
.interact-container {
|
||||
margin: 0 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
|
||||
|
||||
.interact-item-img {
|
||||
width: 52rpx !important;
|
||||
height: 52rpx !important;
|
||||
// margin-bottom: !important;
|
||||
margin: 0 auto 6rpx auto !important;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
text-align: center;
|
||||
|
||||
.interact-item {
|
||||
font-size: $font-sm;
|
||||
width: 25%;
|
||||
height: 160rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.qrcode {
|
||||
margin: 0 auto;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user