-
- 暂无优惠券
+
+
-
- 暂无优惠券
-
-
-
+
{{ item.discount }}折
{{ item.price }}元
@@ -41,51 +37,31 @@
-
diff --git a/pages/mine/address/addressManage.vue b/pages/mine/address/addressManage.vue
index 00089d7..6bfd8ad 100644
--- a/pages/mine/address/addressManage.vue
+++ b/pages/mine/address/addressManage.vue
@@ -1,32 +1,19 @@
-
-
+
-
{{ item.name }}
{{ item.mobile }}
默认
- {{
- item.consigneeAddressPath[0]
- }}
- {{
- item.consigneeAddressPath[1]
- }}
- {{
- item.consigneeAddressPath[2]
- }}
-
- {{
- item.consigneeAddressPath[3]
- }}
-
- {{ item.detail }}
-
+ {{item.consigneeAddressPath[0]}}
+ {{item.consigneeAddressPath[1]}}
+ {{item.consigneeAddressPath[2]}}
+ {{item.consigneeAddressPath[3]}}
+ {{ item.detail }}
@@ -40,7 +27,7 @@
编辑
- 删除
+ 删除
@@ -52,22 +39,19 @@
添加新收货人
-
+
diff --git a/pages/mine/address/map.vue b/pages/mine/address/map.vue
deleted file mode 100644
index cb3bb62..0000000
--- a/pages/mine/address/map.vue
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/mine/address/uniMap.vue b/pages/mine/address/uniMap.vue
index 36564d2..c6dd455 100644
--- a/pages/mine/address/uniMap.vue
+++ b/pages/mine/address/uniMap.vue
@@ -1,10 +1,12 @@
diff --git a/pages/mine/myTracks.vue b/pages/mine/myTracks.vue
index f366d78..11e7374 100644
--- a/pages/mine/myTracks.vue
+++ b/pages/mine/myTracks.vue
@@ -1,17 +1,17 @@
-
-
-
- {{item.storeName}}
+
+
+
+ {{item.storeName}}
-
+
-
+
{{ item.goodsName }}
@@ -19,9 +19,6 @@
¥{{ item.price | unitPrice }}
-
@@ -54,23 +51,22 @@ import { myTrackList, deleteHistoryListId } from "@/api/members.js";
export default {
data() {
return {
- editFlag: false,
- allChecked: false,
- loadStatus: "more",
- nomsg: false,
+ editFlag: false, //是否编辑
+ allChecked: false, //是否全选
+ loadStatus: "more", //底部下拉加载状态
+ whetherEmpty: false, //是否数据为空
params: {
pageNumber: 1,
pageSize: 10,
},
- refresh: true,
- list: [],
+
+ trackList: [], //足迹列表
};
},
- onPullDownRefresh() {
- this.params.pageNumber = 1;
- this.list = [];
- this.getList();
- },
+
+ /**
+ * 滑到底部加载下一页数据
+ */
onReachBottom() {
if (this.loadStatus != "noMore") {
this.params.pageNumber++;
@@ -81,11 +77,18 @@ export default {
this.getList();
},
methods: {
- gostore(val) {
+ /**
+ * 导航到店铺
+ */
+ navgaiteToStore(val) {
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
+
+ /**
+ * 设置右侧导航栏文本
+ */
setStyle(text) {
//导航按钮文本设置
let pages = getCurrentPages();
@@ -95,7 +98,7 @@ export default {
let titleNView = currentWebview.getStyle().titleNView;
titleNView.buttons[0].text = text;
if (text == "完成") {
- this.list.forEach((key) => {
+ this.trackList.forEach((key) => {
key.history.forEach((item) => {
this.$set(item, "___isDel", false);
});
@@ -110,20 +113,19 @@ export default {
document.getElementsByClassName("uni-btn-icon")[1].innerText = text;
// #endif
},
- goDetail(item) {
- //跳转详情
+
+ /**
+ * 跳转详情
+ */
+ navgaiteToDetail(item) {
uni.navigateTo({
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
});
},
- goSimilar(item) {
- //找相似
- uni.navigateTo({
- url:
- "/pages/user/similaritem?item=" +
- encodeURIComponent(JSON.stringify(item)),
- });
- },
+
+ /**
+ * 获取我的足迹列表
+ */
getList() {
uni.showLoading({
title: "加载中",
@@ -139,35 +141,44 @@ export default {
let data = res.data.result;
if (data.total == 0) {
- this.nomsg = true;
+ this.whetherEmpty = true;
} else if (data.total < 10) {
this.loadStatus = "noMore";
- this.list.push(...data);
+ this.trackList.push(...data);
} else {
- this.list.push(...data);
+ this.trackList.push(...data);
if (data.length < 10) this.loadStatus = "noMore";
}
}
});
},
+
+ /**
+ * 点击后判断是不是全选
+ */
changeChecked(val) {
- //点击后判断是不是全选
- console.log(val);
- const isCheckedAll = this.list.every((key) => {
- console.log(key);
+ const isCheckedAll = this.trackList.every((key) => {
return key.___isDel == val.___isDel;
});
this.allChecked = isCheckedAll;
},
+
+ /**
+ * 点击全选按钮
+ */
checkedAllitem() {
//全选按钮
- this.list.forEach((key) => {
+ this.trackList.forEach((key) => {
this.$set(key, "___isDel", this.allChecked);
});
},
+
+ /**
+ * 删除足迹
+ */
delAllTracks() {
let way = [];
- this.list.forEach((key) => {
+ this.trackList.forEach((key) => {
if (key.___isDel) {
way.push(key.goodsId);
}
@@ -175,10 +186,8 @@ export default {
if (way.length == 0) return false;
deleteHistoryListId(way).then((res) => {
if (res.data.code == 200) {
- this.list = [];
-
+ this.trackList = [];
this.allChecked = false;
-
this.getList();
} else {
uni.showToast({
@@ -190,6 +199,10 @@ export default {
});
},
},
+
+ /**
+ * 右侧标签栏切换
+ */
onNavigationBarButtonTap(e) {
if (!this.editFlag) {
this.setStyle("完成");
@@ -255,9 +268,6 @@ export default {
}
}
-.myTracks-item-content {
-}
-
.myTracks-item-title {
font-size: 28rpx;
color: #333;
@@ -274,36 +284,6 @@ export default {
padding: 10rpx 0 0 0;
}
-.myTracks-item-price-now {
- font-size: 28rpx;
- color: $light-color;
- margin: 0 10rpx;
-}
-
-.myTracks-item-price-origin {
- font-size: 28rpx;
- color: #999;
- -webkit-text-decoration-line: line-through;
- text-decoration-line: line-through;
- text-decoration: line-through;
-}
-
-.myTracks-item-btn {
- position: absolute;
- right: 20rpx;
- bottom: 20rpx;
- width: 120rpx;
- height: 42rpx;
- background-color: #fff;
- border: 1px solid $aider-light-color;
- border-radius: 10rpx;
- font-size: 24rpx;
- color: $aider-light-color;
- display: flex;
- justify-content: center;
- align-items: center;
-}
-
.myTracks-action-btn {
width: 130rpx;
height: 60rpx;
@@ -319,21 +299,6 @@ export default {
height: 110rpx;
}
-.myTracks-action {
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 100rpx;
- padding: 0 20rpx;
- box-sizing: border-box;
- background-color: #fff;
- align-items: center;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- justify-content: space-between;
-}
-
.myTracks-action-check {
align-items: center;
display: -webkit-box;
diff --git a/pages/mine/point/myPoint.vue b/pages/mine/point/myPoint.vue
index 18575c9..8fa9355 100644
--- a/pages/mine/point/myPoint.vue
+++ b/pages/mine/point/myPoint.vue
@@ -18,104 +18,56 @@
{{ pointData.variablePoint || 0 }}
-
-
- 近30天记录
- 更多
-
-
-
- 近30天记录
- 更多
+
+
+
+ {{ item.content }}
+ {{ item.createTime}}
+
+ {{item.pointType == "1" ? '+' : '-'}}{{ item.variablePoint }}
-
-
-
-
-
- {{ item.content }}
- {{ item.createTime}}
-
- {{item.pointType == "1" ? '+' : '-'}}{{ item.variablePoint }}
-
-
-
- 申请积分
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/pages/mine/set/editionIntro.vue b/pages/mine/set/editionIntro.vue
index eef232e..ebc7579 100644
--- a/pages/mine/set/editionIntro.vue
+++ b/pages/mine/set/editionIntro.vue
@@ -1,125 +1,122 @@
+// TODO 第一版本暂无此功能 后续优化以及更新
-
-
-
-
-
- 版本不息 优化不止
-
-
-
- {{item.version}}
- {{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}
-
-
-
-
+
+
+
+
+
+ 版本不息 优化不止
+
+
+
+ {{item.version}}
+ {{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}
+
+
+
+
-
diff --git a/pages/mine/set/feedBack.vue b/pages/mine/set/feedBack.vue
index af2e19d..c2f3400 100644
--- a/pages/mine/set/feedBack.vue
+++ b/pages/mine/set/feedBack.vue
@@ -45,9 +45,9 @@ export default {
storage,
config,
feedBack: {
- type:"FUNCTION"
+ type: "FUNCTION", //默认反馈问题为 '功能相关'
},
- action: upload,
+ action: upload, //图片上传地址
list: [
{ text: "功能相关", value: "FUNCTION" },
{ text: "优化反馈", value: "OPTIMIZE" },
@@ -55,8 +55,8 @@ export default {
],
};
},
- onReady() {},
methods: {
+ // 点击反馈内容
handleClick(index) {
this.$set(this.feedBack, "type", this.list[index].value);
},
@@ -64,14 +64,15 @@ export default {
//图片上传
onUploaded(lists) {
let images = [];
-
lists.forEach((item) => {
images.push(item.response.result);
});
- console.log(images);
this.feedBack.images = images.join(",");
},
+ /**
+ * 提交意见反馈
+ */
submit() {
if (!this.feedBack.type) {
uni.showToast({
@@ -97,7 +98,7 @@ export default {
});
return false;
}
-
+ /** 提交 */
feedBack(this.feedBack).then((res) => {
if (res.data.success) {
uni.showToast({
diff --git a/pages/mine/set/personMsg.vue b/pages/mine/set/personMsg.vue
index c2dec67..ba24c28 100644
--- a/pages/mine/set/personMsg.vue
+++ b/pages/mine/set/personMsg.vue
@@ -5,14 +5,10 @@
点击修改头像
-
-
男
女
@@ -20,8 +16,8 @@
-
-
+
+
@@ -35,7 +31,6 @@
diff --git a/pages/mine/set/securityCenter/deviceManage.vue b/pages/mine/set/securityCenter/deviceManage.vue
deleted file mode 100644
index 5f7eaff..0000000
--- a/pages/mine/set/securityCenter/deviceManage.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
- 开启常用设备保护后,在不常用的手机上登录时,需要进行账号及密码验证,通过后继续登录。
- 常用设备
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/mine/set/securityCenter/editPassword.vue b/pages/mine/set/securityCenter/editPassword.vue
index e9e1723..f938830 100644
--- a/pages/mine/set/securityCenter/editPassword.vue
+++ b/pages/mine/set/securityCenter/editPassword.vue
@@ -40,10 +40,9 @@
diff --git a/pages/mine/set/securityCenter/fingerLogin.vue b/pages/mine/set/securityCenter/fingerLogin.vue
index c0ac97d..f37fc70 100644
--- a/pages/mine/set/securityCenter/fingerLogin.vue
+++ b/pages/mine/set/securityCenter/fingerLogin.vue
@@ -1,70 +1,70 @@
+// TODO 第一版本暂无此功能 后续优化以及更新
-
-
-
-
-
-
- 开启后可使用指纹认证完成快捷登录,设置仅对本机生效。如需修改指纹,请在系统设置中操作。
-
+
+
+
+
+
+
+ 开启后可使用指纹认证完成快捷登录,设置仅对本机生效。如需修改指纹,请在系统设置中操作。
+
-
diff --git a/pages/mine/set/setUp.vue b/pages/mine/set/setUp.vue
index 796531f..7deeb18 100644
--- a/pages/mine/set/setUp.vue
+++ b/pages/mine/set/setUp.vue
@@ -137,7 +137,7 @@ export default {
that.getCacheSize(); // 重新计算缓存
},
function (e) {
- console.log(e.message);
+
}
);
} else {
diff --git a/pages/mine/signIn.vue b/pages/mine/signIn.vue
index bc92ca5..8f2a366 100644
--- a/pages/mine/signIn.vue
+++ b/pages/mine/signIn.vue
@@ -58,7 +58,7 @@
获得积分
- {{ continuity_point }}
+ {{ continuityPoint }}
连续签到可获得额外奖励哦!
@@ -71,19 +71,16 @@ import { sign, signTime } from "@/api/point.js";
export default {
data() {
return {
- continuity: 1,
- continuity_point: 2,
- header: {
- top: 0,
- height: 50,
- },
+ continuity: 1, //本月连续签到天数
+ continuityPoint: 2, //获得的积分
signFlag: false,
animationData: {},
- maskFlag: false,
- transFlag: false,
- weekArr: ["日", "一", "二", "三", "四", "五", "六"],
+ maskFlag: false, //
+ transFlag: false, //动画
+ weekArr: ["日", "一", "二", "三", "四", "五", "六"], //周数组
dateArr: [], //每个月的天数
monthArr: [
+ //实例化每个月
"1月",
"2月",
"3月",
@@ -118,6 +115,10 @@ export default {
this.getDate();
},
methods: {
+
+ /**
+ * 补0
+ */
makeUp(val) {
if (val >= 10) {
return val;
@@ -125,18 +126,18 @@ export default {
return "0" + val;
}
},
- // 返回
- back() {
- uni.navigateBack();
- },
- // 签到
+
+ /**
+ * 点击签到
+ */
async signIn() {
await sign().then((response) => {
if (this.ifSign) return;
if (this.signFlag) return;
if (response.data.code != 200) {
- uni.$showToast({
- title: response.message,
+ uni.showToast({
+ title: response.data.message,
+ duration: 2000,
icon: "none",
});
@@ -164,41 +165,24 @@ export default {
);
});
},
- // 关闭弹窗
+
+ /**
+ * 签到成功后关闭弹窗
+ */
close() {
var that = this;
this.maskFlag = false;
this.transFlag = true;
- setTimeout(function () {
+ setTimeout(() => {
that.transFlag = false;
}, 500);
},
- change(id) {
- var i = this.monthArr.indexOf(this.currentMonth),
- curDay = null;
- if (id === "1") {
- i++;
- if (i > 11) {
- this.currentYear++;
- i = 0;
- }
- this.currentMonth = this.monthArr[i];
- this.currentMonthIndex = i + 1;
- } else {
- i--;
- if (i < 0) {
- this.currentYear--;
- i = 11;
- }
- this.currentMonth = this.monthArr[i];
- this.currentMonthIndex = i + 1;
- }
- curDay = this.getWeekByDay(this.currentYear + "-" + (i + 1) + "-1");
- this.getMonthDays(i, curDay);
- this.curentSignData();
- },
+
+ /**
+ * 获取今天时间
+ *
+ */
getDate() {
- //获取日子
var date = new Date(),
index = date.getMonth(),
curDay = null;
@@ -206,16 +190,17 @@ export default {
this.currentMonth = this.monthArr[index];
this.currentMonthIndex = index + 1;
this.currentDay = date.getDate();
- console.log(this.currentDay);
- console.log(this.signArr[this.signArr.length - 1]);
if (this.currentDay == this.signArr[this.signArr.length - 1]) {
- console.log("12");
this.ifSign = true;
}
curDay = this.getWeekByDay(this.currentYear + "-" + (index + 1) + "-1");
this.getMonthDays(index, curDay);
this.curentSignData();
},
+
+ /**
+ * 获取当前已经签到的时间
+ */
curentSignData() {
var date = new Date(),
index = date.getMonth(),
@@ -224,15 +209,13 @@ export default {
for (var i = 0; i < this.signAll.length; i++) {
var item = this.signAll[i];
item.createTime = item.createTime.split(" ")[0];
-
var itemVal = item.createTime.split("-");
- console.log(itemVal);
if (
Number(itemVal[0]) === Number(this.currentYear) &&
Number(itemVal[1]) === Number(this.currentMonthIndex)
) {
this.signArr.push(Number(itemVal[2]));
- console.log(JSON.stringify(this.signArr));
+
}
if (
Number(itemVal[0]) === Number(date.getFullYear()) &&
@@ -243,6 +226,14 @@ export default {
}
}
},
+
+ /**
+ * 循环出当前月份的时间
+ * 例子:
+ * "","","","","","",1,
+ * 2 ,3 ,4 ,5 ,6 ,7 ,8,
+ * ...依次向下排
+ */
getMonthDays(index, day) {
//day 当月1号是周几
this.dateArr = [];
@@ -293,8 +284,11 @@ export default {
}
this.dataObj.push(this.dateArr);
},
+
+ /**
+ * 获取当前月份有几周
+ */
getWeekByDay(dayValue) {
- //dayValue=“2014-01-01”
var day = new Date(Date.parse(dayValue.replace(/-/g, "/"))).getDay(); //将日期值格式化
return day;
},
diff --git a/pages/navigation/point/user.vue b/pages/navigation/point/user.vue
index 48abb1b..f8c0321 100644
--- a/pages/navigation/point/user.vue
+++ b/pages/navigation/point/user.vue
@@ -21,7 +21,7 @@ export default {
},
methods: {
init() {
- console.log(this.$options.filters.isLogin());
+
},
},
};
diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue
index 62dd68d..5b52d9d 100644
--- a/pages/navigation/search/searchPage.vue
+++ b/pages/navigation/search/searchPage.vue
@@ -91,8 +91,8 @@
{{ item.goodsName }}
- ¥{{ Fixed(item.price )[0] }} .{{
- Fixed(item.price )[1]
+ ¥{{ formatPrice(item.price )[0] }} .{{
+ formatPrice(item.price )[1]
}}
@@ -158,8 +158,8 @@
- ¥{{ Fixed(item.price )[0] }} .{{
- Fixed(item.price )[1]
+ ¥{{ formatPrice(item.price )[0] }} .{{
+ formatPrice(item.price )[1]
}}
@@ -421,7 +421,7 @@ export default {
},
// 格式化金钱 1999 --> [1999,00]
- Fixed(val) {
+ formatPrice(val) {
if (typeof val == "undefined") {
return val;
}
@@ -611,7 +611,7 @@ export default {
}
//没有更多直接返回
let goodsList = await getGoodsList(this.params);
- console.log(goodsList);
+
if (goodsList.data.result.content.length < 10) {
this.loadingType = "noMore";
}
@@ -662,7 +662,7 @@ export default {
content: "确定清除历史搜索记录?",
success: (res) => {
if (res.confirm) {
- console.log("用户点击确定");
+
this.oldKeywordList = [];
uni.removeStorage({
key: "OldKeys",
@@ -693,7 +693,7 @@ export default {
},
//保存关键字到历史记录
saveKeyword(keyword) {
- console.log(keyword);
+
if (!keyword) return false;
uni.getStorage({
key: "OldKeys",
@@ -714,7 +714,7 @@ export default {
data: JSON.stringify(OldKeys),
});
this.oldKeywordList = OldKeys; //更新历史搜索
- console.log(this.oldKeywordList);
+
},
fail: (e) => {
var OldKeys = [keyword];
diff --git a/pages/order/afterSales/afterSales.vue b/pages/order/afterSales/afterSales.vue
index db5cfd7..5b3ba3d 100644
--- a/pages/order/afterSales/afterSales.vue
+++ b/pages/order/afterSales/afterSales.vue
@@ -10,7 +10,7 @@
{{ order.storeName }}
- 订单编号:{{ order.sn }}
+ 订单编号:{{order.sn}}
@@ -50,11 +50,11 @@
- 退货处理-{{ serviceStatusList[order.serviceStatus] }}
- 补发商品-{{ serviceStatusList[order.serviceStatus] }}
- 退款-{{ serviceStatusList[order.serviceStatus] }}
- 换货-{{ serviceStatusList[order.serviceStatus] }}
- 取消订单-{{ serviceStatusList[order.serviceStatus] }}
+ 退货处理-{{ order.serviceStatus | serviceStatusList }}
+ 补发商品-{{ order.serviceStatus | serviceStatusList }}
+ 退款-{{ order.serviceStatus | serviceStatusList }}
+ 换货-{{ order.serviceStatus | serviceStatusList }}
+ 取消订单-{{ order.serviceStatus | serviceStatusList }}
@@ -74,13 +74,9 @@
" @click="onExpress(order, sku)">
提交物流
-
售后详情
-
-
-
@@ -103,8 +99,7 @@
-
diff --git a/pages/order/afterSales/applyDetail.vue b/pages/order/afterSales/applyDetail.vue
index ae69c22..9a7e940 100644
--- a/pages/order/afterSales/applyDetail.vue
+++ b/pages/order/afterSales/applyDetail.vue
@@ -12,11 +12,9 @@
{{
- serviceStatusList[serviceDetail.serviceStatus]
+ serviceDetail.serviceStatus | serviceStatusList
}}
-
+
{{
serviceDetail.serviceStatus | statusFilter
}}
@@ -35,7 +33,7 @@
-
+
@@ -99,21 +97,21 @@
收货地址:
- {{
- change_info.salesConsigneeAddressPath
+ {{
+ storeAfterSaleAddress.salesConsigneeAddressPath
}}
联系人:
- {{ change_info.salesConsigneeName }}
+ {{ storeAfterSaleAddress.salesConsigneeName }}
联系方式:
{{
- change_info.salesConsigneeMobile || "" | secrecyMobile
+ storeAfterSaleAddress.salesConsigneeMobile || "" | secrecyMobile
}}
@@ -189,12 +187,6 @@
-
-
-
@@ -212,51 +204,21 @@ export default {
},
data() {
return {
- // 售后单状态
- serviceStatusList: {
- APPLY: "申请售后",
- PASS: "通过售后",
- REFUSE: "拒绝售后",
- BUYER_RETURN: "买家退货,待卖家收货",
- SELLER_RE_DELIVERY: "商家换货/补发",
- SELLER_CONFIRM: "卖家确认收货",
- SELLER_TERMINATION: "卖家终止售后",
- BUYER_CONFIRM: "买家确认收货",
- BUYER_CANCEL: "买家取消售后",
- WAIT_REFUND: "等待平台退款",
- COMPLETE: "完成售后",
- },
- // 售后类型
serviceTypeList: {
+ // 售后类型
CANCEL: "取消",
RETURN_GOODS: "退货",
EXCHANGE_GOODS: "换货",
RETURN_MONEY: "退款",
},
-
- orderStatusList: {
- UNDELIVERED: "待发货",
- UNPAID: "未付款",
- PAID: "已付款",
- DELIVERED: "已发货",
- CANCELLED: "已取消",
- COMPLETE: "已完成",
- TAKE: "已完成",
- },
- serviceDetail: {},
- logs: [],
- allowable: {},
- goodsList: [],
- change_info: {},
- serviceDetail: {},
- express_info: {},
- imagesList: [],
- refundShow: false,
- accountShow: false,
- bankShow: false,
- returnAdressShow: true,
- shipInfoShow: false,
- sn: "",
+ serviceDetail: {}, // 售后详情
+ logs: [], //日志
+ goodsList: [], //商品列表
+ storeAfterSaleAddress: {}, //售后地址
+ refundShow: false, //退款开关
+ accountShow: false, //账户显示
+ bankShow: false, //银行显示
+ sn: "", //订单sn
};
},
onLoad(options) {
@@ -269,6 +231,9 @@ export default {
this.getLog(options.sn);
},
filters: {
+ /**
+ * 售后状态信息
+ */
statusFilter(val) {
switch (val) {
case "APPLY":
@@ -297,6 +262,10 @@ export default {
return "";
}
},
+
+ /**
+ * 退款信息
+ */
refundWayFilter(val) {
switch (val) {
case "OFFLINE":
@@ -309,6 +278,9 @@ export default {
return "";
}
},
+ /**
+ * 账户信息
+ */
accountTypeFilter(val) {
switch (val) {
case "WEIXINPAY":
@@ -323,6 +295,9 @@ export default {
},
},
methods: {
+ /**
+ * 点击图片放大或保存
+ */
preview(urls, index) {
uni.previewImage({
current: index,
@@ -335,18 +310,29 @@ export default {
});
},
+ /**
+ * 获取地址信息
+ */
getAddress() {
getstoreAfterSaleAddress(this.sn).then((res) => {
if (res.data.success) {
- this.change_info = res.data.result;
+ this.storeAfterSaleAddress = res.data.result;
}
});
},
+
+ /**
+ * 获取日志
+ */
getLog(sn) {
getAfterSaleLog(sn).then((res) => {
this.logs = res.data.result;
});
},
+
+ /**
+ * 初始化详情
+ */
loadDetail() {
uni.showLoading({
title: "加载中",
@@ -354,9 +340,6 @@ export default {
getServiceDetail(this.sn).then((res) => {
uni.hideLoading();
this.serviceDetail = res.data.result;
- this.allowable = this.serviceDetail.allowable;
-
- this.express_info = this.serviceDetail.express_info;
if (this.serviceDetail.serviceType == "RETURN_GOODS") {
this.refundShow = true;
}
@@ -372,11 +355,19 @@ export default {
this.serviceDetail.accountType === "BANK_TRANSFER";
});
},
- gotoGoodsDetail(item) {
+
+ /**
+ * 访问商品详情
+ */
+ navgiateToGoodsDetail(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},
+
+ /**
+ * 进度
+ */
onProgress() {
uni.navigateTo({
url: `./applyProgress?sn=${
@@ -391,7 +382,7 @@ export default {
};
-
diff --git a/pages/order/afterSales/applySuccess.vue b/pages/order/afterSales/applySuccess.vue
index a1e53b3..190d887 100644
--- a/pages/order/afterSales/applySuccess.vue
+++ b/pages/order/afterSales/applySuccess.vue
@@ -5,10 +5,10 @@
售后申请提交成功
- 查看记录
+ 查看记录
- 回到主页
+ 回到主页
@@ -27,12 +27,19 @@ export default {
return {};
},
methods: {
- toMenu() {
+ /**
+ * 跳转到售后服务
+ */
+ navigateToAfterSales() {
uni.redirectTo({
url: "/pages/order/afterSales/afterSales",
});
},
- toHome() {
+
+ /**
+ * 跳转到首页
+ */
+ navigateToHome() {
uni.switchTab({
url: "/pages/tabbar/home/index",
});
@@ -41,7 +48,7 @@ export default {
};
-
diff --git a/pages/order/evaluate/againEvaluate.vue b/pages/order/evaluate/againEvaluate.vue
deleted file mode 100644
index 0a1f453..0000000
--- a/pages/order/evaluate/againEvaluate.vue
+++ /dev/null
@@ -1,241 +0,0 @@
-
-
-
-
-
-
-
- {{ order.goodsName }}
- /
-
-
-
-
-
-
-
-
- 初评日期:{{ $u.timeFormat(order.create_time, 'yyyy-mm-dd') }}
-
-
- 初评评价:{{ order.grade_str }}
-
-
- 初评内容:{{ order.content }}
-
- 初评审核状态:您的初评审核通过
-
-
-
-
-
-
- {{ form[0].content.length }}/{{ maxlength }}
-
-
-
-
-
- 提交
-
-
-
-
-
-
-
diff --git a/pages/order/evaluate/evaluateDetail.vue b/pages/order/evaluate/evaluateDetail.vue
index 399bb9b..9f2ec35 100644
--- a/pages/order/evaluate/evaluateDetail.vue
+++ b/pages/order/evaluate/evaluateDetail.vue
@@ -3,13 +3,7 @@
-
+
{{ comment.memberName }}
@@ -17,21 +11,13 @@
- 商品评价: {{ gradeList[comment.grade] }}
+ 商品评价: {{ gradeList[comment.grade] }}
{{ comment.content }}
-
-
-
-
+
+
+
@@ -39,38 +25,7 @@
{{ comment.goodsName }}
-
-
-
- 购买{{ calcDay(comment) }}天后追加评论
-
- {{
- comment.additional_comment.create_time | unixToDate
- }}
-
- {{
- comment.additional_comment.content
- }}
-
-
-
-
-
-
-
-
-
- 掌柜回复:
-
- {{
- comment.additional_comment.reply.content
- }}
-
-
+
@@ -80,9 +35,9 @@
export default {
data() {
return {
- src: "",
- comment: {},
- gradeList: {
+ comment: {}, //评论信息
+ gradeList: {
+ //评价grade
GOOD: "好评",
MODERATE: "中评",
WORSE: "差评",
@@ -92,11 +47,12 @@ export default {
},
onLoad(options) {
this.comment = JSON.parse(decodeURIComponent(options.comment));
-
},
methods: {
- preview(urls, index) {
-
+ /**
+ * 点击图片放大或保存
+ */
+ preview(urls, index) {
uni.previewImage({
current: index,
urls: urls,
@@ -107,47 +63,15 @@ export default {
},
});
},
- calcDay(order) {
- let date = "";
- console.log();
- if (order.additional_comment) {
- date =
- (order.additional_comment.create_time - order.create_time) /
- 60 /
- 60 /
- 24;
- }
- return Math.ceil(date);
- },
},
};
-
diff --git a/pages/order/evaluate/evaluateInfo.vue b/pages/order/evaluate/evaluateInfo.vue
deleted file mode 100644
index 335f6d5..0000000
--- a/pages/order/evaluate/evaluateInfo.vue
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
- 1.对商品金额大于20元商品(虚拟商品除外)进行评价并通过审核后,根据商品价格和您的评价内容为您发放积分。
-
-
- 2.只能对90天内购买的订单进行商品评价。
-
-
- 3.同一订单和相隔15日内不同订单中的相同商品,只能评价一次。
-
-
- 4.退换货订单产生的商品评价将会被删除,且会扣除相应的优币。
-
-
- 5.鼓励发表原创、有价值的评价;杜绝剽窃、发表无意义、违反法律法规的评价内容,如果您发布的无效评价超过(包含)5条,则一年内您发表的商品评价都不会获得积分奖励。
-
-
- 6.晒单发表成功后会对晒图进行审核,审核过程中,心得文字会先展示出来,审核通过后,晒图会一起进行展示。
-
-
- 7.对于审核不通过的评价晒单,不能获得优币奖励,且文字、晒图均不能被展示出来,有下列情形之一的,审核不予通过:
-
-
- • 评价心得文字与商品无关,且出现言辞露骨的情况;
-
-
- • 图片与所购商品不一致;
-
-
- • 晒单为截屏图片;
-
-
- • 图片不清晰,不能达到晒单目的;
-
-
- • 图片中涉及淫秽、色情等违法不良信息;
-
-
- • 未经过他人同意,涉及使用他人图片或将他人图片进行编辑后发布;
-
-
- • 盗用他人图片经举报、诉讼情况属实;
-
-
- • 图片中涉及敏感词汇(如:曝光,315,假二水,翻新等);
-
-
- • 图片涉及与客服聊天记录;
-
-
- • 对于成人用品晒单,未对特殊部位进行遮掩或打马赛克。
-
-
-
-
-
-
-
-
diff --git a/pages/order/evaluate/myEvaluate.vue b/pages/order/evaluate/myEvaluate.vue
index bb73bd9..74666fe 100644
--- a/pages/order/evaluate/myEvaluate.vue
+++ b/pages/order/evaluate/myEvaluate.vue
@@ -2,9 +2,9 @@
-
+
-
+
@@ -32,7 +32,7 @@
-
+
-
+
@@ -69,14 +69,7 @@ import { getComments } from "@/api/members.js";
export default {
data() {
return {
- customStyle: {
- backgroundColor: this.$lightColor,
- color: "#FFF",
- height: "60rpx",
- width: "150rpx",
- margin: "20rpx 0",
- },
- list: [
+ list: [ //顶部tab
{
name: "待评价",
},
@@ -84,28 +77,32 @@ export default {
name: "已评价",
},
],
- gradeList: {
+ gradeList: { //评论表
GOOD: "好评",
MODERATE: "中评",
WORSE: "差评",
haveImage: "有图",
},
- current: 0,
- orderList: [],
+ current: 0, //当前tabIndex
+ orderList: [], //商品集合
params: {
pageNumber: 1,
pageSize: 10,
- orderStatus: "",
loadStatus: "more",
},
};
},
+
onShow() {
this.orderList = [];
this.params.pageNumber = 1;
this.current == 0 ? this.loadData() : this.loadComments();
},
watch: {
+ /**
+ * 切换current
+ * 更改页面并重新加载数据
+ */
current(val) {
this.params.pageNumber = 1;
this.params.loadStatus = "more";
@@ -120,16 +117,16 @@ export default {
}
},
},
- mounted() {
- },
+
methods: {
- // 判断当前店铺是否有可评价的商品
+ /**
+ * 判断当前店铺是否有可评价的商品
+ */
commentStatus(val) {
if (this.current == 1) {
return true;
} else {
let show;
-
val.orderItems &&
val.orderItems.forEach((item) => {
if (item.commentStatus == "UNFINISHED") {
@@ -143,6 +140,9 @@ export default {
}
},
+ /**
+ * 点击图片放大或保存
+ */
preview(urls, index) {
uni.previewImage({
current: index,
@@ -155,14 +155,27 @@ export default {
});
},
- change(index) {
+ /**
+ * 点击tab触发
+ */
+ changeTab(index) {
this.current = index;
},
- changeTab(e) {
+
+ /**
+ * 点击swiper
+ */
+ changeSwiper(e) {
this.current = e.target.current;
},
+
+ /**
+ * 获取订单数据
+ */
loadData() {
- uni.showLoading({});
+ uni.showLoading({
+ title: "加载中",
+ });
getOrderList(this.params).then((res) => {
uni.hideLoading();
const orderList = res.data.result.records;
@@ -175,15 +188,25 @@ export default {
}
});
},
- onCommont(order) {
+
+ /**
+ * 发表评价
+ */
+ talkCommont(order) {
uni.navigateTo({
url: `./releaseEvaluate?sn=${order.sn}&order=${encodeURIComponent(
JSON.stringify(order)
)}`,
});
},
+
+ /**
+ * 加载已评价数据
+ */
loadComments() {
- uni.showLoading({});
+ uni.showLoading({
+ title: "加载中",
+ });
getComments(this.params).then((res) => {
uni.hideLoading();
let orderList = res.data.result.records;
@@ -200,19 +223,14 @@ export default {
},
];
});
-
this.orderList = this.orderList.concat(orderList);
-
this.params.pageNumber += 1;
});
},
- onAgain(order) {
- uni.navigateTo({
- url: `./againEvaluate?order=${encodeURIComponent(
- JSON.stringify(order)
- )}`,
- });
- },
+
+ /**
+ * 滑到底部加载数据
+ */
renderData(index) {
if (this.params.loadStatus == "noMore") return;
if (index == 0) {
@@ -224,13 +242,11 @@ export default {
this.params.comment_status = "WAIT_CHASE";
this.loadComments();
}
- if (index == 2) {
- this.params.audit_status = "";
- this.params.comments_type = "";
- this.params.comment_status = "FINISHED";
- this.loadComments();
- }
},
+
+ /**
+ * 评价详情
+ */
onDetail(comment) {
uni.navigateTo({
url:
diff --git a/pages/order/evaluate/releaseEvaluate.vue b/pages/order/evaluate/releaseEvaluate.vue
index 18ec8fc..b3398d4 100644
--- a/pages/order/evaluate/releaseEvaluate.vue
+++ b/pages/order/evaluate/releaseEvaluate.vue
@@ -1,5 +1,6 @@
+
@@ -45,7 +46,7 @@
-
+
@@ -88,47 +89,45 @@ export default {
data() {
return {
storage,
- value: "",
- type: "textarea",
- border: false,
- maxlength: 500,
+ type: "textarea", //输入框状态为 textarea
+ border: false, //没有border
+ maxlength: 500, //评价最大字数为500字
placeholder:
"宝贝满足您的期待吗?说说它的优点和美中不足的地方吧。您的评价会帮助更多的人",
- order: {},
+ order: {}, //订单信息
form: {
- content: "",
- goodsId: "",
- grade: "GOOD",
- orderItemSn: "",
- skuId: "",
- descriptionScore: 5,
- serviceScore: 5,
- deliveryScore: 5,
- // // 是否为初评价 true 默认为初评
- // first_comment: true,
- //content,grade: 'GOOD',skuId,images:[]
+ content: "", //评价详情
+ goodsId: "", //商品id
+ grade: "GOOD", //默认为好评
+ orderItemSn: "", //商品的sn
+ skuId: "", //商品skuId
+ descriptionScore: 5, //默认描述得分为5分
+ serviceScore: 5, //默认服务得分为5分
+ deliveryScore: 5, //默认物流得分为5分
},
- currentIndex: 0,
- action: upload,
+ action: upload, //图片上传地址
};
},
onLoad(options) {
+ // 获取上一级传过来的数据进行解析
this.form.orderItemSn = options.sn;
this.order = JSON.parse(decodeURIComponent(options.order));
- //现在只能一个商品一个评价
- },
- mounted() {
this.form.goodsId = this.order.orderItems[0].goodsId;
this.form.orderItemSn = this.order.orderItems[0].sn;
this.form.skuId = this.order.orderItems[0].skuId;
},
methods: {
- beforeUpload(index) {
- this.currentIndex = index;
- },
- onGrade(grade, index) {
+
+ /**
+ * 点击评价
+ */
+ onGrade(grade) {
this.form.grade = grade;
},
+
+ /**
+ * 提交评价
+ */
onSubmit() {
uni.showLoading({
title: "加载中",
@@ -148,9 +147,12 @@ export default {
});
});
},
+
+ /**
+ * 图片成功后回调
+ */
onUploaded(lists) {
let images = [];
- console.log(lists);
lists.forEach((item) => {
images.push(item.response.result);
});
diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue
index 9b11a84..cea9e04 100644
--- a/pages/order/fillorder.vue
+++ b/pages/order/fillorder.vue
@@ -71,7 +71,7 @@
-
+
{{ item.storeName }}
@@ -224,14 +224,6 @@ export default {
shippingText: "LOGISTICS",
shippingFlag: false,
shippingMethod: [
- // {
- // value: "SELF_PICK_UP",
- // label: "自提",
- // },
- // {
- // value: "LOCAL_TOWN_DELIVERY",
- // label: "同城配送",
- // },
{
value: "LOGISTICS",
label: "物流",
@@ -260,6 +252,10 @@ export default {
};
},
filters: {
+
+ /**
+ * 发票收据类型
+ */
receiptType(type) {
switch (type) {
case "VATORDINARY":
@@ -281,8 +277,6 @@ export default {
if (e.from == "backbutton") {
let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].options;
- console.log(routes);
-
routes.forEach((item) => {
if (
item.route == "pages/tabbar/cart/cartList" ||
@@ -309,8 +303,6 @@ export default {
uni.showLoading({
mask: true,
});
- // this.checkedshipMethod([this.shippingMethod[2]]);
-
this.getOrderList();
uni.hideLoading();
if (this.routerVal.way == "PINTUAN") {
@@ -327,9 +319,7 @@ export default {
//发票回调 选择发票之后刷新购物车
async callbackInvoice(val) {
this.invoiceFlag = false;
-
this.receiptList = val;
-
if (val) {
let submit = {
way: this.routerVal.way,
@@ -344,29 +334,11 @@ export default {
},
// 跳转到店铺
- tostore(val) {
+ navigateToStore(val) {
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
- // 点击配送方式选择
- // checkedshipMethod(val) {
- // API_Order.selectedShipMethod({
- // shippingMethod: val[0].value,
- // way: this.routerVal.way,
- // }).then((res) => {
- // if (res.data.code == 200) {
- // this.shippingText = val[0].value;
- // } else {
- // uni.showToast({
- // title: res.data.message,
- // duration: 2000,
- // icon: "none",
- // });
- // }
- // });
- // },
-
// 点击跳转地址
clickToAddress() {
this.navigateTo(
@@ -419,12 +391,18 @@ export default {
);
},
+ /**
+ * 跳转
+ */
navigateTo(url) {
uni.navigateTo({
url,
});
},
+ /**
+ * 提交订单准备支付
+ */
submit() {
if (!this.address.id) {
uni.showToast({
@@ -457,6 +435,9 @@ export default {
? (submit.parentOrderSn = this.routerVal.parentOrder.orderSn)
: delete submit.parentOrderSn;
+ /**
+ * 创建订单
+ */
API_Trade.createTrade(submit).then((res) => {
if (res.data.success) {
uni.showToast({
@@ -491,6 +472,9 @@ export default {
this.$u.debounce(this.submit(), 3000);
},
+ /**
+ * 微信小程序中直接支付
+ */
async pay(sn) {
new LiLiWXPay({
sn: sn,
@@ -499,7 +483,7 @@ export default {
},
/**
- * @param id
+ * 获取用户地址
*/
getUserAddress() {
// 如果没有商品选择地址的话 则选择 默认地址
@@ -509,8 +493,6 @@ export default {
","
);
this.address = res.data.result;
-
- console.log(this.address);
}
});
},
diff --git a/pages/order/invoice/invoiceDetail.vue b/pages/order/invoice/invoiceDetail.vue
index 21aea58..d941785 100644
--- a/pages/order/invoice/invoiceDetail.vue
+++ b/pages/order/invoice/invoiceDetail.vue
@@ -63,6 +63,9 @@ export default {
this.order = order;
});
},
+ /**
+ * 点击图片放大或保存
+ */
preview() {
//预览发票
if (this.order.elec_file_list.length) {
diff --git a/pages/order/invoice/setInvoice.vue b/pages/order/invoice/setInvoice.vue
index e8841b8..648b6c6 100644
--- a/pages/order/invoice/setInvoice.vue
+++ b/pages/order/invoice/setInvoice.vue
@@ -142,7 +142,7 @@ export default {
this.invoiceHeader[0].active = true;
this.goodsType[0].active = true;
}
- console.log(this.res);
+
},
methods: {
handleClickHeader(val, index, arr) {
diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue
index a42007c..805a550 100644
--- a/pages/order/myOrder.vue
+++ b/pages/order/myOrder.vue
@@ -3,27 +3,25 @@
{{ item.text }}
-
-
-
+
{{ order.storeName }}
{{
- orderStatusList[order.orderStatus]
+ order.orderStatus | orderStatusList
}}
-
+
@@ -31,7 +29,6 @@
{{ order.groupName }}
¥{{ order.flowPrice | unitPrice }}
-
@@ -41,53 +38,31 @@
-
已付金额:
应付金额:
¥{{ order.flowPrice | unitPrice }}
-
-
-
- 立即付款
+ 立即付款
取消订单
-
+
查看物流
-
+
确认收货
-
-
再次购买
-
-
-
-
-
@@ -136,17 +111,9 @@ export default {
},
data() {
return {
- tabCurrentIndex: 0,
- orderStatusList: {
- UNDELIVERED: "待发货",
- UNPAID: "未付款",
- PAID: "已付款",
- DELIVERED: "已发货",
- CANCELLED: "已取消",
- COMPLETED: "已完成",
- TAKE: "已完成",
- },
+ tabCurrentIndex: 0, //导航栏索引
navList: [
+ //导航栏list
{
state: 0,
text: "全部",
@@ -190,13 +157,14 @@ export default {
pageNumber: 1,
},
],
- status: "",
+ status: "", //接收导航栏状态
params: {
pageNumber: 1,
pageSize: 10,
tag: "ALL",
},
orderStatus: [
+ //订单状态
{
orderStatus: "ALL", //全部
},
@@ -216,14 +184,17 @@ export default {
orderStatus: "CANCELLED", //已取消
},
],
- cancelShow: false,
- orderSn: "",
+ cancelShow: false, //是否显示取消
+ orderSn: "", //ordersn
reason: "", //取消原因
- cancelList: "",
-
- rogShow: false,
+ cancelList: "", //取消列表
+ rogShow: false, //显示是否收货
};
},
+
+ /**
+ * 跳转到个人中心
+ */
onBackPress(e) {
if (e.from == "backbutton") {
uni.reLaunch({
@@ -232,9 +203,8 @@ export default {
return true; //阻止默认返回行为
}
},
- onPullDownRefresh(){
- this.loadData(this.status)
- // uni.stopPullDownRefresh();
+ onPullDownRefresh() {
+ this.loadData(this.status);
},
onLoad(options) {
@@ -251,6 +221,7 @@ export default {
},
watch: {
+ /**监听更改请求数据 */
tabCurrentIndex(val) {
this.params.tag = this.orderStatus[val].orderStatus;
//切换标签页将所有的页数都重置为1
@@ -264,13 +235,15 @@ export default {
},
methods: {
// 店铺详情
- tostore(val) {
+ navigateToStore(val) {
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
- //取消订单
+ /**
+ * 取消订单
+ */
onCancel(sn) {
this.orderSn = sn;
this.cancelShow = true;
@@ -284,34 +257,51 @@ export default {
uni.hideLoading();
});
},
+
+ /**
+ * 初始化数据
+ */
initData(index) {
this.navList[index].pageNumber = 1;
this.navList[index].loadStatus = "more";
this.navList[index].orderList = [];
this.loadData(index);
},
+
+ /**
+ * 等待支付
+ */
waitPay(val) {
- this.$u.debounce(this.pay(val), 3000)
+ this.$u.debounce(this.pay(val), 3000);
},
- pay(val){
- if(val.sn){
+
+ /**
+ * 支付
+ */
+ pay(val) {
+ if (val.sn) {
// #ifdef MP-WEIXIN
- new LiLiWXPay({sn:val.sn,price:val.flowPrice,orderType:'ORDER'}).pay()
+ new LiLiWXPay({
+ sn: val.sn,
+ price: val.flowPrice,
+ orderType: "ORDER",
+ }).pay();
// #endif
// #ifndef MP-WEIXIN
uni.navigateTo({
- url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
- })
+ url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
+ });
// #endif
}
},
-
- //获取订单列表
+ /**
+ * 获取订单列表
+ */
loadData(index) {
this.params.pageNumber = this.navList[index].pageNumber;
getOrderList(this.params).then((res) => {
- uni.stopPullDownRefresh()
+ uni.stopPullDownRefresh();
if (!res.data.success) {
this.navList[index].loadStatus = "noMore";
return false;
@@ -392,17 +382,26 @@ export default {
stateTipColor,
};
},
- onDetail(sn) {
+
+ /**
+ * 跳转到订单详情
+ */
+ navigateToOrderDetail(sn) {
uni.navigateTo({
url: "./orderDetail?sn=" + sn,
});
},
- //选择取消原因
+ /**
+ * 选择取消原因
+ */
reasonChange(reason) {
this.reason = reason;
},
- //提交取消订单(未付款)
+
+ /**
+ * 提交取消订单(未付款)
+ */
submitCancel() {
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
if (res.statusCode == 200) {
@@ -414,24 +413,28 @@ export default {
this.initData(0);
this.cancelShow = false;
- }
- else{
+ } else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
- this.cancelShow = false
+ this.cancelShow = false;
}
});
},
- //确认收货
+
+ /**
+ * 确认收货显示
+ */
onRog(sn) {
this.orderSn = sn;
this.rogShow = true;
-
- //
},
+
+ /**
+ * 点击确认收货
+ */
confirmRog() {
confirmReceipt(this.orderSn).then((res) => {
if (res.data.code == 200) {
@@ -445,28 +448,43 @@ export default {
}
});
},
- //评价商品
+
+ /**
+ * 评价商品
+ */
onComment(sn) {
uni.navigateTo({
url: "./evaluate/myEvaluate",
});
},
+
+ /**
+ * 重新购买
+ */
reBuy(order) {
uni.navigateTo({
- url: "/pages/product/goods?id=" + order.groupSkuId + "&goodsId="+ order.goodsId,
+ url:
+ "/pages/product/goods?id=" +
+ order.groupSkuId +
+ "&goodsId=" +
+ order.goodsId,
});
},
- //查看物流
- onLogistics(order) {
+
+ /**
+ * 查看物流
+ */
+ navigateToLogistics(order) {
uni.navigateTo({
- url: "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
+ url:
+ "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
});
},
},
};
-
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index 8d77b16..5075a71 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -75,12 +75,12 @@
- {{pointDetail.points}}
+ {{pointDetail.points}}
积分
- ¥{{ Fixed(goodsDetail.price)[0] }}.{{
- Fixed(goodsDetail.price)[1]
+ ¥{{ formatPrice(goodsDetail.price)[0] }}.{{
+ formatPrice(goodsDetail.price)[1]
}}
¥0 .00
@@ -158,7 +158,7 @@
-
+
店铺
@@ -214,8 +214,8 @@
-
+
@@ -245,7 +245,6 @@ import GoodsSwiper from "./product/goods/-goods-swiper"; //轮播图组件
import popupGoods from "./product/popup/goods"; //购物车商品的模块
import popupAddress from "./product/popup/address"; //地址选择模块
import shares from "@/components/m-share/index"; //分享
-
export default {
components: {
shares,
@@ -351,7 +350,7 @@ export default {
if (val) {
let timer = setInterval(() => {
this.$refs.popupGoods.buyType = "PINTUAN";
- console.log(this.$refs.popupGoods.buyType);
+
clearInterval(timer);
}, 100);
@@ -394,8 +393,7 @@ export default {
},
async onLoad(options) {
this.routerVal = options;
- },
- onShow() {
+
this.goodsDetail = {};
//如果有参数ids说明事分销短连接,需要获取参数
if (this.routerVal.scene) {
@@ -409,15 +407,11 @@ export default {
this.init(
this.routerVal.id,
this.routerVal.goodsId,
- this.routerVal.distributionId,
- this.routerVal.whetherPoint
+ this.routerVal.distributionId
);
}
},
- onReachBottom() {
- this.storeParams.pageNumber++;
- this.getOtherLikeGoods();
- },
+ onShow() {},
methods: {
// 循环出当前促销是否为空
emptyPromotion() {
@@ -430,7 +424,7 @@ export default {
}
},
/**初始化信息 */
- async init(id, goodsId, distributionId, whetherPoint) {
+ async init(id, goodsId, distributionId) {
this.isGroup = false; //初始化拼团
this.productId = id; // skuId
// 这里请求获取到页面数据 解析数据
@@ -456,7 +450,6 @@ export default {
// 积分
if (item.indexOf("POINTS_GOODS") == 0) {
this.pointDetail = this.PromotionList[item];
- console.log(this.pointDetail);
}
});
// 轮播图
@@ -466,7 +459,7 @@ export default {
this.getstoreBaseInfoFun(this.goodsDetail.storeId);
// 获取购物车
- this.cartNum();
+ this.cartCount();
// 获取店铺推荐商品
this.getstoreRecommend();
@@ -481,13 +474,14 @@ export default {
},
// 格式化金钱 1999 --> [1999,00]
- Fixed(val) {
+ formatPrice(val) {
if (typeof val == "undefined") {
return val;
}
return val.toFixed(2).split(".");
},
+ /**选择商品 */
changedGoods(val) {
this.selectedGoods = val;
},
@@ -516,7 +510,9 @@ export default {
this.shutMask(4, "PINTUAN", order);
},
- // 查看购物车
+ /**
+ * 查看购物车
+ */
reluchToCart() {
let obj = {
from: "product",
@@ -528,8 +524,10 @@ export default {
});
},
- // 查询购物车总数量
- cartNum() {
+ /**
+ * 查询购物车总数量
+ */
+ cartCount() {
if (storage.getHasLogin()) {
API_trade.getCartNum().then((res) => {
this.nums = res.data.result;
@@ -537,11 +535,25 @@ export default {
}
},
+ /**
+ * 返回
+ */
back() {
- uni.navigateBack();
+
+ if(getCurrentPages().length ==1){
+ uni.switchTab({
+ url: '/pages/tabbar/home/index'
+ });
+ }
+ else{
+ uni.navigateBack();
+ }
+
},
- // 获取店铺信息
+ /**
+ * 获取店铺信息
+ */
getstoreBaseInfoFun(id) {
API_store.getstoreBaseInfo(id).then((res) => {
if (res.data.success) {
@@ -550,9 +562,10 @@ export default {
});
},
- // 删除收藏店铺
+ /**
+ * 删除收藏店铺
+ */
deleteGoodsCollectionFun(id) {
- // deleteStoreCollection
API_Members.deleteGoodsCollection(id).then((res) => {
if (res.statusCode == 200) {
uni.showToast({
@@ -564,7 +577,9 @@ export default {
});
},
- // 获取商品是否已被收藏
+ /**
+ * 获取商品是否已被收藏
+ */
getGoodsCollectionFun(goodsId) {
if (storage.getHasLogin()) {
API_Members.getGoodsIsCollect(goodsId, "GOODS").then((res) => {
@@ -573,7 +588,9 @@ export default {
}
},
- // 获取店铺推荐商品列表
+ /**
+ * 获取店铺推荐商品列表
+ */
getstoreRecommend() {
getGoodsList({
pageNumber: 1,
@@ -585,7 +602,9 @@ export default {
});
},
- // 获取相似商品列表
+ /**
+ * 获取相似商品列表
+ */
getOtherLikeGoods() {
getGoodsList({
pageNumber: 1,
@@ -597,7 +616,9 @@ export default {
});
},
- // 领取优惠券
+ /**
+ * 领取优惠券
+ */
receiveCouponsFun(id) {
API_Members.receiveCoupons(id).then((res) => {
uni.showToast({
@@ -607,18 +628,25 @@ export default {
});
},
- linkstorePage(store_id) {
+ /**
+ * 跳转到店铺页面
+ */
+ navigateToStore(store_id) {
uni.navigateTo({
url: `/pages/product/shopPage?id=` + store_id,
});
},
- //获取优惠券按钮
+ /**
+ * 获取优惠券按钮
+ */
getCoupon(item) {
this.receiveCouponsFun(item.id);
},
- //规格弹窗开关
+ /**
+ * 规格弹窗开关
+ */
shutMask(flag, buyFlag, type) {
// type是指是否点击底部按钮
if (flag) {
@@ -656,14 +684,15 @@ export default {
}
},
- //收藏
+ /**
+ * 收藏
+ */
clickFavorite(id) {
if (this.favorite) {
// 取消收藏
this.deleteGoodsCollectionFun(id);
return false;
}
-
API_Members.collectionGoods(id, "GOODS").then((res) => {
if (res.data.success) {
uni.showToast({
@@ -672,16 +701,16 @@ export default {
});
}
});
-
this.favorite = !this.favorite;
},
- // 顶部header显示或隐藏
+ /**
+ * 顶部header显示或隐藏
+ */
pageScroll(e) {
if (this.scrollFlag) {
this.calcSize();
}
-
if (e.detail.scrollTop > 200) {
//当距离大于200时显示回到顶部按钮
this.headerFlag = true;
@@ -702,7 +731,10 @@ export default {
this.scrollId = "4";
}
},
- //计算每个要跳转到的模块高度信息
+
+ /**
+ * 计算每个要跳转到的模块高度信息
+ */
calcSize() {
let h = 0;
let that = this;
@@ -744,7 +776,10 @@ export default {
});
this.scrollFlag = false;
},
- // 点击顶部跳转到对应位置
+
+ /**
+ * 点击顶部跳转到对应位置
+ */
headerTab(id) {
if (this.scrollFlag) {
this.calcSize();
@@ -756,7 +791,9 @@ export default {
});
},
- // 点击分享
+ /**
+ * 点击分享
+ */
async shareChange() {
this.shareFlage = true;
},
diff --git a/pages/product/product/evaluation/-evaluation.vue b/pages/product/product/evaluation/-evaluation.vue
index d036649..eaa6e69 100644
--- a/pages/product/product/evaluation/-evaluation.vue
+++ b/pages/product/product/evaluation/-evaluation.vue
@@ -17,7 +17,7 @@
-
+
@@ -37,7 +37,7 @@