mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-16 23:45:53 +08:00
Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp
This commit is contained in:
11
api/login.js
11
api/login.js
@@ -14,6 +14,17 @@ export function resetByMobile(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定手机号码
|
||||
* @param mobile
|
||||
*/
|
||||
export function bindMobile(params) {
|
||||
return http.request({
|
||||
url: `/passport/member/bindMobile`,
|
||||
method: "POST",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
//获取自动发券
|
||||
export function getAutoCoup(){
|
||||
|
||||
@@ -42,7 +42,7 @@ export function getMessages(params) {
|
||||
*/
|
||||
export function messageMarkAsRead(ids) {
|
||||
return http.request({
|
||||
url: `members/member-nocice-logs/${ids}/read`,
|
||||
url: `/message/member/${ids}`,
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
});
|
||||
|
||||
@@ -319,3 +319,12 @@ export function reBuy(sn) {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查看包裹列表
|
||||
export function getPackage(orderSn) {
|
||||
return http.request({
|
||||
url: `/order/order/getPackage/${orderSn}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
});
|
||||
}
|
||||
@@ -207,10 +207,12 @@
|
||||
}
|
||||
},
|
||||
"plugins" : {
|
||||
"live-player-plugin" : {
|
||||
"version" : "1.3.0",
|
||||
"provider" : "wx2b03c6e691cd7370"
|
||||
}
|
||||
|
||||
// 直播插件注释
|
||||
// "live-player-plugin" : {
|
||||
// "version" : "1.3.0",
|
||||
// "provider" : "wx2b03c6e691cd7370"
|
||||
// }
|
||||
},
|
||||
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ]
|
||||
},
|
||||
|
||||
16
pages.json
16
pages.json
@@ -275,6 +275,16 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "set/securityCenter/bindMobile",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定手机号",
|
||||
"app-plus": {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "im/list",
|
||||
@@ -708,6 +718,12 @@
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "deliverDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "物流详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "evaluate/evaluateDetail",
|
||||
"style": {
|
||||
|
||||
@@ -22,6 +22,15 @@
|
||||
<u-form-item label="城市" label-width="150" placeholder="请选择城市" right-icon="arrow-right">
|
||||
<div style="width: 100%;" @click="clickRegion">{{ form.___path || '请选择城市' }}</div>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="手机号" label-width="150">
|
||||
<view v-if="form.mobile">
|
||||
{{form.mobile}}
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="submit" @click="navigateTo(form.username)">绑定手机号码</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
</u-form>
|
||||
<div class="bottom">
|
||||
@@ -32,7 +41,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { saveUserInfo } from "@/api/members.js";
|
||||
import { saveUserInfo, getUserInfo } from "@/api/members.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import storage from "@/utils/storage.js";
|
||||
import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue";
|
||||
@@ -50,6 +59,8 @@ export default {
|
||||
region: storage.getUserInfo().region || [], //地址
|
||||
sex: storage.getUserInfo().sex, //性别
|
||||
___path: storage.getUserInfo().region,
|
||||
mobile: storage.getUserInfo().mobile,
|
||||
username: storage.getUserInfo().username,
|
||||
},
|
||||
birthday: storage.getUserInfo().birthday || "", //生日
|
||||
photo: [
|
||||
@@ -160,6 +171,12 @@ export default {
|
||||
this.form.birthday = `${time.year}-${time.month}-${time.day}`;
|
||||
this.birthday = `${time.year} - ${time.month} - ${time.day}`;
|
||||
},
|
||||
|
||||
navigateTo(username) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/set/securityCenter/bindMobile' + '?username=' + username,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
218
pages/mine/set/securityCenter/bindMobile.vue
Normal file
218
pages/mine/set/securityCenter/bindMobile.vue
Normal file
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<view class="box-tips">
|
||||
<h2 class='h2'>
|
||||
绑定手机号码
|
||||
</h2>
|
||||
<view class="verification"></view>
|
||||
</view>
|
||||
<view class="form">
|
||||
<u-form :model="codeForm" ref="validateCodeForm">
|
||||
<view v-if="!validateFlage">
|
||||
<u-form-item label-width="120" label="手机号" prop="mobile">
|
||||
<u-input maxlength="11" v-model="codeForm.mobile" placeholder="请输入您的手机号" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
|
||||
<u-input v-model="codeForm.code" placeholder="请输入验证码" />
|
||||
<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
|
||||
ref="uCode" @change="codeChange"></u-verification-code>
|
||||
<view @tap="getCode" class="text-tips">{{ tips }}</view>
|
||||
</u-form-item>
|
||||
|
||||
<view class="submit" @click="validatePhone">绑定</view>
|
||||
<myVerification keep-running @send="verification" class="verification" ref="verification"
|
||||
business="BIND_MOBILE" />
|
||||
</view>
|
||||
</u-form>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
sendMobile,
|
||||
bindMobile
|
||||
} from "@/api/login";
|
||||
|
||||
import myVerification from "@/components/verification/verification.vue"; //验证
|
||||
import uuid from "@/utils/uuid.modified.js";
|
||||
export default {
|
||||
components: {
|
||||
myVerification,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uuid,
|
||||
validateFlage: false, //是否进行了手机号验证
|
||||
step: 0, //当前验证步骤
|
||||
flage: false, //是否验证码验证
|
||||
codeForm: {
|
||||
mobile: "", //手机号
|
||||
code: "", //验证码
|
||||
username: "", //用户名
|
||||
},
|
||||
tips: "", //提示
|
||||
seconds: 69, // 60s等待时间
|
||||
|
||||
// 验证码登录校验
|
||||
codeRules: {
|
||||
mobile: [{
|
||||
validator: (rule, value, callback) => {
|
||||
return this.$u.test.mobile(value);
|
||||
},
|
||||
message: "手机号码不正确",
|
||||
trigger: ["blur"],
|
||||
}, ],
|
||||
code: [{
|
||||
min: 4,
|
||||
max: 6,
|
||||
required: true,
|
||||
message: "请输入验证码",
|
||||
trigger: ["blur"],
|
||||
}, ],
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.codeForm.username = options.username;
|
||||
},
|
||||
onReady() {
|
||||
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
||||
this.$refs.validateCodeForm.setRules(this.codeRules);
|
||||
},
|
||||
watch: {
|
||||
flage(val) {
|
||||
if (val) {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
uni.showLoading({
|
||||
title: "正在获取验证码",
|
||||
});
|
||||
sendMobile(this.codeForm.mobile, "BIND_MOBILE").then((res) => {
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
if (res.data.success) {
|
||||
this.$refs.uCode.start();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
this.flage = false;
|
||||
this.$refs.verification.getCode();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.toast("请倒计时结束后再发送");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 验证码验证
|
||||
verification(val) {
|
||||
this.flage = val == this.$store.state.verificationKey ? true : false;
|
||||
},
|
||||
|
||||
// 验证手机号
|
||||
validatePhone() {
|
||||
this.$refs.validateCodeForm.validate((valid) => {
|
||||
if (valid) {
|
||||
bindMobile(this.codeForm).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.validateFlage = !this.validateFlage;
|
||||
// 登录成功
|
||||
uni.showToast({
|
||||
title: "绑定成功!",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
end() {
|
||||
|
||||
this.flage = false;
|
||||
this.$refs.verification.getCode()
|
||||
},
|
||||
|
||||
/**获取验证码 */
|
||||
getCode() {
|
||||
if (this.tips == "重新获取") {
|
||||
this.$refs.verification.error(); //发送
|
||||
}
|
||||
if (!this.$u.test.mobile(this.codeForm.mobile)) {
|
||||
uni.showToast({
|
||||
title: "请输入正确手机号",
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.flage) {
|
||||
this.$refs.verification.error(); //发送
|
||||
return false;
|
||||
}
|
||||
},
|
||||
start() {
|
||||
this.$u.toast("验证码已发送");
|
||||
this.flage = true;
|
||||
|
||||
this.$refs.verification.hide();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import url("@/pages/passport/login.scss");
|
||||
|
||||
/deep/ .u-form-item {
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
|
||||
.sendCode {
|
||||
/deep/ .u-form-item--right__content__slot {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.h2 {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.box {
|
||||
padding: 80rpx 0;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.submit {
|
||||
background: $light-color;
|
||||
}
|
||||
|
||||
.box-tips {
|
||||
margin: 0 72rpx;
|
||||
}
|
||||
|
||||
.verification {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
</style>
|
||||
248
pages/order/deliverDetail.vue
Normal file
248
pages/order/deliverDetail.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<div>
|
||||
<view class="logistics-detail">
|
||||
<view class="card">
|
||||
<div v-if="logisticsList && logisticsList.length>0">
|
||||
<ul class="express-log" v-for="(packageItem, packageIndex) in logisticsList" :key="packageIndex" v-if="packageItem">
|
||||
<div class="layui-layer-wrap">
|
||||
<dl>
|
||||
<dt>物流公司:</dt>
|
||||
<dd><div class="text-box">{{ packageItem.logisticsName }}</div></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>快递单号:</dt>
|
||||
<dd>
|
||||
<div nctype="ordersSn" class="text-box">
|
||||
<a class="item" :href='"https://www.baidu.com/s?wd="+packageItem.logisticsNo' target="_blank">{{ packageItem.logisticsNo }}</a>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="div-express-log">
|
||||
<ul class="express-log express-log-name">
|
||||
<li v-for="(item, index) in packageItem.orderPackageItemList" :key="index">
|
||||
<p class="time" style="width: 50%;"><span>商品名称:</span><span>{{ item.goodsName }}</span></p>
|
||||
<p class="time" style="width: 30%;"><span>发货时间:</span><span>{{ item.logisticsTime }}</span></p>
|
||||
<p class="time" style="width: 20%;"><span>发货数量:</span><span>{{ item.deliverNumber }}</span></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="div-express-log">
|
||||
<ul class="express-log" v-if="packageItem.traces && packageItem.traces.traces">
|
||||
<li v-for="(item, index) in packageItem.traces.traces" :key="index">
|
||||
<span class="time">{{ item.AcceptTime || item.acceptTime }}</span>
|
||||
<span class="detail">{{ item.AcceptStation || item.remark }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="express-log" v-else>
|
||||
<li>暂无物流信息</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPackage } from "@/api/trade.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
order: {},
|
||||
logisticsList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
onLoad(option) {
|
||||
let sn = option.order_sn;
|
||||
this.tracesList(sn);
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
tracesList(sn) {
|
||||
getPackage(sn).then((res) => {
|
||||
if(res.data.success){
|
||||
this.logisticsList = res.data.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
// @import url('./goods.scss');
|
||||
.goods-item-view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.goods-img {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-info {
|
||||
padding-left: 30rpx;
|
||||
flex: 3;
|
||||
|
||||
.goods-title {
|
||||
margin-bottom: 10rpx;
|
||||
color: $font-color-dark;
|
||||
}
|
||||
|
||||
.goods-specs {
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #ff5a10;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-num {
|
||||
>.good-complaint {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
width: 60rpx;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-info {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.logistics-detail {
|
||||
margin-top: 20rpx;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
.card {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
> .card-title {
|
||||
font-size: 24rpx;
|
||||
border-top-left-radius: 20rpx;
|
||||
border-top-right-radius: 20rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
> .time-line {
|
||||
padding: 16rpx 32rpx;
|
||||
}
|
||||
}
|
||||
.u-order-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.u-order-desc {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
.u-order-time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.empty {
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.express-log {
|
||||
/*margin: 5px -10px 5px 5px;*/
|
||||
padding: 20rpx;
|
||||
list-style-type: none;
|
||||
li {
|
||||
display: flex;
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
li:nth-of-type(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
.time {
|
||||
width: 140rpx;
|
||||
display: flex;
|
||||
// float: left;
|
||||
flex-direction: column;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
span:nth-of-type(1) {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.detail {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
margin-left: 30rpx;
|
||||
display: inline-block;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
.layui-layer-wrap {
|
||||
dl {
|
||||
border-top: solid 1px #f5f5f5;
|
||||
margin-top: -2rpx;
|
||||
overflow: hidden;
|
||||
|
||||
dt {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
display: inline-block;
|
||||
padding: 16rpx 1% 16rpx 0;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
dd {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
display: inline-block;
|
||||
padding: 16rpx 0 16rpx 16rpx;
|
||||
border-left: solid 2rpx #f5f5f5;
|
||||
|
||||
.text-box {
|
||||
line-height: 40rpx;
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.div-express-log {
|
||||
// max-height: 600rpx;
|
||||
border: solid 2rpx #e7e7e7;
|
||||
background: #fafafa;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 6rpx;
|
||||
// overflow-y: auto;
|
||||
// overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -651,7 +651,7 @@ export default {
|
||||
});
|
||||
return false;
|
||||
}
|
||||
} else if (this.shippingText === "LOGISTICS" && this.orderMessage.cartTypeEnum != 'VIRTUAL') {
|
||||
} else if (this.shippingText === "LOGISTICS" && this.orderMessage.cartTypeEnum !== 'VIRTUAL') {
|
||||
if (!this.address.id) {
|
||||
uni.showToast({
|
||||
title: "请选择地址",
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
</div>
|
||||
<!-- 物流信息 -->
|
||||
<view class="info-view logistics-view">
|
||||
<view class="logistics-List" v-if="logisticsList && logisticsList.traces.length != 0 ">
|
||||
<view class="info-view logistics-view" v-if="order.orderType !== 'VIRTUAL'">
|
||||
<view class="logistics-List" v-if="logisticsList && logisticsList.traces && logisticsList.traces.length != 0 ">
|
||||
<view class="logistics-List-title">
|
||||
{{ logisticsList.traces[logisticsList.traces.length - 1].AcceptStation }}
|
||||
</view>
|
||||
@@ -23,6 +23,14 @@
|
||||
<view class="verificationCode" v-if="order.verificationCode">
|
||||
券码: {{ order.orderStatus == 'CANCELLED' ? '已失效' : order.verificationCode }}
|
||||
</view>
|
||||
<view @click="handleClickDeliver()" class="info-view logi-view" v-if="orderPackage && orderPackage.length">
|
||||
<view class="verificationCode">
|
||||
当前订单有 {{ orderPackage.length }} 个包裹快递
|
||||
</view>
|
||||
<div>
|
||||
点击此处查看
|
||||
</div>
|
||||
</view>
|
||||
<view v-else class="logistics-List-title">
|
||||
{{ '暂无物流信息' }}
|
||||
</view>
|
||||
@@ -30,7 +38,7 @@
|
||||
|
||||
</view>
|
||||
<!-- 地址 -->
|
||||
<view class="info-view" v-if="order.deliveryMethod == 'LOGISTICS'">
|
||||
<view class="info-view" v-if="order.deliveryMethod === 'LOGISTICS' && order.orderType !== 'VIRTUAL'">
|
||||
<view class="address-view">
|
||||
<view>
|
||||
<view class="address-title">
|
||||
@@ -44,7 +52,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 提货地址 -->
|
||||
<view class="info-view" v-if="order.deliveryMethod == 'SELF_PICK_UP'">
|
||||
<view class="info-view" v-if="order.deliveryMethod === 'SELF_PICK_UP'">
|
||||
<view class="address-view">
|
||||
<view>
|
||||
<view class="order-info-view">
|
||||
@@ -83,6 +91,9 @@
|
||||
<view class="goods-price">
|
||||
¥{{ sku.goodsPrice | unitPrice }}
|
||||
<!-- <span v-if="sku.point">+{{ sku.point }}积分</span> -->
|
||||
<span style="font-size: 24rpx;margin-left: 14rpx;color: #ff9900;" v-if="sku.isRefund && sku.isRefund !== 'NO_REFUND'">
|
||||
{{refundPriceList(sku.isRefund)}} ({{ sku.refundPrice | unitPrice("¥") }})
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-num">
|
||||
@@ -105,7 +116,7 @@
|
||||
<view class="title">商品总价:</view>
|
||||
<view class="value">¥{{ order.goodsPrice | unitPrice }}</view>
|
||||
</view>
|
||||
<view class="order-info-view">
|
||||
<view class="order-info-view" v-if="order.freightPrice">
|
||||
<view class="title">运费:</view>
|
||||
<view class="value">¥{{ order.freightPrice | unitPrice }}</view>
|
||||
</view>
|
||||
@@ -249,7 +260,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getExpress } from "@/api/trade.js";
|
||||
import { getExpress, getPackage } from "@/api/trade.js";
|
||||
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
|
||||
|
||||
import shares from "@/components/m-share/index"; //分享
|
||||
@@ -307,6 +318,7 @@ export default {
|
||||
cancelList: "",
|
||||
rogShow: false,
|
||||
reason: "",
|
||||
orderPackage:"",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -314,6 +326,34 @@ export default {
|
||||
this.sn = options.sn;
|
||||
},
|
||||
methods: {
|
||||
//获取包裹
|
||||
async getOrderPackage() {
|
||||
getPackage(this.order.sn).then(res => {
|
||||
if (res.data.success) {
|
||||
this.orderPackage = res.data.result
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClickDeliver(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/deliverDetail?order_sn=${this.order.sn}`,
|
||||
});
|
||||
},
|
||||
// 退款状态枚举
|
||||
refundPriceList(status) {
|
||||
switch (status) {
|
||||
case 'ALL_REFUND':
|
||||
return "全部退款";
|
||||
case 'PART_REFUND':
|
||||
return "部分退款";
|
||||
case 'NO_REFUND':
|
||||
return "未退款";
|
||||
case 'REFUNDING':
|
||||
return "退款中";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
},
|
||||
callPhone(){
|
||||
this.$options.filters.callPhone(this.order.storeAddressMobile )
|
||||
},
|
||||
@@ -359,7 +399,8 @@ export default {
|
||||
this.orderGoodsList = order.orderItems;
|
||||
this.orderDetail = res.data.result;
|
||||
if (this.order.deliveryMethod === 'LOGISTICS') {
|
||||
this.loadLogistics(sn)
|
||||
this.loadLogistics(sn);
|
||||
this.getOrderPackage();
|
||||
}
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
|
||||
@@ -594,7 +594,7 @@ export default {
|
||||
}
|
||||
});
|
||||
// 轮播图
|
||||
this.imgList = this.goodsDetail.goodsGalleryList;
|
||||
this.imgList = this.goodsDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
|
||||
|
||||
// 获取店铺基本信息
|
||||
this.getStoreBaseInfoFun(this.goodsDetail.storeId);
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
<view class="category-wrap">
|
||||
<u-navbar class="navbar" :is-back="false">
|
||||
<div class="title">商品分类</div>
|
||||
<!-- #ifdef H5 -->
|
||||
<u-search class="nav-search" @click.native="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<u-search class="nav-search" disabled @click.native="search" placeholder="搜索商品" :show-action="false"></u-search>
|
||||
<!-- #endif -->
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<scroll-view scroll-y scroll-with-animation class="left-aside">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Foundation from "./Foundation.js";
|
||||
import storage from "@/utils/storage.js";
|
||||
import { logout } from "@/api/login";
|
||||
import { getUserInfo } from "@/api/members";
|
||||
import storage from "@/utils/storage.js";
|
||||
import Vue from "vue";
|
||||
import Foundation from "./Foundation.js";
|
||||
/**
|
||||
* 金钱单位置换 2999 --> 2,999.00
|
||||
* @param val
|
||||
@@ -353,6 +353,7 @@ export function quiteLoginOut () {
|
||||
storage.setAccessToken("");
|
||||
storage.setRefreshToken("");
|
||||
storage.setUserInfo({});
|
||||
storage.setHasLogin(false)
|
||||
navigateToLogin("redirectTo");
|
||||
await logout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user