19 Commits
v4.2 ... v4.2.1

Author SHA1 Message Date
lemon橪
65a9110ada 合并分支 2021-07-15 15:10:43 +08:00
lemon橪
fc9b7bac16 优化部分页面以及逻辑 2021-07-15 15:10:27 +08:00
mabo
3171fddd7b 售后列表添加排序字段 2021-07-08 14:35:40 +08:00
lemon橪
2df8be328f 补交上次提交遗漏部分 2021-07-07 16:42:12 +08:00
lemon橪
8f942bf01e 优化验证码 以及跳转部分 2021-07-07 15:59:48 +08:00
lemon橪
346eb13d50 新增拼团活动为空时优化提示 2021-07-07 10:56:57 +08:00
lemon橪
b8e0ddcb5a 优化个人中心页面的样式 2021-07-05 15:26:44 +08:00
lemon橪
10d8f25ddf 新增可配置组件 2021-07-05 11:30:46 +08:00
lemon橪
96d42cdab8 修改一些可见的问题 2021-07-02 17:58:49 +08:00
mabo
3294f12268 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp
# Conflicts:
#	pages/product/goods.vue
2021-07-02 15:49:24 +08:00
mabo
29630a8495 商品参数修改 2021-07-02 15:47:08 +08:00
lemon橪
9f48cc7110 分销认证新增 银行开户行 银行开户名 银行账号 2021-07-02 15:26:52 +08:00
lemon橪
efb2a7963e 微信小程序版本提交更新版本 解决缓存问题 2021-07-02 10:52:36 +08:00
lemon橪
8ecc85a21c 优化上个提交中app以及小程序 的样式 问题 2021-07-01 15:46:42 +08:00
lemon橪
765ad65b8f 新增商品超出配送范围 提示 2021-07-01 15:25:00 +08:00
lemon橪
8500fb4087 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp 2021-07-01 11:16:52 +08:00
lemon橪
ef51049ed4 分销商铺解绑,优化商品售后部分的流程 2021-07-01 11:16:46 +08:00
mabo
ef5941de00 商品详情规则选择的bug 2021-06-30 18:25:45 +08:00
lemon橪
4599b02a41 直播间优化提示,安卓以及ios扫码权限判定 2021-06-29 16:26:32 +08:00
50 changed files with 1646 additions and 657 deletions

31
App.vue
View File

@@ -58,6 +58,10 @@ export default {
this.checkArguments(); // 检测启动参数 this.checkArguments(); // 检测启动参数
}); });
// #endif // #endif
// #ifdef MP-WEIXIN
this.applyUpdateWeChat();
// #endif
}, },
onShow() { onShow() {
@@ -66,6 +70,33 @@ export default {
// #endif // #endif
}, },
methods: { methods: {
/**
* 微信小程序版本提交更新版本 解决缓存问题
*/
applyUpdateWeChat() {
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
});
updateManager.onUpdateReady(function (res) {
uni.showModal({
title: "更新提示",
content: "发现新版本,是否重启应用?",
success(res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate();
}
},
});
});
updateManager.onUpdateFailed(function (res) {
// 新的版本下载失败
});
},
// TODO 开屏广告 后续优化添加 // TODO 开屏广告 后续优化添加
launch() { launch() {
try { try {

View File

@@ -197,10 +197,11 @@ export function distributionGoods(params) {
/** /**
* 选择分销商品 分销商品id * 选择分销商品 分销商品id
*/ */
export function checkedDistributionGoods(id) { export function checkedDistributionGoods(params) {
return http.request({ return http.request({
url: `/distributionGoods/checked/${id}`, url: `/distributionGoods/checked/${params.id}`,
method: Method.GET, method: Method.GET,
params
}); });
} }

View File

@@ -1,11 +1,6 @@
import { import { http } from "@/utils/request.js";
http
} from "@/utils/request.js";
import api from '@/config/api.js'
import api from "@/config/api.js";
/** /**
* 通过短信重置密码 * 通过短信重置密码
@@ -15,11 +10,10 @@ export function resetByMobile(params) {
return http.request({ return http.request({
url: `/members/resetByMobile`, url: `/members/resetByMobile`,
method: "POST", method: "POST",
params params,
}); });
} }
/** /**
* 发送验证码 * 发送验证码
* @param mobile * @param mobile
@@ -43,20 +37,18 @@ export function smsLogin(params, clientType) {
data: params, data: params,
header: { header: {
"content-type": "application/x-www-form-urlencoded", "content-type": "application/x-www-form-urlencoded",
"clientType": clientType clientType: clientType,
} },
}); });
} }
/** /**
* 修改密码 * 修改密码
* @param newPassword * @param newPassword
* @param password * @param password
*/ */
export function modifyPass(params) { export function modifyPass(params) {
return http.request({ return http.request({
url: `/members/modifyPass`, url: `/members/modifyPass`,
method: "PUT", method: "PUT",
@@ -68,7 +60,6 @@ export function smsLogin(params, clientType) {
* 刷新token * 刷新token
*/ */
export function refreshTokenFn(refresh_token) { export function refreshTokenFn(refresh_token) {
return http.request({ return http.request({
url: `/members/refresh/${refresh_token}`, url: `/members/refresh/${refresh_token}`,
method: "GET", method: "GET",

View File

@@ -13,7 +13,7 @@ export function getLiveList(params) {
return http.request({ return http.request({
url: `broadcast/studio`, url: `broadcast/studio`,
method: Method.GET, method: Method.GET,
params params,
}); });
} }
@@ -91,3 +91,72 @@ export function getAllCoupons(params) {
params, params,
}); });
} }
/**
* 分页获取砍价商品
* @param params
*/
export function getBargainList(params) {
return http.request({
url: "/promotion/kanjiaGoods",
method: Method.GET,
params,
});
}
/**
* 分页获取砍价商品
* @param params
*/
export function getBargainDetail(id) {
return http.request({
url: `/promotion/kanjiaGoods/${id}`,
method: Method.GET,
});
}
/**
* 获取砍价活动
* @param params
*/
export function getBargainActivity(params) {
return http.request({
url: `/promotion/kanjiaGoods/getKanjiaActivity`,
method: Method.POST,
params,
});
}
/**
* 发起砍价活动
* @param params
*/
export function openBargain(params) {
return http.request({
url: `/promotion/kanjiaGoods`,
method: Method.POST,
header: { "content-type": "application/x-www-form-urlencoded" },
data: params,
});
}
/**
* 分页获取砍价活动-帮砍记录
*/
export function getBargainLog(params) {
return http.request({
url: `/promotion/kanjiaGoods/getKanjiaActivity/logs`,
method: Method.GET,
data: params,
});
}
/**
* 分页获取砍价活动-帮砍记录
*/
export function helpBargain(kanJiaActivityId) {
return http.request({
url: `promotion/kanjiaGoods/help/${kanJiaActivityId}`,
method: Method.POST,
});
}

View File

@@ -0,0 +1,10 @@
## 商品推荐
### OBJECT 参数说明
属性|说明|类型|必填
---|---|---|---
`title`|标题,用于顶部显示的内容|String|否
`pageSize`|显示多少条数据建议是2的倍数,默认为12条|*|否
`categoryId`|分类id|Function|否
`storeId`|卖家id搜索店铺商品的时候使用|String|否

View File

@@ -0,0 +1,153 @@
<template>
<div>
<div class="goods-recommend">{{title ? `--${title}-- `:''}}</div>
<div class="goods-list">
<div @click="handleClick(item)" class="goods-item" v-for="(item, item_index) in goodsList" :key="item_index">
<div class="goods-img">
<u-image :src="item.thumbnail" mode="aspectFill" height="350rpx" width="100%">
<u-loading slot="loading"></u-loading>
</u-image>
</div>
<div class="goods-desc">
<div class="goods-title">
{{ item.goodsName }}
</div>
<div class="goods-bottom">
<div class="goods-price">{{ item.price | unitPrice }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { getGoodsList } from "@/api/goods.js";
export default {
data() {
return {
goodsList: [],
params: {
pageNumber: 1,
},
};
},
props: {
title: {
type: String,
default: "",
},
pageSize: {
type: null,
default: 12,
},
categoryId: {
type: null,
default: "",
},
storeId: {
type: null,
default: "",
},
},
mounted() {
this.initGoods();
},
methods: {
/**
* 初始化商品
*/
async initGoods() {
let submit = JSON.parse(
JSON.stringify(
Object.assign(this.params, {
pageSize: this.pageSize,
categoryId: this.categoryId,
storeId: this.storeId,
})
)
);
Object.keys(submit).map((key) => {
if (!submit[key] || submit[key].length == 0) {
delete submit[key];
}
});
let goodsList = await getGoodsList(submit);
this.goodsList.push(...goodsList.data.result.content);
},
handleClick(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},
},
};
</script>
<style scoped lang="scss">
/**商品代码 */
$w_94: 94%;
.goods-recommend {
background: #f7f7f7;
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 30rpx;
font-weight: bold;
}
.goods-list {
display: flex;
flex-wrap: wrap;
background: #f7f7f7;
}
.goods-item {
width: 50%;
margin-bottom: 10px;
border-radius: 0.4em;
overflow: hidden;
}
.goods-img {
position: relative;
margin: 0 auto;
width: $w_94;
height: 350rpx;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
> img {
width: 100%;
height: 100%;
}
}
.goods-desc {
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
width: $w_94;
background: #fff;
padding: 8rpx 0 8rpx 8rpx;
margin: 0 auto;
> .goods-title {
font-size: 12px;
height: 70rpx;
display: -webkit-box;
font-weight: 500;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
> .goods-bottom {
display: flex;
font-weight: bold;
> .goods-price {
line-height: 2;
color: $main-color;
}
}
}
</style>

View File

@@ -72,10 +72,14 @@ export default {
// h5复制链接 // h5复制链接
// #ifdef H5 // #ifdef H5
copyLink() { copyLink() {
let content = let content;
if (this.link) {
content = this.configs.shareLink + this.link;
} else {
content =
this.configs.shareLink + this.configs.shareLink +
getCurrentPages()[getCurrentPages().length - 1].__page__.fullPath; getCurrentPages()[getCurrentPages().length - 1].__page__.fullPath;
}
if (content === null || content === undefined) { if (content === null || content === undefined) {
content = ""; content = "";
} else content = content + ""; } else content = content + "";
@@ -104,6 +108,8 @@ export default {
shareTitle = `我发现了一个${this.goodsName}店铺快来跟我一起看看吧`; shareTitle = `我发现了一个${this.goodsName}店铺快来跟我一起看看吧`;
} else if (this.type == "pintuan") { } else if (this.type == "pintuan") {
shareTitle = `我拼了一个${this.goodsName}快来跟我一起抢购吧!`; shareTitle = `我拼了一个${this.goodsName}快来跟我一起抢购吧!`;
} else if (this.type == "kanjia") {
shareTitle = `请快来帮我砍一刀${this.goodsName}`;
} }
let scene; // "WXSenceTimeline 朋友圈 WXSceneSession 微信好友" let scene; // "WXSenceTimeline 朋友圈 WXSceneSession 微信好友"

View File

@@ -56,7 +56,7 @@
<script> <script>
import api from "@/config/api.js"; import api from "@/config/api.js";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
import uuid from "@/utils/uuid.modified.js";
const phone = uni.getSystemInfoSync(); const phone = uni.getSystemInfoSync();
const l = phone.screenWidth / 750; const l = phone.screenWidth / 750;
export default { export default {
@@ -65,12 +65,7 @@ export default {
// 可自行调整 // 可自行调整
this.scHight = phone.screenHeight / 2 - 200 + "px"; this.scHight = phone.screenHeight / 2 - 200 + "px";
this.getCode(); this.getCode();
// 监听是否要重新验证
uni.$on("vert", (data) => {
this.vsr = data;
this.vsrtx = "点击进行验证";
this.getCode();
});
}, },
props: { props: {
height: { height: {
@@ -136,10 +131,19 @@ export default {
this.hid = !this.hid; this.hid = !this.hid;
} }
}, },
error() {
this.vsr = false;
this.hid = false;
this.moveX = 0;
this.moveCode = 0;
},
// 获取验证图片 // 获取验证图片
getCode() { getCode() {
this.col = "#b3afae"; this.col = "#b3afae";
this.hasImg = "图片加载中..."; this.hasImg = "图片加载中...";
if (!storage.getUuid()) {
storage.setUuid(uuid.v1());
}
uni.request({ uni.request({
url: api.common + "/slider/" + this.business, url: api.common + "/slider/" + this.business,
header: { header: {
@@ -472,16 +476,10 @@ export default {
bottom: 70rpx; bottom: 70rpx;
} }
.moneycolor { .moneycolor {
color: #ea5002; color: #ea5002;
} }
.margin-top { .margin-top {
margin-top: 20rpx; margin-top: 20rpx;
} }
@@ -498,14 +496,10 @@ export default {
margin-left: 20rpx; margin-left: 20rpx;
} }
.margin-right { .margin-right {
margin-right: 20rpx; margin-right: 20rpx;
} }
.main-color { .main-color {
color: #07d188; color: #07d188;
} }

View File

@@ -6,6 +6,7 @@
const dev = { const dev = {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn",
}; };
// 生产环境 // 生产环境
const prod = { const prod = {

View File

@@ -2,8 +2,8 @@
"name" : "lili商城", "name" : "lili商城",
"appid" : "__UNI__C100675", "appid" : "__UNI__C100675",
"description" : "", "description" : "",
"versionName" : "4.0.21", "versionName" : "4.0.23",
"versionCode" : 4000021, "versionCode" : 4000023,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
"compatible" : { "compatible" : {

View File

@@ -483,6 +483,20 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
}
},{
"path": "bargain/list",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},{
"path": "bargain/detail",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
} }
} }

View File

@@ -94,18 +94,11 @@ export default {
formatList: [], formatList: [],
currentSelceted: [], currentSelceted: [],
skuList: "", skuList: "",
isMask:false, //是否显示遮罩层 isMask: false, //是否显示遮罩层
isClose:false, //是否可以点击遮罩关闭 isClose: false, //是否可以点击遮罩关闭
}; };
}, },
props: [ props: ["goodsDetail", "buyMask", "selectedSku", "goodsSpec", "addr"],
"goodsDetail",
"buyMask",
"selectedSku",
"goodsSpec",
"addr",
],
watch: { watch: {
buyType: { buyType: {
handler(val) { handler(val) {
@@ -162,7 +155,25 @@ export default {
}; };
this.selectName = specValue.value; this.selectName = specValue.value;
this.$emit("handleClickSku", selectedSkuId.skuId,this.goodsDetail.id); this.$emit("handleClickSku", selectedSkuId.skuId, this.goodsDetail.id);
},
/**
* 直接购买
*/
buy(data) {
API_trade.addToCart(data).then((res) => {
if (res.data.code == 200) {
uni.navigateTo({
url: `/pages/order/fillorder?way=${data.cartType}&addr=${
this.addr.id || ""
}&parentOrder=${encodeURIComponent(
JSON.stringify(this.parentOrder)
)}`,
});
}
});
}, },
/** /**
@@ -208,19 +219,7 @@ export default {
data.cartType = "BUY_NOW"; data.cartType = "BUY_NOW";
} }
this.buy(data);
API_trade.addToCart(data).then((res) => {
if (res.data.code == 200) {
uni.navigateTo({
url: `/pages/order/fillorder?way=${data.cartType}&addr=${
this.addr.id || ''
}&parentOrder=${encodeURIComponent(
JSON.stringify(this.parentOrder)
)}`,
});
}
});
} }
}, },
formatSku(list) { formatSku(list) {

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="wrapper"> <view class="wrapper" v-if="flage">
<div class='goods' v-if="selectedGoods"> <div class='goods' v-if="selectedGoods">
<image class="goods-image" :src="selectedGoods.thumbnail" alt=""> <image class="goods-image" :src="selectedGoods.thumbnail" alt="">
<p class="goodsName">{{selectedGoods.goodsName}}</p> <p class="goodsName">{{selectedGoods.goodsName}}</p>
@@ -72,6 +72,7 @@ import popupGoods from "./popup/goods"; //购物车商品的模块
export default { export default {
data() { data() {
return { return {
flage:false, //判断接口是否正常请求
addr: { addr: {
id: "", id: "",
}, },
@@ -138,7 +139,8 @@ export default {
// 实例化本页面 // 实例化本页面
async init(sn, sku) { async init(sn, sku) {
let res = await getPinTuanShare(sn, sku); let res = await getPinTuanShare(sn, sku);
if (res.data.success) { if (res.data.success && res.data.result.promotionGoods) {
this.flage = true
this.data = res.data.result; this.data = res.data.result;
this.selectedGoods = res.data.result.promotionGoods; this.selectedGoods = res.data.result.promotionGoods;
let endTime = Date.parse( let endTime = Date.parse(
@@ -175,12 +177,17 @@ export default {
// 获取当前商品是否已经购买 // 获取当前商品是否已经购买
if (storage.getUserInfo().id) { if (storage.getUserInfo().id) {
let isBuy = res.data.result.pintuanMemberVOS.filter((item) => { let isBuy = res.data.result.pintuanMemberVOS.filter((item) => {
return item.memberId == storage.getUserInfo().id; return item.memberId == storage.getUserInfo().id;
}); });
isBuy.length != 0 ? (this.isBuy = true) : (this.isBuy = false); isBuy.length != 0 ? (this.isBuy = true) : (this.isBuy = false);
} }
} else {
uni.showToast({
title: '当前拼团单有误!请联系管理员重试',
duration: 2000,
icon:"none"
});
} }
}, },
// 获取商品详情 // 获取商品详情

View File

@@ -31,46 +31,29 @@
</div> </div>
<!-- #endif --> <!-- #endif -->
</div> </div>
<div class="goods-recommend">--商品推荐--</div> <goodsRecommend />
<div class="goods-list">
<div @click="handleClick(item)" class="goods-item" v-for="(item, item_index) in goodsList" :key="item_index">
<div class="goods-img">
<u-image :src="item.thumbnail" mode="aspectFill" height="350rpx" width="100%">
<u-loading slot="loading"></u-loading>
</u-image>
</div>
<div class="goods-desc">
<div class="goods-title">
{{ item.goodsName }}
</div>
<div class="goods-bottom">
<div class="goods-price">{{ item.price | unitPrice }}</div>
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { getGoodsList } from "@/api/goods.js";
import { getWeChatMpMessage } from "@/api/message.js"; import { getWeChatMpMessage } from "@/api/message.js";
import goodsRecommend from "@/components/m-goods-recommend";
export default { export default {
data() { data() {
return { return {
checked: false, checked: false,
paymentMethod: "", paymentMethod: "",
from: "", from: "",
payPrice: 0, payPrice: 0,
goodsList: [], goodsList: [],
activeColor: this.$mainColor, activeColor: this.$mainColor,
params: {
pageSize: 12,
pageNumber: 1,
},
}; };
}, },
components: {
goodsRecommend,
},
filters: { filters: {
paymentTypeFilter(val) { paymentTypeFilter(val) {
switch (val) { switch (val) {
@@ -90,8 +73,6 @@ export default {
this.from = options.from || ""; this.from = options.from || "";
this.payPrice = options.payPrice || 0; this.payPrice = options.payPrice || 0;
this.orderType = options.orderType; this.orderType = options.orderType;
//搜索商品
this.initGoods();
}, },
methods: { methods: {
checkOrder() { checkOrder() {
@@ -102,8 +83,8 @@ export default {
*/ */
if (this.orderType == "RECHARGE") { if (this.orderType == "RECHARGE") {
uni.reLaunch({ uni.reLaunch({
url: `/pages/mine/deposit/operation` url: `/pages/mine/deposit/operation`,
}) });
} else { } else {
this.navigateTo("/pages/order/myOrder?status=0"); this.navigateTo("/pages/order/myOrder?status=0");
} }
@@ -113,10 +94,7 @@ export default {
this.sendMessage(); this.sendMessage();
} }
}, },
async initGoods() {
let goodsList = await getGoodsList(this.params);
this.goodsList.push(...goodsList.data.result.content);
},
sendMessage() { sendMessage() {
//订阅消息 //订阅消息
//#ifdef MP-WEIXIN //#ifdef MP-WEIXIN
@@ -141,12 +119,6 @@ export default {
//#endif //#endif
}, },
handleClick(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},
navigateTo(url, type) { navigateTo(url, type) {
if (type === "switch") { if (type === "switch") {
uni.switchTab({ uni.switchTab({
@@ -233,84 +205,4 @@ export default {
background: #fff; background: #fff;
border-top-right-radius: 100rpx; border-top-right-radius: 100rpx;
} }
/**商品代码 */
$w_94: 94%;
.goods-recommend {
background: #f7f7f7;
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 30rpx;
font-weight: bold;
}
.goods-list {
display: flex;
flex-wrap: wrap;
background: #f7f7f7;
}
.goods-item {
width: 50%;
margin-bottom: 10px;
border-radius: 0.4em;
overflow: hidden;
}
.goods-img {
position: relative;
margin: 0 auto;
// width: 158px;
width: $w_94;
height: 350rpx;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
> img {
width: 100%;
height: 100%;
}
}
.goods-desc {
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
width: $w_94;
background: #fff;
padding: 8rpx 0 8rpx 8rpx;
margin: 0 auto;
> .goods-title {
font-size: 12px;
height: 70rpx;
display: -webkit-box;
font-weight: 500;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
> .goods-bottom {
display: flex;
font-weight: bold;
> .goods-price {
line-height: 2;
color: $main-color;
}
}
}
.goods-icon {
right: 10rpx;
top: 10rpx;
position: absolute;
}
</style> </style>

View File

@@ -27,8 +27,19 @@ export default {
}; };
}, },
async mounted() { async mounted() {
if (this.$options.filters.isLogin("auth")) {
let result = await getUserWallet(); //预存款 let result = await getUserWallet(); //预存款
this.walletNum = result.data.result.memberWallet; this.walletNum = result.data.result.memberWallet;
} else {
uni.showToast({
icon: "none",
duration: 3000,
title: "请先登录!",
});
uni.redirectTo({
url: "/pages/passport/login",
});
}
}, },
methods: { methods: {
back() { back() {

View File

@@ -8,10 +8,16 @@
<u-input v-model="ruleForm.name" placeholder="请输入您的真实姓名" /> <u-input v-model="ruleForm.name" placeholder="请输入您的真实姓名" />
</u-form-item> </u-form-item>
<u-form-item label="身份证" prop="idNumber"> <u-form-item label="身份证" prop="idNumber">
<u-input <u-input v-model="ruleForm.idNumber" placeholder="请输入身份证号码" />
v-model="ruleForm.idNumber" </u-form-item>
placeholder="请输入身份证号码" <u-form-item label="银行开户行" prop="settlementBankBranchName">
/> <u-input v-model="ruleForm.settlementBankBranchName" type="text" placeholder="请输入银行开户行" />
</u-form-item>
<u-form-item label="银行开户名" prop="settlementBankAccountName">
<u-input v-model="ruleForm.settlementBankAccountName" type="text" placeholder="请输入银行开户名" />
</u-form-item>
<u-form-item label="银行账号" prop="settlementBankAccountNum">
<u-input v-model="ruleForm.settlementBankAccountNum" type="text" placeholder="请输入银行账号" />
</u-form-item> </u-form-item>
<!-- <u-form-item label="身份证正面照" prop="name"> <!-- <u-form-item label="身份证正面照" prop="name">
<u-upload></u-upload> <u-upload></u-upload>
@@ -35,12 +41,16 @@
</template> </template>
<script> <script>
import { applyDistribution } from "@/api/goods"; import { applyDistribution } from "@/api/goods";
import { checkBankno } from "@/utils/Foundation";
export default { export default {
data() { data() {
return { return {
ruleForm: { ruleForm: {
name: "", name: "",
idNumber: "", idNumber: "",
settlementBankBranchName: "", // 银行开户行
settlementBankAccountName: "", //银行开户名
settlementBankAccountNum: "", //银行账号
}, },
rules: { rules: {
name: [ name: [
@@ -62,6 +72,50 @@ export default {
trigger: ["change", "blur"], trigger: ["change", "blur"],
}, },
], ],
// 银行开户行
settlementBankBranchName: [
{
required: true,
message: "银行开户行",
// 可以单个或者同时写两个触发验证方式
trigger: "blur",
},
{
validator: (rule, value, callback) => {
// 上面有说返回true表示校验通过返回false表示不通过
// this.$u.test.mobile()就是返回true或者false的
return this.$u.test.chinese(value);
},
message: "银行开户行不正确",
// 触发器可以同时用blur和change
trigger: ["change", "blur"],
},
], //银行开户名
settlementBankAccountName: [
{
required: true,
message: "银行开户名",
// 可以单个或者同时写两个触发验证方式
trigger: "blur",
},
],
//银行账号
settlementBankAccountNum: [
{
required: true,
message: "银行账号不正确",
// 可以单个或者同时写两个触发验证方式
trigger: "blur",
},
{
validator: (rule, value, callback) => {
// 上面有说返回true表示校验通过返回false表示不通过
// this.$u.test.mobile()就是返回true或者false的
return checkBankno(value);
},
message: "银行账号不正确",
},
],
idNumber: [ idNumber: [
{ {
required: true, required: true,
@@ -96,16 +150,14 @@ export default {
icon: "none", icon: "none",
}); });
setTimeout(()=>{ setTimeout(() => {
uni.navigateBack(); uni.navigateBack();
},500) }, 500);
} else {
}
else{
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
duration: 2000, duration: 2000,
icon:"none" icon: "none",
}); });
} }
}); });

View File

@@ -1,6 +1,7 @@
<template> <template>
<view class="log-list"> <view class="log-list">
<view class="log-way" v-for="(item, index) in datas" :key="index"> <!-- 提现记录 -->
<view class="log-way" v-if="cashLogData.length != 0" v-for="(item, index) in cashLogData" :key="index">
<view class="log-item"> <view class="log-item">
<view class="log-item-view"> <view class="log-item-view">
<view class="title">{{ <view class="title">{{
@@ -18,10 +19,22 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 分销业绩 -->
<view class="log-way" v-if="achievementData.length != 0" v-for="(item, index) in achievementData" :key="index">
<view class="log-item">
<view class="log-item-view">
<view class="title">{{item.goodsName}}</view>
<view class="price">+{{ item.rebate | unitPrice }}</view>
</view>
<view class="log-item-view">
<view>{{ item.createTime }}</view>
<view>{{item.storeName}}</view>
</view>
</view>
</view>
<view class="empty" v-if="empty"> <view class="empty" v-if="empty">
<u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" /> <u-loadmore :status="status" :icon-type="iconType" bg-color="#f7f7f7" />
<!-- <u-empty text="暂无更多提现历史" mode="order"></u-empty> -->
</view> </view>
</view> </view>
</template> </template>
@@ -30,7 +43,8 @@ import { cashLog, distributionOrderList } from "@/api/goods";
export default { export default {
data() { data() {
return { return {
datas: "", //数据集合 cashLogData: [], //提现记录数据集合
achievementData: [], //分销业绩数据合集,
status: "loadmore", status: "loadmore",
iconType: "flower", iconType: "flower",
empty: false, empty: false,
@@ -71,7 +85,18 @@ export default {
methods: { methods: {
// 业绩 // 业绩
achievement() { achievement() {
distributionOrderList(this.achParams).then((res) => {}); uni.showLoading({
title: "加载中",
});
distributionOrderList(this.achParams).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) {
this.achievementData = res.data.result.records;
} else {
this.status = "nomore";
this.empty = true;
}
uni.hideLoading();
});
}, },
// 初始化提现历史 // 初始化提现历史
history() { history() {
@@ -80,7 +105,7 @@ export default {
}); });
cashLog(this.params).then((res) => { cashLog(this.params).then((res) => {
if (res.data.success && res.data.result.records.length >= 1) { if (res.data.success && res.data.result.records.length >= 1) {
this.datas = res.data.result.records; this.cashLogData = res.data.result.records;
} else { } else {
this.status = "nomore"; this.status = "nomore";
this.empty = true; this.empty = true;

View File

@@ -82,7 +82,7 @@ export default {
}); });
}, },
}, },
mounted() { onShow() {
this.init(); this.init();
}, },
}; };
@@ -90,21 +90,15 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.nav { .nav {
// height: 176rpx;
background: #fff; background: #fff;
align-items: center; align-items: center;
display: flex; display: flex;
// border-radius: 20rpx;
// transform: translateY(-20rpx);
// box-shadow: 4rpx 10rpx 22rpx rgba(0, 0, 0, 0.1);
flex-wrap: wrap; flex-wrap: wrap;
} }
.nav-list { .nav-list {
color: #fff; color: #fff;
padding: 40rpx 0; padding: 40rpx 0;
background: $aider-light-color; background: $aider-light-color;
// border-bottom-left-radius: 100rpx;
// border-bottom-right-radius: 100rpx;
} }
.total { .total {
padding: 10rpx 0; padding: 10rpx 0;

View File

@@ -1,7 +1,7 @@
<template> <template>
<view class="wrapper"> <view class="wrapper">
<!-- 筛选弹出层 --> <!-- 筛选弹出层 TODO后续版本更新 -->
<u-popup width="90%" v-model="popup" mode="right"> <!-- <u-popup width="90%" v-model="popup" mode="right">
<view class="screen-title">商品筛选</view> <view class="screen-title">商品筛选</view>
<view class="screen-view"> <view class="screen-view">
@@ -54,7 +54,7 @@
<view class="screen-clear"> 重置 </view> <view class="screen-clear"> 重置 </view>
<view class="screen-submit"> 确定 </view> <view class="screen-submit"> 确定 </view>
</view> </view>
</u-popup> </u-popup> -->
<!-- 导航栏 --> <!-- 导航栏 -->
<view class="nav"> <view class="nav">
@@ -66,7 +66,10 @@
<!-- 商品列表 --> <!-- 商品列表 -->
<view class="goods-list"> <view class="goods-list">
<view class="goods-item" v-for="(item, index) in goodsList" :key="index"> <u-swipe-action v-for="(item, index) in goodsList" :disabled="!params.checked" :show="item.___selected" @open="openAction(item)" :index="index" :options="options" bg-color="#fff"
ref="swiperAction" :key="item.id" @click="changeActionTab(item)">
<div class="goods-item">
<view class="goods-item-img" @click="handleNavgationGoods(item)"> <view class="goods-item-img" @click="handleNavgationGoods(item)">
<u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image> <u-image width="176rpx" height="176rpx" :src="item.thumbnail"></u-image>
</view> </view>
@@ -97,13 +100,16 @@
</view> </view>
</view> </view>
</view> </view>
</view> </div>
</u-swipe-action>
<view class="empty"> <view class="empty">
<!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> --> <!-- <u-empty v-if="empty" text="没有分销商品了" mode="list"></u-empty> -->
</view> </view>
</view> </view>
<canvas class="canvas-hide" canvas-id="qrcode" /> <canvas class="canvas-hide" canvas-id="qrcode" />
<drawCanvas ref="drawCanvas" v-if="showFlag" :res="res" /> <drawCanvas ref="drawCanvas" v-if="showFlag" :res="res" />
<u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal>
</view> </view>
</template> </template>
@@ -118,6 +124,17 @@ import drawCanvas from "@/components/m-canvas";
export default { export default {
data() { data() {
return { return {
lightColor: this.$lightColor,
deleteContent: "解绑该商品?", //删除显示的信息
// 商品栏右侧滑动按钮
options: [
{
text: "解绑",
style: {
backgroundColor: this.$lightColor, //高亮颜色
},
},
],
showFlag: false, //分销分享开关 showFlag: false, //分销分享开关
empty: false, empty: false,
popup: false, //弹出层开关 popup: false, //弹出层开关
@@ -147,6 +164,8 @@ export default {
}, },
routers: "", routers: "",
deleteShow: false, //删除模态框
goodsVal: false, //分销商铺信息
}; };
}, },
components: { components: {
@@ -163,6 +182,46 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
/**
* 滑动删除
*/
changeActionTab(val) {
this.deleteShow = true;
this.goodsVal = val;
},
/**
* 点击解绑商品
*/
delectConfirm() {
checkedDistributionGoods({ id: this.goodsVal.id, checked: false }).then(
(res) => {
if (res.data.success) {
uni.showToast({
title: "此商品解绑成功",
duration: 2000,
});
this.deleteShow = false;
this.goodsList = [];
this.init();
}
}
);
},
/**
* 左滑打开删除
*/
openAction(val) {
this.goodsList.forEach((item) => {
this.$set(item, "___selected", false);
});
this.$set(val, "___selected", true);
},
/**
* 查看图片
*/
handleNavgationGoods(val) { handleNavgationGoods(val) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/goods?id=${val.skuId}&goodsId=${val.id}`, url: `/pages/product/goods?id=${val.skuId}&goodsId=${val.id}`,
@@ -218,7 +277,7 @@ export default {
title: "加载中", title: "加载中",
mask: true, mask: true,
}); });
checkedDistributionGoods(val.id).then((res) => { checkedDistributionGoods({ id: val.id, checked: true }).then((res) => {
uni.hideLoading(); uni.hideLoading();
if (res.data.success) { if (res.data.success) {
uni.showToast({ uni.showToast({
@@ -243,6 +302,9 @@ export default {
uni.hideLoading(); uni.hideLoading();
if (res.data.success && res.data.result.records.length >= 1) { if (res.data.success && res.data.result.records.length >= 1) {
res.data.result.records.forEach((item) => {
this.$set(item, "___selected", false);
});
this.goodsList.push(...res.data.result.records); this.goodsList.push(...res.data.result.records);
} }
if (this.goodsList.length == 0) { if (this.goodsList.length == 0) {

View File

@@ -98,23 +98,14 @@ export default {
* 提交保存 * 提交保存
*/ */
submit() { submit() {
if (this.form.regionId.length != 0 && this.birthday) {
delete this.form.___path; delete this.form.___path;
let params = JSON.parse(JSON.stringify(this.form)); let params = JSON.parse(JSON.stringify(this.form));
saveUserInfo(params).then((res) => { saveUserInfo(params).then((res) => {
if (res.statusCode == 200) { if (res.statusCode == 200) {
storage.setUserInfo(res.data.result); storage.setUserInfo(res.data.result);
uni.navigateBack(); uni.navigateBack();
} }
}); });
} else {
uni.showToast({
title: "请填写生日和城市!",
duration: 2000,
icon: "none",
});
}
}, },
/** /**

View File

@@ -3,6 +3,9 @@
<view class="u-tabs-box"> <view class="u-tabs-box">
<u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" :active-color="$lightColor"></u-tabs> <u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" :active-color="$lightColor"></u-tabs>
</view> </view>
<div class="u-tabs-search">
<u-search placeholder="请输入订单编号" @search="handleGetOrderList(current)" @clear="handleGetOrderList(current)" @custom="handleGetOrderList(current)" v-model="params.orderSn"></u-search>
</div>
<scroll-view class="body-view" scroll-y @scrolltolower="renderDate"> <scroll-view class="body-view" scroll-y @scrolltolower="renderDate">
<view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex"> <view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex">
<!-- 店铺名称 --> <!-- 店铺名称 -->
@@ -126,6 +129,8 @@ export default {
params: { params: {
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
sort: 'createTime',
order: 'desc'
}, },
logParams: { logParams: {
@@ -135,15 +140,20 @@ export default {
status: "loadmore", status: "loadmore",
}; };
}, },
onLoad() { onLoad(options) {
this.orderList = []; this.orderList = [];
this.params.pageNumber = 1; this.params.pageNumber = 1;
if (options.orderSn) this.params.orderSn = options.orderSn;
this.getOrderList(this.current); this.getOrderList(this.current);
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.change(this.current); this.change(this.current);
}, },
methods: { methods: {
handleGetOrderList(current) {
this.orderList = [];
this.getOrderList(current);
},
/** /**
* 切换tab页时初始化数据 * 切换tab页时初始化数据
*/ */
@@ -220,7 +230,6 @@ export default {
price: item.flowPrice, price: item.flowPrice,
}, },
]; ];
}); });
this.orderList = this.orderList.concat(afterSaleLogList); this.orderList = this.orderList.concat(afterSaleLogList);
@@ -296,9 +305,12 @@ page,
height: 100%; height: 100%;
} }
.body-view { .body-view {
// height: calc(100vh - 44px -40px); overflow-y: auto;
// overflow-y: auto; height: calc(100vh - 44px - 80rpx - 104rpx);
height: 100%; }
.u-tabs-search {
padding: 20rpx;
background: #fff;
} }
.countMoney { .countMoney {
margin-left: 7rpx; margin-left: 7rpx;

View File

@@ -59,8 +59,7 @@
</u-form-item> </u-form-item>
<view v-if=" <view v-if="
applyInfo.accountType === 'BANK_TRANSFER' && applyInfo.accountType === 'BANK_TRANSFER' &&
applyInfo.applyRefundPrice != 0 applyInfo.applyRefundPrice != 0">
">
<u-form-item label="银行开户行" :label-width="150"> <u-form-item label="银行开户行" :label-width="150">
<u-input v-model="form.bankDepositName" type="text" input-align="right" placeholder="请输入银行开户行" /> <u-input v-model="form.bankDepositName" type="text" input-align="right" placeholder="请输入银行开户行" />
</u-form-item> </u-form-item>
@@ -100,7 +99,7 @@ import {
import city from "@/components/m-city/m-city"; import city from "@/components/m-city/m-city";
import { upload } from "@/api/common.js"; import { upload } from "@/api/common.js";
import { checkBankno } from "@/utils/Foundation";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
export default { export default {
component: { component: {
@@ -191,7 +190,7 @@ export default {
this.sn = options.sn; this.sn = options.sn;
let dsku = decodeURIComponent(options.sku); let dsku = decodeURIComponent(options.sku);
let newSku = JSON.parse(dsku); let newSku = JSON.parse(dsku);
this.sku = newSku this.sku = newSku;
this.form.orderItemSn = options.sn; this.form.orderItemSn = options.sn;
this.form.skuId = this.sku.skuId; this.form.skuId = this.sku.skuId;
@@ -254,9 +253,7 @@ export default {
this.form.accountType_label = e[0].label; this.form.accountType_label = e[0].label;
}, },
//返回方式 //返回方式
returnSelectConfirm(e) { returnSelectConfirm(e) {},
},
//修改申请数量 //修改申请数量
valChange(e) { valChange(e) {
@@ -264,7 +261,6 @@ export default {
}, },
//图片上传 //图片上传
onUploaded(lists) { onUploaded(lists) {
let images = []; let images = [];
lists.forEach((item) => { lists.forEach((item) => {
@@ -278,6 +274,7 @@ export default {
if (!this.handleCheckParams()) { if (!this.handleCheckParams()) {
return; return;
} }
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
@@ -297,74 +294,8 @@ export default {
} }
}); });
}, },
/**
* 验证银行卡号
*/
checkBankno(bankno) {
var lastNum = bankno.substr(bankno.length - 1, 1); //取出最后一位与luhm进行比较
var first15Num = bankno.substr(0, bankno.length - 1); //前15或18位
var newArr = [];
for (var i = first15Num.length - 1; i > -1; i--) {
//前15或18位倒序存进数组
newArr.push(first15Num.substr(i, 1));
}
var arrJiShu = []; //奇数位*2的积 <9
var arrJiShu2 = []; //奇数位*2的积 >9
var arrOuShu = []; //偶数位数组
for (var j = 0; j < newArr.length; j++) {
if ((j + 1) % 2 == 1) {
//奇数位
if (parseInt(newArr[j]) * 2 < 9)
arrJiShu.push(parseInt(newArr[j]) * 2);
else arrJiShu2.push(parseInt(newArr[j]) * 2);
} //偶数位
else arrOuShu.push(newArr[j]);
}
var jishu_child1 = []; //奇数位*2 >9 的分割之后的数组个位数
var jishu_child2 = []; //奇数位*2 >9 的分割之后的数组十位数
for (var h = 0; h < arrJiShu2.length; h++) {
jishu_child1.push(parseInt(arrJiShu2[h]) % 10);
jishu_child2.push(parseInt(arrJiShu2[h]) / 10);
}
var sumJiShu = 0; //奇数位*2 < 9 的数组之和
var sumOuShu = 0; //偶数位数组之和
var sumJiShuChild1 = 0; //奇数位*2 >9 的分割之后的数组个位数之和
var sumJiShuChild2 = 0; //奇数位*2 >9 的分割之后的数组十位数之和
var sumTotal = 0;
for (var m = 0; m < arrJiShu.length; m++) {
sumJiShu = sumJiShu + parseInt(arrJiShu[m]);
}
for (var n = 0; n < arrOuShu.length; n++) {
sumOuShu = sumOuShu + parseInt(arrOuShu[n]);
}
for (var p = 0; p < jishu_child1.length; p++) {
sumJiShuChild1 = sumJiShuChild1 + parseInt(jishu_child1[p]);
sumJiShuChild2 = sumJiShuChild2 + parseInt(jishu_child2[p]);
}
//计算总和
sumTotal =
parseInt(sumJiShu) +
parseInt(sumOuShu) +
parseInt(sumJiShuChild1) +
parseInt(sumJiShuChild2);
//计算Luhm值
var k = parseInt(sumTotal) % 10 == 0 ? 10 : parseInt(sumTotal) % 10;
var luhm = 10 - k;
if (lastNum == luhm) {
return true;
} else {
return false;
}
},
//检测提交参数 //检测提交参数
handleCheckParams() { handleCheckParams() {
if (this.$u.test.isEmpty(this.form.reason)) { if (this.$u.test.isEmpty(this.form.reason)) {
this.$refs.uToast.show({ title: "请选择 退款原因", type: "error" }); this.$refs.uToast.show({ title: "请选择 退款原因", type: "error" });
return false; return false;
@@ -398,7 +329,7 @@ export default {
type: "error", type: "error",
}); });
return false; return false;
} else if (this.checkBankno(this.form.bankAccountNumber) === false) { } else if (checkBankno(this.form.bankAccountNumber) === false) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "银行卡卡号不正确", title: "银行卡卡号不正确",
type: "error", type: "error",

View File

@@ -25,7 +25,16 @@
{{ comment.goodsName }} {{ comment.goodsName }}
</view> </view>
<view class="goods-subtitle"></view> <view class="goods-subtitle"></view>
<view class="commentStyle" v-if="comment.reply">
商家回复
<span class="addCommentSpan">{{ comment.reply }}</span>
<view class="img">
<!-- 循环出商家回复评价的图片 -->
<u-image width="140rpx" height="140rpx" v-if="comment.replyImage" v-for="(replyImg, replyIndex) in splitImg(comment.replyImage)" :src="replyImg" :key="replyIndex"
@click="preview(splitImg( comment.replyImage), index)">
</u-image>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -49,6 +58,18 @@ export default {
this.comment = JSON.parse(decodeURIComponent(options.comment)); this.comment = JSON.parse(decodeURIComponent(options.comment));
}, },
methods: { methods: {
/**
* 切割图像
*/
splitImg(val) {
if (val && val.split(",")) {
return val.split(",");
} else if (val) {
return val;
} else {
return false;
}
},
/** /**
* 点击图片放大或保存 * 点击图片放大或保存
*/ */
@@ -68,6 +89,38 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.commentStyle {
margin-top: 16rpx;
padding: 14rpx 26rpx;
background: #f5f5f5;
border-radius: 6px;
font-size: 22rpx;
font-weight: 700;
text-align: left;
line-height: 40rpx;
}
.img {
display: flex;
flex-wrap: wrap;
/* height: 140rpx; */
overflow: hidden;
margin: 10rpx 0;
image {
width: 166rpx;
height: 166rpx;
margin: 0 15rpx 15rpx 0;
&:nth-of-type(3n + 0) {
margin: 0 0 15rpx 0;
}
}
}
.addCommentSpan {
color: $u-tips-color !important;
padding-left: 20rpx;
}
.memName { .memName {
font-size: 28rpx; font-size: 28rpx;
} }

View File

@@ -114,13 +114,13 @@
<!-- 发票信息 --> <!-- 发票信息 -->
<invoices :res="receiptList" @callbackInvoice="callbackInvoice" v-if="invoiceFlag" /> <invoices :res="receiptList" @callbackInvoice="callbackInvoice" v-if="invoiceFlag" />
<u-select v-model="shippingFlag" :list="shippingMethod" ></u-select> <u-select v-model="shippingFlag" :list="shippingMethod"></u-select>
<!-- 优惠券 --> <!-- 优惠券 -->
<div class="box box4"> <div class="box box4">
<u-row> <u-row>
<u-col :offset="0" :span="9" @click="shippingFlag = true">配送方式</u-col> <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :offset="0" :span="9" @click="shippingFlag = true">配送方式</u-col>
<u-col :span="3" textAlign="right" @click="shippingFlag = true"> <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="3" textAlign="right" @click="shippingFlag = true">
{{ shippingMethod.find(e=>{ return e.value == shippingText; }).label }} {{ shippingMethod.find(e=>{ return e.value == shippingText; }).label }}
</u-col> </u-col>
</u-row> </u-row>
@@ -150,8 +150,8 @@
</div> </div>
<div> <div>
<u-row> <u-row>
<u-col :span="7">运费</u-col> <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7">运费</u-col>
<u-col :span="5" class="tr tipsColor" textAlign="right"> <u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right">
<u-tag v-if="orderMessage.priceDetailDTO.freightPrice == 0" style="margin-right: 20rpx" color="#FF6262" text="包邮" type="warning" size="mini" mode="plain" shape="circle" /> <u-tag v-if="orderMessage.priceDetailDTO.freightPrice == 0" style="margin-right: 20rpx" color="#FF6262" text="包邮" type="warning" size="mini" mode="plain" shape="circle" />
<span>{{ <span>{{
orderMessage.priceDetailDTO.freightPrice | unitPrice orderMessage.priceDetailDTO.freightPrice | unitPrice
@@ -180,9 +180,14 @@
</div> </div>
</div> </div>
<!-- 配送地区没有提示 -->
<div class="notSupportFreight" v-if="notSupportFreight.length !=0">
<u-notice-bar style="width:100%" :volume-icon="false" mode="horizontal" :list="notSupportFreightGoodsList"></u-notice-bar>
</div>
<!-- 结账 --> <!-- 结账 -->
<div class="box box6 mp-iphonex-bottom" v-if="orderMessage.priceDetailDTO"> <div class="box6 mp-iphonex-bottom" v-if="orderMessage.priceDetailDTO">
<div class="navL"> <div class="tabbar-left">
合计 合计
<span class="number"> <span class="number">
¥ ¥
@@ -191,10 +196,10 @@
</div> </div>
<div class="navRiv" @click="createTradeFun()"> <div class="navRiv" @click="createTradeFun()">
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<div class="navR">提交订单</div> <div class="tabbar-right">提交订单</div>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<div class="navR">微信支付</div> <div class="tabbar-right">微信支付</div>
<!-- #endif --> <!-- #endif -->
</div> </div>
@@ -249,6 +254,8 @@ export default {
endWay: "", //最后一个参团人 endWay: "", //最后一个参团人
masterWay: "", //团长信息 masterWay: "", //团长信息
pintuanFlage: true, //是开团还是拼团 pintuanFlage: true, //是开团还是拼团
notSupportFreight: [], //不支持运费
notSupportFreightGoodsList: ["以下商品超出配送范围:"],
}; };
}, },
filters: { filters: {
@@ -467,7 +474,7 @@ export default {
} }
} else { } else {
uni.showToast({ uni.showToast({
title: "创建订单有误!请稍后重试", title: res.data.message,
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });
@@ -493,9 +500,8 @@ export default {
// 如果没有商品选择地址的话 则选择 默认地址 // 如果没有商品选择地址的话 则选择 默认地址
API_Address.getAddressDefault().then((res) => { API_Address.getAddressDefault().then((res) => {
if (res.data.result) { if (res.data.result) {
res.data.result.consigneeAddressPath = res.data.result.consigneeAddressPath.split( res.data.result.consigneeAddressPath =
"," res.data.result.consigneeAddressPath.split(",");
);
this.address = res.data.result; this.address = res.data.result;
} }
}); });
@@ -520,9 +526,19 @@ export default {
this.getUserAddress(); this.getUserAddress();
} else { } else {
this.address = res.data.result.memberAddress; this.address = res.data.result.memberAddress;
res.data.result.memberAddress.consigneeAddressPath = res.data.result.memberAddress.consigneeAddressPath.split( res.data.result.memberAddress.consigneeAddressPath =
"," res.data.result.memberAddress.consigneeAddressPath.split(",");
); }
if (
res.data.result.notSupportFreight &&
res.data.result.notSupportFreight.length != 0
) {
this.notSupportFreight = res.data.result.notSupportFreight;
res.data.result.notSupportFreight.forEach((item) => {
this.notSupportFreightGoodsList[0] += item.goodsSku.goodsName;
});
} }
}); });
}, },
@@ -574,6 +590,9 @@ export default {
width: 143rpx; width: 143rpx;
border-bottom: 2px dotted #999; border-bottom: 2px dotted #999;
} }
.tabbar-left {
margin-left: 32rpx;
}
.btn-one, .btn-one,
.wait { .wait {
@@ -649,9 +668,7 @@ export default {
.tabC { .tabC {
> p { > p {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
} }
@@ -659,6 +676,28 @@ export default {
.box2 { .box2 {
margin-top: 20rpx; margin-top: 20rpx;
} }
.notSupportFreight {
position: fixed;
bottom: calc(100rpx + env(safe-area-inset-bottom));
// #ifdef H5
bottom: 100rpx;
// #endif
display: flex;
align-items: center;
left: 0;
background: #fdf6ec;
height: 100rpx;
width: 100%;
transition: 0.35s;
> .tips {
margin: 0 32rpx;
}
}
/deep/ .u-notice-bar-wrap {
width: 100% !important;
}
.userClass { .userClass {
font-weight: bold; font-weight: bold;
@@ -679,26 +718,18 @@ export default {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%;
margin: 0;
height: 100rpx; height: 100rpx;
overflow: hidden; overflow: hidden;
line-height: 100rpx; line-height: 100rpx;
margin-bottom: 0px !important; margin-bottom: 0px !important;
background: #fff; background: #fff;
color: #333; color: #333;
width: 100%; display: flex;
justify-content: space-between;
> .navL {
width: 65%;
}
> .navRiv {
float: left;
}
} }
.navR { .tabbar-right {
margin-top: 10rpx; margin-top: 10rpx;
height: 80rpx; height: 80rpx;
color: #fff; color: #fff;
@@ -707,6 +738,7 @@ export default {
padding: 0 44rpx; padding: 0 44rpx;
text-align: center; text-align: center;
border-radius: 400px; border-radius: 400px;
margin-right: 32rpx;
} }
.sp_tag { .sp_tag {
@@ -792,11 +824,6 @@ export default {
padding: 0 32rpx; padding: 0 32rpx;
} }
.navL,
.navR {
float: left;
}
.wrapper { .wrapper {
background: #f9f9f9; background: #f9f9f9;
height: auto; height: auto;
@@ -804,9 +831,6 @@ export default {
overflow: auto !important; overflow: auto !important;
} }
.tab1 {
}
.ybname { .ybname {
margin-left: 20rpx; margin-left: 20rpx;
font-weight: 400; font-weight: 400;

View File

@@ -39,9 +39,9 @@
<view class="btn-view u-flex u-row-between"> <view class="btn-view u-flex u-row-between">
<view class="description"> <view class="description">
<!-- 等待付款 --> <!-- 等待付款 -->
<text v-if="order.payStatus === 'PAID'">已付金额</text> <div v-if="order.payStatus === 'PAID'">已付金额:</div>
<text v-else>应付金额</text> <div v-else>应付金额:</div>
<text class="price">{{ order.flowPrice | unitPrice }}</text> <div class="price">{{ order.flowPrice | unitPrice }}</div>
</view> </view>
<view> <view>
<!-- 全部 --> <!-- 全部 -->
@@ -57,6 +57,9 @@
<u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)"> <u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
确认收货 确认收货
</u-button> </u-button>
<u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus=='NOT_APPLIED'" @click="applyService(order)">
退款/售后
</u-button>
<!-- TODO 后续完善 --> <!-- TODO 后续完善 -->
<!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if=" <!-- <u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="
order.orderStatus === 'CANCELLED' || order.orderStatus === 'CANCELLED' ||
@@ -106,7 +109,7 @@ export default {
}, },
data() { data() {
return { return {
lightColor:this.$lightColor, lightColor: this.$lightColor,
tabCurrentIndex: 0, //导航栏索引 tabCurrentIndex: 0, //导航栏索引
navList: [ navList: [
//导航栏list //导航栏list
@@ -203,6 +206,8 @@ export default {
this.loadData(this.status); this.loadData(this.status);
}, },
onLoad(options) { onLoad(options) {
/** /**
* 修复app端点击除全部订单外的按钮进入时不加载数据的问题 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
@@ -230,6 +235,18 @@ export default {
}, },
}, },
methods: { methods: {
// 售后
applyService(order){
uni.navigateTo({
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`
});
},
// 店铺详情 // 店铺详情
navigateToStore(val) { navigateToStore(val) {
uni.navigateTo({ uni.navigateTo({
@@ -309,9 +326,8 @@ export default {
this.navList[index].loadStatus = "noMore"; this.navList[index].loadStatus = "noMore";
} }
if (orderList.length > 0) { if (orderList.length > 0) {
this.navList[index].orderList = this.navList[index].orderList.concat( this.navList[index].orderList =
orderList this.navList[index].orderList.concat(orderList);
);
this.navList[index].pageNumber += 1; this.navList[index].pageNumber += 1;
} }
}); });
@@ -458,14 +474,11 @@ export default {
* 重新购买 * 重新购买
*/ */
reBuy(order) { reBuy(order) {
console.log(order) console.log(order);
return return;
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/product/goods?id=" + "/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
order.id +
"&goodsId=" +
order.goodsId,
}); });
}, },
@@ -610,9 +623,10 @@ page,
font-size: 26rpx; font-size: 26rpx;
.description { .description {
display: flex;
color: #909399; color: #909399;
size: 25rpx; size: 24rpx;
flex: 1;
.price { .price {
color: $main-color; color: $main-color;
} }
@@ -673,5 +687,4 @@ page,
margin-left: 15rpx; margin-left: 15rpx;
height: 60rpx; height: 60rpx;
} }
</style> </style>

View File

@@ -105,7 +105,7 @@
</view> </view>
<!-- 客户服务 售后取消订单查看物流投诉等 --> <!-- 客户服务 售后取消订单查看物流投诉等 -->
<view class="info-view" <view class="info-view"
v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderType =='PINTUAN'"> v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderPromotionType =='PINTUAN'">
<view style="width: 100%"> <view style="width: 100%">
<view class="order-info-view"> <view class="order-info-view">
<view class="title">服务</view> <view class="title">服务</view>
@@ -113,7 +113,7 @@
<view class="customer-list"> <view class="customer-list">
<view class="customer-service" v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true" @click="onCancel(order.sn)">取消订单</view> <view class="customer-service" v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true" @click="onCancel(order.sn)">取消订单</view>
<view class="customer-service" v-if="order.orderStatus == 'DELIVERED'" @click="onLogistics(order)">查看物流</view> <view class="customer-service" v-if="order.orderStatus == 'DELIVERED'" @click="onLogistics(order)">查看物流</view>
<view class="customer-service" v-if="order.orderStatus != 'UNPAID' && order.orderType =='PINTUAN' " @click="ByUserMessage(order)">查看拼团信息</view> <view class="customer-service" v-if="order.orderStatus != 'UNPAID' && order.orderPromotionType =='PINTUAN' " @click="ByUserMessage(order)">查看拼团信息</view>
</view> </view>
</view> </view>
</view> </view>
@@ -204,7 +204,7 @@
</view> </view>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-modal v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" @confirm="confirmRog"></u-modal> <u-modal v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" :confirm-color="lightColor" @confirm="confirmRog"></u-modal>
<!-- 分享 --> <!-- 分享 -->
<shares v-if="shareFlage " :thumbnail="orderDetail.orderItems[0].image" :goodsName="orderDetail.orderItems[0].goodsName" @close="shareFlage = false" /> <shares v-if="shareFlage " :thumbnail="orderDetail.orderItems[0].image" :goodsName="orderDetail.orderItems[0].goodsName" @close="shareFlage = false" />
@@ -447,12 +447,13 @@ export default {
confirmRog() { confirmRog() {
confirmReceipt(this.orderSn).then((res) => { confirmReceipt(this.orderSn).then((res) => {
if (res.data.success) { if (res.data.success) {
this.$refs.uToast.show({ uni.showToast({
title: "已确认收货", title: "已确认收货",
type: "success", duration: 2000,
icon: "none",
}); });
this.rogShow = false; this.rogShow = false;
this.loadData(options.sn); this.loadData(this.sn);
} }
}); });
}, },
@@ -653,7 +654,7 @@ page,
} }
} }
} }
.verificationCode{ .verificationCode {
font-weight: bold; font-weight: bold;
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }

View File

@@ -71,6 +71,7 @@ export default {
}, },
// 必须要在onReady生命周期setRules因为onLoad生命周期组件可能尚未创建完毕 // 必须要在onReady生命周期setRules因为onLoad生命周期组件可能尚未创建完毕
mounted() { mounted() {
// whetherNavigate();
this.$refs.validateCodeForm.setRules(this.codeRules); this.$refs.validateCodeForm.setRules(this.codeRules);
/** /**
* 条件编译判断当前客户端类型 * 条件编译判断当前客户端类型
@@ -83,15 +84,16 @@ export default {
//#endif //#endif
}, },
watch: { watch: {
flage(val) { async flage(val) {
if (val) { if (val) {
if (this.$refs.uCode.canGetCode) { if (this.$refs.uCode.canGetCode) {
// 向后端请求验证码 // 向后端请求验证码
uni.showLoading({ uni.showLoading({
title: "正在获取验证码", title: "正在获取验证码",
}); });
sendMobile(this.codeForm.mobile)
.then((res) => { let res = await sendMobile(this.codeForm.mobile);
uni.hideLoading(); uni.hideLoading();
// 这里此提示会被this.start()方法中的提示覆盖 // 这里此提示会被this.start()方法中的提示覆盖
if (res.data.success) { if (res.data.success) {
@@ -102,14 +104,13 @@ export default {
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });
this.flage = false;
} }
})
.catch((e) => {
this.$refs.uCode.start();
});
} else { } else {
this.$u.toast("请倒计时结束后再发送"); this.$u.toast("请倒计时结束后再发送");
} }
} else {
this.$refs.verification.hide();
} }
}, },
}, },
@@ -209,15 +210,17 @@ export default {
uni.hideLoading(); uni.hideLoading();
}, 2000); }, 2000);
} }
if (!this.$u.test.mobile(this.codeForm.mobile)) { if (!this.$u.test.mobile(this.codeForm.mobile)) {
uni.showToast({ uni.showToast({
title: "请输入正确手机号", title: "请输入正确手机号",
icon: "none", icon: "none",
}); });
return false; return false;
} }
if (!this.flage) { if (!this.flage) {
this.$refs.verification.hide(); this.$refs.verification.error();
return false; return false;
} }
}, },

View File

@@ -153,7 +153,7 @@
<storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" /> <storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" />
<!-- 宝贝详情 --> <!-- 宝贝详情 -->
<GoodsIntro id="main9" :res="goodsDetail" :goodsId="goodsDetail.goodsId" v-if="goodsDetail.id" /> <GoodsIntro id="main9" :res="goodsDetail" :goodsParams="goodsParams" :goodsId="goodsDetail.goodsId" v-if="goodsDetail.id" />
<!-- 宝贝推荐 --> <!-- 宝贝推荐 -->
<GoodsRecommend id="main11" :res="likeGoodsList" /> <GoodsRecommend id="main11" :res="likeGoodsList" />
@@ -219,7 +219,7 @@
<!-- 商品规格 商品详情以及默认参与活动的id--> <!-- 商品规格 商品详情以及默认参与活动的id-->
<popupGoods :addr="delivery" ref="popupGoods" @changed="changedGoods" @closeBuy="closePopupBuy" @queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :id="productId" <popupGoods :addr="delivery" ref="popupGoods" @changed="changedGoods" @closeBuy="closePopupBuy" @queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :id="productId"
v-if="goodsDetail.id " :pointDetail="pointDetail" @handleClickSku="init" :buyMask="buyMask" /> v-if="goodsDetail.id " :pointDetail="pointDetail" @handleClickSku="selectSku" :buyMask="buyMask" />
</view> </view>
</view> </view>
</div> </div>
@@ -328,6 +328,7 @@ export default {
top: 0, top: 0,
height: 50, height: 50,
}, },
goodsParams: [], // 商品参数
headerFlag: false, //顶部导航显示与否 headerFlag: false, //顶部导航显示与否
headerList: [ headerList: [
//顶部导航文字按照规则来 详情全局搜索 //顶部导航文字按照规则来 详情全局搜索
@@ -399,9 +400,9 @@ export default {
return { return {
title: this.goodsDetail.goodsName, title: this.goodsDetail.goodsName,
type: 0, type: 0,
query:`id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`, query: `id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`,
path: `/pages/product/goods`, path: `/pages/product/goods`,
imageUrl:this.goodsDetail.goodsGalleryList[0], imageUrl: this.goodsDetail.goodsGalleryList[0],
}; };
}, },
// #endif // #endif
@@ -499,11 +500,14 @@ export default {
return true; return true;
} }
}, },
selectSku(idObj) {
this.init(idObj.skuId, idObj.goodsId);
},
/** /**
* 初始化信息 * 初始化信息
*/ */
async init(id, goodsId, distributionId) { async init(id, goodsId, distributionId) {
console.log(id, goodsId);
this.isGroup = false; //初始化拼团 this.isGroup = false; //初始化拼团
this.productId = id; // skuId this.productId = id; // skuId
// 这里请求获取到页面数据 解析数据 // 这里请求获取到页面数据 解析数据
@@ -530,6 +534,7 @@ export default {
this.goodsDetail = response.data.result.data; this.goodsDetail = response.data.result.data;
this.goodsSpec = response.data.result.specs; this.goodsSpec = response.data.result.specs;
this.PromotionList = response.data.result.promotionMap; this.PromotionList = response.data.result.promotionMap;
this.goodsParams = response.data.result.goodsParamsDTOList || []
// 判断是否拼团活动或者积分商品 如果有则显示拼团活动信息 // 判断是否拼团活动或者积分商品 如果有则显示拼团活动信息
this.PromotionList && this.PromotionList &&

View File

@@ -18,20 +18,19 @@
<div class="goods-detail-box"> <div class="goods-detail-box">
<div class="goods-detail-item goods-active">商品参数</div> <div class="goods-detail-item goods-active">商品参数</div>
</div> </div>
<u-divider>商品参数</u-divider> <!-- <u-divider>商品参数</u-divider> -->
<div class="param-list" v-if="!goodsDetail.goodsParamsList || goodsDetail.goodsParamsList.length == 0"> <div class="param-list" v-if="goodsParams.length == 0">
<u-empty text="暂无商品参数" mode="list"></u-empty> <u-empty text="暂无商品参数" mode="list"></u-empty>
</div> </div>
<div class="param-list" v-if="goodsDetail.goodsParamsList && goodsDetail.goodsParamsList.length != 0"> <div class="params-group" v-for="(group,groupIndex) in goodsParams" :key="groupIndex">
<div class="param-item" v-for="(param,index) in goodsDetail.goodsParamsList" :key="index"> <view style="font-weight: bold;margin-left: 10px;">{{group.groupName}}</view>
<div class="param-left"> <div class="param-list">
{{param.paramName}} <div class="param-item" v-for="(param,index) in group.goodsParamsItemDTOList" :key="index">
</div> <div class="param-left">{{param.paramName}}</div>
<div class="param-right"> <div class="param-right">{{param.paramValue}}</div>
{{param.paramValue}}</div> </div>
</div> </div>
</div> </div>
</view> </view>
</view> </view>
</view> </view>
@@ -43,11 +42,12 @@ import { getGoodsMessage } from "@/api/goods";
export default { export default {
data() { data() {
return { return {
goodsDetail: "", goodsDetail: ""
}; };
}, },
props: ["res", "goodsId"], props: ["res", "goodsId", "goodsParams"],
async mounted() { async mounted() {
console.log(this.res)
let res = await getGoodsMessage(this.goodsId); let res = await getGoodsMessage(this.goodsId);
if (res.data.success) { if (res.data.success) {
this.goodsDetail = res.data.result; this.goodsDetail = res.data.result;

View File

@@ -56,7 +56,7 @@
<view class="goods-skus-view" :key="specIndex" v-for="(spec, specIndex) in formatList"> <view class="goods-skus-view" :key="specIndex" v-for="(spec, specIndex) in formatList">
<view class="skus-view-list"> <view class="skus-view-list">
<view class="view-class-title">{{ spec.name }}</view> <view class="view-class-title">{{ spec.name }}</view>
<view :class="{ active: spec_val.id == currentSelceted[specIndex] }" class="skus-view-item" v-for="(spec_val, spec_index) in spec.values" :key="spec_index" <view :class="{ active: spec_val.value == currentSelceted[specIndex] }" class="skus-view-item" v-for="(spec_val, spec_index) in spec.values" :key="spec_index"
@click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }}</view> @click="handleClickSpec(spec, specIndex, spec_val)">{{ spec_val.value }}</view>
</view> </view>
</view> </view>
@@ -145,12 +145,12 @@ export default {
/**点击规格 */ /**点击规格 */
handleClickSpec(val, index, specValue) { handleClickSpec(val, index, specValue) {
this.$set(this.currentSelceted, index, specValue.id); this.$set(this.currentSelceted, index, specValue.value);
let selectedSkuId = this.goodsSpec.find((i) => { let selectedSkuId = this.goodsSpec.find((i) => {
let matched = true; let matched = true;
let specValues = i.specValues.filter((j) => j.specName !== "images"); let specValues = i.specValues.filter((j) => j.specName !== "images");
for (let n = 0; n < specValues.length; n++) { for (let n = 0; n < specValues.length; n++) {
if (specValues[n].specValueId !== this.currentSelceted[n]) { if (specValues[n].specValue !== this.currentSelceted[n]) {
matched = false; matched = false;
return; return;
} }
@@ -159,7 +159,6 @@ export default {
return i; return i;
} }
}); });
this.selectSkuList = { this.selectSkuList = {
spec: { spec: {
specName: val.name, specName: val.name,
@@ -169,7 +168,7 @@ export default {
}; };
this.selectName = specValue.value; this.selectName = specValue.value;
this.$emit("handleClickSku", selectedSkuId.skuId, this.goodsDetail.id); this.$emit("handleClickSku", {skuId: selectedSkuId.skuId, goodsId: this.goodsDetail.goodsId});
}, },
/** /**
@@ -231,10 +230,8 @@ export default {
let arr = [{}]; let arr = [{}];
list.forEach((item, index) => { list.forEach((item, index) => {
item.specValues.forEach((spec, specIndex) => { item.specValues.forEach((spec, specIndex) => {
let id = spec.specNameId;
let name = spec.specName; let name = spec.specName;
let values = { let values = {
id: spec.specValueId,
value: spec.specValue, value: spec.specValue,
quantity: item.quantity, quantity: item.quantity,
}; };
@@ -246,7 +243,7 @@ export default {
if ( if (
arrItem.name == name && arrItem.name == name &&
arrItem.values && arrItem.values &&
!arrItem.values.find((i) => i.id === values.id) !arrItem.values.find((i) => i.value === values.value)
) { ) {
arrItem.values.push(values); arrItem.values.push(values);
} }
@@ -256,7 +253,6 @@ export default {
}); });
if (!keys.includes(name)) { if (!keys.includes(name)) {
arr.push({ arr.push({
id: id,
name: name, name: name,
values: [values], values: [values],
}); });
@@ -273,7 +269,7 @@ export default {
item.specValues item.specValues
.filter((i) => i.specName !== "images") .filter((i) => i.specName !== "images")
.forEach((value, _index) => { .forEach((value, _index) => {
this.currentSelceted[_index] = value.specValueId; this.currentSelceted[_index] = value.specValue;
this.selectName = value.specValue; this.selectName = value.specValue;

View File

@@ -0,0 +1,499 @@
<template>
<div class="page">
<u-navbar back-icon-color="#fff" :background="background" :border-bottom="false" title=""></u-navbar>
<div class="wrapper">
<!-- 砍价列表 -->
<div class="box box1">
<div class="bargain">
<div class="flex bargain-item">
<div class="goods-img">
<u-image width="200" height="200" :src="bargainDetail.thumbnail"></u-image>
</div>
<div class="goods-config">
<div class="goods-title wes-2">
{{bargainDetail.goodsName}}
</div>
<div class="flex price-box">
<div class="purchase-price">当前:<span>{{ activityData.surplusPrice == 0 ? this.bargains.purchasePrice : activityData.surplusPrice | unitPrice}}</span>
</div>
<div class="max-price">原价:<span>{{ bargainDetail.price | unitPrice}}</span>
</div>
</div>
<div class="tips">{{bargainDetail.sellingPoint}}</div>
</div>
</div>
<!-- 砍价进度 -->
<div class="bargain-progress">
<u-line-progress class="line" :active-color="lightColor" striped striped-active :percent="totalPercent"></u-line-progress>
<div class="flex tips">
<div>已砍{{cutPrice}}</div>
<div>还剩{{activityData.surplusPrice}}</div>
</div>
</div>
<!-- 参与砍价 -->
<div class="bargaining" v-if="!activityData.pass" @click="shareBargain">
邀请砍价
</div>
<!-- 立即购买 -->
<div class="buy" v-else @click="getGoodsDetail">
立即购买
</div>
</div>
</div>
<!-- 帮砍列表 -->
<div class="box box2">
<div class="bargain">
<div class="bargain-title">帮忙砍</div>
<div class="user-item flex" v-if="logData.length !=0 " v-for="(item,index) in logData" :key="index">
<div>
<u-image width="75" shape="circle" height="75" :src="item.kanjiaMemberFace"></u-image>
</div>
<div class="user-config flex">
<div class="user-name">
<div>{{item.kanjiaMemberName | noPassByName}}</div>
<div>使出吃的奶劲儿</div>
</div>
<div class="save">砍掉<span>{{item.kanjiaPrice | unitPrice}}</span></div>
</div>
</div>
</div>
</div>
<!-- 产品详情 -->
<div class="box box3">
<div class="bargain">
<div class="bargain-title">商品详情</div>
<view class="u-content">
<u-parse :html="bargainDetail.mobileIntro"></u-parse>
</view>
</div>
</div>
<!-- 砍价 -->
<u-modal title="恭喜您砍掉了" v-model="Bargaining" mask-close-able :show-confirm-button="false" :title-style="{color: lightColor}">
<view class="slot-content">
<u-count-to :start-val="0" ref="uCountTo" font-size="100" :color="lightColor" :end-val="kanjiaPrice" :decimals="2" :autoplay="autoplay"></u-count-to><span class="price"></span>
</view>
</u-modal>
<!-- 帮砍 -->
<u-modal :show-title="false" v-model="helpBargainFlage" :show-confirm-button="false">
<view class="help-bargain" @click="handleClickHelpBargain">
<u-image width="100%" height="600rpx" src="/pages/promotion/static/bargain.jpeg"></u-image>
<u-image class="help" width="300rpx" height="80rpx" src="/pages/promotion/static/help-bargain.png"></u-image>
</view>
</u-modal>
<!-- 分享 -->
<shares @close="closeShare" :link="'/pages/promotion/bargain/detail?id='+routerVal.id+'&activityId='+activityData.id" type="kanjia" :thumbnail="bargainDetail.thumbnail"
:goodsName="bargainDetail.goodsName" v-if="shareFlage " />
<!-- 购买 -->
<popupGoods :addr="addr" ref="popupGoods" :buyMask="maskFlag" @closeBuy="closePopupBuy" :goodsDetail="bargainDetail" :goodsSpec="goodsSpec" v-if="bargainDetail.id "
@handleClickSku="getGoodsDetail" />
<!-- 产品详情 -->
<div class=" box4">
</div>
</div>
</div>
</template>
<script>
import popupGoods from "@/pages/cart/payment/popup/goods"; //购物车商品的模块
import {
getBargainDetail,
getBargainActivity,
openBargain,
getBargainLog,
helpBargain,
} from "@/api/promotions";
import { getGoods } from "@/api/goods.js";
import shares from "@/components/m-share/index";
export default {
components: {
shares,
popupGoods,
},
data() {
return {
background: {
backgroundColor: "transparent",
},
maskFlag: false, //商品弹框
shareFlage: false,
lightColor: this.$lightColor,
bargains: {},
bargainDetail: {}, //砍价商品详情
Bargaining: false, //砍价弹出框
helpBargainFlage: false, //帮砍弹出框
autoplay: false, //砍价金额滚动
kanjiaPrice: 0, //砍价金额
totalPercent: 0, //砍价半分比
activityData: "", //砍价活动
cutPrice: 0, //已砍金额
params: {
// id: "", //砍价活动ID
// kanjiaActivityGoodsId: "", //砍价商品SkuID
// kanjiaActivityId: "", //邀请活动ID有值说明是被邀请人
// status: "", //状态
},
logData: [], // 帮砍记录
//获取帮砍记录参数
logParams: {
pageNumber: 1,
pageSize: 20,
kanJiaActivityId: "",
},
goodsDetail: {}, //商品详情
goodsSpec: {}, //商品规格
selectedGoods: "", //选择的商品
};
},
onLoad(options) {
this.routerVal = options;
if (options.activityId) {
this.params.kanjiaActivityId = options.activityId;
}
},
onShow() {
this.init();
},
watch: {
// 砍价弹窗
Bargaining(val) {
if (val) {
this.$nextTick(() => {
this.$refs.uCountTo.start();
});
}
},
// 监听砍价活动金额
activityData: {
handler(val) {
if (val) {
// 计算砍价百分比
this.totalPercent =
100 -
Math.floor((val.surplusPrice / this.bargainDetail.price) * 100);
this.cutPrice = (
this.bargainDetail.price - this.activityData.surplusPrice
).toFixed(2);
// 获取砍价日志
this.logParams.kanJiaActivityId = val.id;
// 判断是否是帮砍
if (this.params.kanjiaActivityId && val.help) {
this.helpBargainFlage = true;
}
this.getBargainLogList();
}
},
immediate: true,
},
},
methods: {
closePopupBuy(val) {
this.maskFlag = false;
},
closeShare() {
this.shareFlage = false;
},
// 邀请砍价
shareBargain() {
this.shareFlage = true;
},
// 获取商品详情
getGoodsDetail() {
uni.showLoading({
title: "加载中",
mask: true,
});
this.$refs.popupGoods.buy({
skuId: this.bargainDetail.id,
num: 1,
cartType: "KANJIA",
});
// getGoods(this.bargainDetail.id, this.bargainDetail.goodsId).then(
// (response) => {
// this.goodsDetail = response.data.result.data;
// this.selectedGoods = response.data.result.data;
// this.goodsSpec = response.data.result.specs;
// uni.hideLoading();
// // this.maskFlag = true;
// }
// );
},
// 初始化商品以及砍价活动
async init() {
// 获取商品
let res = await getBargainDetail(this.routerVal.id);
if (res.data.success) {
this.bargainDetail = res.data.result.goodsSku;
this.bargains = res.data.result;
// 被邀请活动id
if (this.params.kanjiaActivityId) {
} else {
this.params.kanjiaActivityGoodsId = this.routerVal.id;
}
// 获取砍价活动
this.activity();
}
},
// 获取砍价活动
async activity() {
let res = await getBargainActivity(this.params);
// 判断当前是否是第一次进入,如果是第一次进入默认砍一刀
res.data.success
? res.data.result
? (this.activityData = res.data.result)
: this.openActivity()
: "";
},
// 分页获取砍价活动-帮砍记录
async getBargainLogList() {
let res = await getBargainLog(this.logParams);
if (res.data.success) {
this.logData = res.data.result.records;
}
},
// 帮忙砍一刀
async handleClickHelpBargain() {
let res = await helpBargain(this.params.kanjiaActivityId);
if (res.data.success) {
this.helpBargainFlage = false;
this.kanjiaPrice = res.data.result.kanjiaPrice;
this.Bargaining = true;
// 帮砍完成之后查询帮砍记录
this.init();
} else {
this.helpBargainFlage = false;
}
},
// 发起砍价活动
async openActivity(data) {
let res = await openBargain({ id: this.routerVal.id });
if (res.data.success) {
this.kanjiaPrice = res.data.result.kanjiaPrice;
this.Bargaining = true;
// 查询帮砍记录
this.init();
}
},
},
};
</script>
<style lang="scss">
page {
background-color: $light-color !important;
}
</style>
<style lang="scss" scoped>
.slot-content {
display: flex;
align-items: flex-end;
justify-content: center;
margin: 20rpx 0 80rpx 0;
}
.price {
margin-left: 10rpx;
color: $light-color;
}
.price-box {
align-items: center;
padding: 10rpx 0;
}
.wrapper {
background: url("../static/Bargaining.png");
background-repeat: no-repeat;
background-size: 100% 100%;
height: 700rpx;
width: 100%;
}
.box {
background: #fff;
border-radius: 20rpx;
position: relative;
width: 94%;
margin: 0 auto;
> .bargain {
padding: 32rpx;
}
}
.box1 {
top: 750rpx;
}
.box2 {
top: 770rpx;
}
.box3 {
top: 790rpx;
}
.box4 {
top: 810rpx;
height: 200rpx;
}
.bargain-item {
align-items: center;
}
.goods-config {
margin-left: 20rpx;
> .goods-title {
font-weight: bold;
}
}
.max-price,
.purchase-price {
font-size: 24rpx;
color: #999;
}
.max-price {
margin-left: 10rpx;
text-decoration: line-through;
}
.purchase-price {
color: $main-color;
> span {
font-size: 32rpx;
font-weight: bold;
}
}
.bargaining,
.buy {
font-size: 24rpx;
color: #fff;
width: 80%;
margin: 50rpx auto 0 auto;
text-align: center;
font-size: 30rpx;
background-image: linear-gradient(
25deg,
$main-color,
$light-color,
$aider-light-color
);
padding: 18rpx;
border-radius: 100px;
animation: mymove 5s infinite;
-webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
animation-direction: alternate; /*轮流反向播放动画。*/
animation-timing-function: ease-in-out; /*动画的速度曲线*/
/* Safari 和 Chrome */
-webkit-animation: mymove 5s infinite;
-webkit-animation-direction: alternate; /*轮流反向播放动画。*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
}
@keyframes mymove {
0% {
transform: scale(1); /*开始为原始大小*/
}
25% {
transform: scale(1.1); /*放大1.1倍*/
}
50% {
transform: scale(1);
}
75% {
transform: scale(1.1);
}
}
.line {
margin: 20rpx 0;
}
.tips {
font-size: 24rpx;
color: #999;
justify-content: space-between;
}
.bargain-progress {
margin: 20rpx 0;
}
.bargain-title {
font-size: 32rpx;
font-weight: bold;
color: $light-color;
text-align: center;
margin-bottom: 40rpx;
}
.user-item {
margin: 40rpx 0;
align-items: center;
}
.user-config {
margin-left: 20rpx;
flex: 8;
align-items: center;
justify-content: space-between;
> .user-name {
> div:nth-of-type(1) {
font-size: 28rpx;
}
> div:nth-last-of-type(1) {
font-size: 24rpx;
color: #999;
}
}
}
.save {
color: $light-color;
> span {
font-weight: bold;
}
}
.mobile-intro {
overflow: hidden;
max-width: 100%;
}
@keyframes fontMove {
0% {
transform: scale(1); /*开始为原始大小*/
}
25% {
transform: scale(1.1); /*放大1.1倍*/
}
50% {
transform: scale(1);
}
75% {
transform: scale(1.1);
}
}
.help-bargain {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
> .help {
margin-bottom: 40rpx;
border-radius: 20rpx;
margin-top: 40rpx;
animation: fontMove 5s infinite;
-webkit-animation: fontMove 5s infinite; /*Safari and Chrome*/
animation-direction: alternate; /*轮流反向播放动画。*/
animation-timing-function: ease-in-out; /*动画的速度曲线*/
/* Safari 和 Chrome */
-webkit-animation: fontMove 5s infinite;
-webkit-animation-direction: alternate; /*轮流反向播放动画。*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
}
}
</style>

View File

@@ -0,0 +1,133 @@
<template>
<div class="page">
<u-navbar back-icon-color="#fff" :background="background" :border-bottom="false" title=""></u-navbar>
<div class="wrapper">
<!-- 砍价列表 -->
<div class="box">
<div class="bargain" v-if="bargainList.length!=0">
<div class="flex bargain-item" v-for="(item,index) in bargainList" :key="index">
<div class="goods-img">
<u-image width="150" height="150" :src="item.thumbnail"></u-image>
</div>
<div class="goods-config">
<div class="goods-title wes-2">
{{item.goodsName}}
</div>
<div class="flex goods-buy">
<div class="max-price">最低<span>{{item.purchasePrice | unitPrice}}</span></div>
<div class="bargaining" @click="navigateToBargainDetail(item)">参与砍价</div>
</div>
</div>
</div>
</div>
<div class="bargain empty" v-else>
<u-empty text="暂无活动" mode="list"></u-empty>
</div>
</div>
</div>
</div>
</template>
<script>
import { getBargainList } from "@/api/promotions";
export default {
data() {
return {
background: {
backgroundColor: 'transparent',
},
params: {
promotionStatus: "START", //开始/上架
pageNumber: 1,
pageSize: 20,
},
bargainList: [], //砍价活动列表
};
},
onShow() {
this.init();
},
methods: {
/**
* 初始化砍价列表
*/
async init() {
let res = await getBargainList(this.params); //砍价列表
if (res.data.success) {
this.bargainList = res.data.result.records;
}
},
// 跳转到砍价详情
navigateToBargainDetail(val) {
uni.navigateTo({
url: `/pages/promotion/bargain/detail?id=${val.id}`,
});
},
},
};
</script>
<style lang="scss">
page{
background-color: $light-color !important;
}
</style>
<style lang="scss" scoped>
.wrapper {
background: url("../static/Bargaining.png");
background-repeat: no-repeat;
background-size: 100% 100%;
height: 700rpx;
width: 100%;
}
.box {
background: #fff;
border-radius: 20rpx;
position: relative;
top: 750rpx;
width: 94%;
margin: 0 auto;
> .bargain {
padding: 32rpx;
}
}
.bargain-item {
align-items: center;
border-bottom: 1rpx solid #f6f6f6;
padding: 32rpx 0;
}
.goods-config {
flex: 8;
margin-left: 20rpx;
> .goods-title {
height: 80rpx;
font-weight: bold;
}
}
.max-price {
color: $main-color;
font-size: 24rpx;
> span {
font-size: 32rpx;
font-weight: bold;
}
}
.goods-buy {
margin: 10rpx 0;
align-items: center;
justify-content: space-between;
}
.bargaining {
font-size: 24rpx;
color: #fff;
background: $light-color;
padding: 10rpx 24rpx;
border-radius: 100px;
}
.empty {
height: 400rpx;
}
</style>

View File

@@ -23,7 +23,7 @@
<!-- 商品栏 --> <!-- 商品栏 -->
<div class="swiper"> <div class="swiper">
<div v-if="groupBuy.length !=0">
<view class="view-item" v-for="(groupItem, groupIndex) in groupBuy" :key="groupIndex"> <view class="view-item" v-for="(groupItem, groupIndex) in groupBuy" :key="groupIndex">
<view class="view-left"> <view class="view-left">
<u-image border-radius="10" shape="square" :src="groupItem.goodsImage" width="186rpx" height="186rpx"> <u-image border-radius="10" shape="square" :src="groupItem.goodsImage" width="186rpx" height="186rpx">
@@ -54,7 +54,8 @@
</view> </view>
</view> </view>
<u-loadmore bg-color='#f8f8f8' :status="status" /> <u-loadmore bg-color='#f8f8f8' :status="status" />
</div>
<u-empty v-else style="margin-top:20%" text="暂无拼团活动" mode="data"></u-empty>
</div> </div>
@@ -91,8 +92,8 @@ export default {
val ? (this.title = "") : (this.title = "拼团活动"); val ? (this.title = "") : (this.title = "拼团活动");
}, },
}, },
onReachBottom(){ onReachBottom() {
this.loadMore() this.loadMore();
}, },
// 点击搜索按钮 // 点击搜索按钮
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@@ -151,5 +152,4 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./style.scss"; @import "./style.scss";
</style> </style>

View File

@@ -104,7 +104,6 @@ export default {
this.params[this.current].pageNumber = 1; this.params[this.current].pageNumber = 1;
this.liveList = []; this.liveList = [];
this.getLives(); this.getLives();
this.getRecommendLives(); this.getRecommendLives();
}, },
onReachBottom() { onReachBottom() {
@@ -225,6 +224,7 @@ export default {
* 进入直播间 * 进入直播间
*/ */
handleLivePlayer(val) { handleLivePlayer(val) {
// #ifdef MP-WEIXIN
let roomId = val.roomId; // 填写具体的房间号,可通过下面【获取直播房间列表】 API 获取 let roomId = val.roomId; // 填写具体的房间号,可通过下面【获取直播房间列表】 API 获取
let customParams = encodeURIComponent( let customParams = encodeURIComponent(
JSON.stringify({ path: "pages/index/index", pid: 1 }) JSON.stringify({ path: "pages/index/index", pid: 1 })
@@ -236,6 +236,15 @@ export default {
"&custom_params=" + "&custom_params=" +
customParams, customParams,
}); });
// #endif
// #ifndef MP-WEIXIN
uni.showToast({
title: "请从微信小程序中预览直播功能",
duration: 2000,
icon: "none",
});
// #endif
}, },
}, },
}; };

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -100,13 +100,12 @@
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span> <span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
</div> </div>
</p>
</view> </view>
</view> </view>
</u-swipe-action> </u-swipe-action>
</div> </div>
</div> </div>
<u-modal v-model="deleteShow" @delectConfirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal> <u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="delectConfirm" show-cancel-button :content="deleteContent" :async-close="true"></u-modal>
<!-- 结账 --> <!-- 结账 -->
<div class="box box6"> <div class="box box6">
<view class="navL"> <view class="navL">

View File

@@ -86,6 +86,11 @@ export function modelNavigateTo(item) {
url: `/pages/promotion/lives`, url: `/pages/promotion/lives`,
}); });
break; break;
case "砍价":
uni.navigateTo({
url: `/pages/promotion/bargain/list`,
});
break;
case "积分商城": case "积分商城":
uni.switchTab({ uni.switchTab({
url: `/pages/navigation/point/point-mall`, url: `/pages/navigation/point/point-mall`,

View File

@@ -27,10 +27,8 @@
</div> </div>
</template> </template>
<script> <script>
import uImage from "@/uview-ui/components/u-image/u-image.vue";
export default { export default {
title: "商品分类以及商品", title: "商品分类以及商品",
components: { uImage },
data() { data() {
return { return {
selected: { selected: {
@@ -116,12 +114,9 @@ $w_94: 94%;
margin: 0 auto; margin: 0 auto;
// width: 158px; // width: 158px;
width: $w_94; width: $w_94;
border-top-left-radius: 20rpx; border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx; border-top-right-radius: 20rpx;
overflow: hidden; overflow: hidden;
> img { > img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -135,23 +130,19 @@ $w_94: 94%;
background: #fff; background: #fff;
padding: 8rpx 0 8rpx 8rpx; padding: 8rpx 0 8rpx 8rpx;
margin: 0 auto; margin: 0 auto;
> .goods-title { > .goods-title {
font-size: 24rpx; font-size: 24rpx;
height: 70rpx; height: 70rpx;
display: -webkit-box; display: -webkit-box;
font-weight: 500; font-weight: 500;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
} }
> .goods-bottom { > .goods-bottom {
display: flex; display: flex;
font-weight: bold; font-weight: bold;
> .goods-price { > .goods-price {
line-height: 2; line-height: 2;
color: $main-color; color: $main-color;

View File

@@ -68,6 +68,7 @@ export default {
return { return {
config, config,
pageData: "", //楼层页面数据 pageData: "", //楼层页面数据
isIos: "",
}; };
}, },
components: { components: {
@@ -93,10 +94,12 @@ export default {
}, },
mounted() { mounted() {
this.init(); this.init();
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// 小程序默认分享 // 小程序默认分享
uni.showShareMenu({ withShareTicket: true, }); uni.showShareMenu({ withShareTicket: true });
// #endif // #endif
}, },
@@ -137,9 +140,6 @@ export default {
}, 100); }, 100);
} }
}); });
// let
// 扫码成功后跳转到webview页面
}, },
}); });
}, },
@@ -153,9 +153,7 @@ export default {
content: "您已经关闭相机权限,去设置", content: "您已经关闭相机权限,去设置",
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
let isIos = plus.os.name == "iOS"; if (this.isIos) {
if (isIos) {
plus.runtime.openURL("app-settings:"); plus.runtime.openURL("app-settings:");
} else { } else {
permision.gotoAppPermissionSetting(); permision.gotoAppPermissionSetting();
@@ -171,32 +169,28 @@ export default {
*/ */
async scan() { async scan() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
let isIos = plus.os.name == "iOS"; this.isIos = plus.os.name == "iOS";
// 判断是否是Ios // 判断是否是Ios
if (isIos) { if (this.isIos) {
const iosFirstCamera = uni.getStorageSync("iosFirstCamera"); //是不是第一次开启相机
if (iosFirstCamera !== "false") {
uni.setStorageSync("iosFirstCamera", "false"); //设为false就代表不是第一次开启相机
this.seacnCode();
} else {
if (permision.judgeIosPermission("camera")) { if (permision.judgeIosPermission("camera")) {
this.seacnCode(); this.seacnCode();
} else { } else {
// 没有权限提醒是否去申请权限 // 没有权限提醒是否去申请权限
uni.showModal({
title: "提示",
content: "您已经关闭相机权限,去设置",
success: function (res) {
if (res.confirm) {
plus.runtime.openURL("app-settings:");
}
},
});
}
} else {
// 安卓
const result = await permision.requestAndroidPermission("CAMERA");
if (result == 1 || result == 0) {
this.seacnCode();
} else {
this.tipsGetSettings(); this.tipsGetSettings();
} }
} }
} else {
/**
* TODO 安卓 权限已经授权了调用api总是显示用户已永久拒绝申请。人傻了
* TODO 如果xdm有更好的办法请在 https://gitee.com/beijing_hongye_huicheng/lilishop/issues 提下谢谢
*/
this.seacnCode();
}
// #endif // #endif

View File

@@ -14,11 +14,10 @@
<view class="head-2" v-else> <view class="head-2" v-else>
<view class="user-name">登录/注册</view> <view class="user-name">登录/注册</view>
</view> </view>
<u-icon style="display: flex;align-items: flex-start;" name="arrow-right"></u-icon>
<u-icon name="arrow-right"></u-icon>
</view> </view>
<!-- 积分优惠券关注 --> <!-- 积分优惠券关注 -->
<div class="pointBox"> <div class="pointBox box">
<u-row text-align="center" gutter="16" class="point"> <u-row text-align="center" gutter="16" class="point">
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')"> <u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')">
<view>预存款</view> <view>预存款</view>
@@ -35,7 +34,6 @@
<view>{{ footNum || 0 }}</view> <view>{{ footNum || 0 }}</view>
</u-col> </u-col>
</u-row> </u-row>
</div>
<!-- 我的订单代付款 --> <!-- 我的订单代付款 -->
<view class="order"> <view class="order">
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')"> <view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
@@ -48,32 +46,28 @@
<div class="bag bag2"> <div class="bag bag2">
<u-icon name="bag-fill" size="35" color="#fff"></u-icon> <u-icon name="bag-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>待付款</view> <view>待付款</view>
<!-- <view class="corner" v-if="cornerForm.stay_pay_order > 0">{{ cornerForm.stay_pay_order}}</view> -->
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=3')"> <view class="order-item" @click="navigateTo('/pages/order/myOrder?status=3')">
<div class="bag bag3"> <div class="bag bag3">
<u-icon name="car-fill" size="35" color="#fff"></u-icon> <u-icon name="car-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>待收货</view> <view>待收货</view>
<!-- <view class="corner" v-if="cornerForm.stay_receiving_order > 0">{{ cornerForm.stay_receiving_order}}</view> -->
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')"> <view class="order-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
<div class="bag bag4"> <div class="bag bag4">
<u-icon name="star-fill" size="35" color="#fff"></u-icon> <u-icon name="star-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>待评价</view> <view>待评价</view>
<!-- <view class="corner" v-if="cornerForm.pending_comment_count > 0">{{ cornerForm.pending_comment_count}}</view> -->
</view> </view>
<view class="order-item" @click="navigateTo('/pages/order/afterSales/afterSales')"> <view class="order-item" @click="navigateTo('/pages/order/afterSales/afterSales')">
<div class="bag bag5"> <div class="bag bag5">
<u-icon name="server-fill" size="35" color="#fff"></u-icon> <u-icon name="server-fill" size="35" color="#fff"></u-icon>
</div> </div>
<view>售后服务</view> <view>售后服务</view>
<!-- <view class="corner" v-if="cornerForm.after_order > 0">{{ cornerForm.after_order}}</view> -->
</view> </view>
</view> </view>
</div>
<!-- 常用工具 --> <!-- 常用工具 -->
@@ -82,10 +76,9 @@
</view> </view>
</template> </template>
<script> <script>
import storage from "@/utils/storage.js";
import tool from "@/pages/tabbar/user/utils/tool.vue"; import tool from "@/pages/tabbar/user/utils/tool.vue";
import { getCouponsNum, getFootprintNum } from "@/api/members.js"; import { getCouponsNum, getFootprintNum } from "@/api/members.js";
import { getUserInfo, getUserWallet } from "@/api/members"; import { getUserWallet } from "@/api/members";
let startY = 0, let startY = 0,
moveY = 0, moveY = 0,
pageAtTop = true; pageAtTop = true;
@@ -203,42 +196,19 @@ body {
} }
.money { .money {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.uiconRed {
position: relative;
&::before {
content: "";
background: red;
width: 10rpx;
height: 10rpx;
border-radius: 50%;
position: absolute;
right: 0;
top: 0;
}
}
.user { .user {
.status_WEIXIN {
background: $light-color;
overflow: hidden;
> .status_WEIXIN_R {
float: right;
margin-right: 20rpx;
}
> .status_WEIXIN_L {
float: left;
margin-left: 20rpx;
}
}
.header { .header {
max-width: 100%; max-width: 100%;
padding: calc(50rpx + var(--status-bar-height)) 30rpx 0 115rpx; padding: calc(50rpx + var(--status-bar-height)) 30rpx 0 6%;
height: calc(var(--status-bar-height) + 360rpx); height: calc(var(--status-bar-height) + 360rpx);
background-size: cover; background-size: cover;
border-bottom-left-radius: 20rpx; border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 20rpx; border-bottom-right-radius: 30rpx;
background-image: url("/static/img/main-bg.png"); background-image: url("/static/img/main-bg.png");
background-position: bottom; background-position: bottom;
background-repeat: no-repeat; background-repeat: no-repeat;
@@ -247,11 +217,12 @@ body {
justify-content: space-between; justify-content: space-between;
.head-1 { .head-1 {
text-align: center; text-align: center;
width: 144rpx; width: 152rpx;
position: relative; position: relative;
margin-top: 40rpx; display: flex;
align-items: center;
image { image {
width: 144rpx; width: 152rpx;
height: 144rpx; height: 144rpx;
border-radius: 50%; border-radius: 50%;
margin-bottom: 30rpx; margin-bottom: 30rpx;
@@ -270,45 +241,35 @@ body {
height: 100%; height: 100%;
} }
} }
.certificate {
font-size: 20rpx;
border: 1px solid #ffffff;
border-radius: 1em;
width: 91rpx;
margin: 0 auto;
}
} }
.head-2 { .head-2 {
flex: 1; flex: 1;
margin-left: 30rpx; margin-left: 30rpx;
line-height: 2em; margin-top: 100rpx;
margin-top: 60rpx; line-height: 1;
} }
/deep/ .u-icon,
.u-icon { .u-icon {
margin-top: -120rpx; margin-top: 106rpx;
} }
} }
.pointBox { .pointBox {
transform: translateY(-30rpx);
width: 94%; width: 94%;
margin: 0 3%; margin: 0 3%;
background: #fff; background: #fff;
border-radius: 0.4em; border-radius: 20rpx;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04); box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
height: 160rpx;
} }
.point { .point {
text-align: center; text-align: center;
height: 160rpx; height: 160rpx;
border-bottom: 1px solid $border-color-light;
color: #999;
font-size: $font-sm; font-size: $font-sm;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
padding: 24rpx; padding: 24rpx;
// #endif // #endif
.u-col { .u-col {
line-height: 1.5em view { view {
color: $u-main-color; color: $u-main-color;
font-size: 28rpx; font-size: 28rpx;
} }
@@ -336,29 +297,17 @@ body {
font-size: 48rpx; font-size: 48rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.corner {
position: absolute;
right: 14rpx;
top: -6rpx;
width: 30rpx;
height: 30rpx;
background-color: red;
color: #fff;
border-radius: 50%;
line-height: 30rpx;
}
} }
} }
} }
.box {
transform: translateY(-30rpx);
}
.user-name { .user-name {
font-size: 34rpx; font-size: 34rpx;
} }
.nickname {
font-size: 24rpx;
}
.bag { .bag {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;

View File

@@ -2,7 +2,7 @@
<view> <view>
<!-- 常用工具 --> <!-- 常用工具 -->
<view class="interact-tools" style="margin-bottom: 15px"> <view class="interact-tools" style="margin-bottom: 15px">
<view class="interact-title">常用工具</view>
<div class="paddingBox"> <div class="paddingBox">
<view class="interact-container"> <view class="interact-container">
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')"> <view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
@@ -73,15 +73,20 @@ export default {
distribution().then((res) => { distribution().then((res) => {
if (res.data.result) { if (res.data.result) {
let type = res.data.result.distributionStatus; let type = res.data.result.distributionStatus;
if (type == "PASS") { if (type == "PASS") {
uni.navigateTo({ uni.navigateTo({
url: "/pages/mine/distribution/home", url: "/pages/mine/distribution/home",
}); });
} else if (type == "RETREAT" || type == "REFUSE") { } else if (type == "REFUSE") {
uni.navigateTo({ uni.navigateTo({
url: "/pages/mine/distribution/auth", url: "/pages/mine/distribution/auth",
}); });
} else if (type == "RETREAT") {
uni.showToast({
title: "您的分销资格已被清退。请联系管理员!",
duration: 2000,
icon: "none",
});
} else { } else {
uni.showToast({ uni.showToast({
title: "您的信息正在审核", title: "您的信息正在审核",
@@ -91,7 +96,7 @@ export default {
} }
} else if (!res.data.success && res.data.code == 22000) { } else if (!res.data.success && res.data.code == 22000) {
uni.showToast({ uni.showToast({
title: '分销功能暂未开启', title: "分销功能暂未开启",
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });
@@ -111,25 +116,16 @@ export default {
.interact-tools { .interact-tools {
border-left: none; border-left: none;
border-right: none; border-right: none;
margin-top: 30rpx;
.interact-title {
background: #f2f2f2;
height: 96rpx;
line-height: 96rpx;
font-size: 28rpx;
color: #333;
font-weight: bold;
padding-left: 30rpx;
margin: 0 20rpx;
border-radius: 14rpx 14rpx 0 0;
}
.interactBox { .interactBox {
height: 156rpx; height: 156rpx;
} }
.interact-container { .interact-container {
margin: 0 20rpx; margin: 0 20rpx;
background: #fff; background: #fff;
border-radius: 0 0 14rpx 14rpx; border-radius: 20rpx;
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
.interact-item-img { .interact-item-img {
width: 52rpx !important; width: 52rpx !important;
height: 52rpx !important; height: 52rpx !important;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -174,3 +174,11 @@ $font-weight: 400;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.wes-2 {
/* 适用于webkit内核和移动端 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}

View File

@@ -9,6 +9,69 @@
* randomString 随机生成指定长度的字符串 * randomString 随机生成指定长度的字符串
*/ */
/**
* 验证银行卡号
*/
export function checkBankno(bankno) {
var lastNum = bankno.substr(bankno.length - 1, 1); //取出最后一位与luhm进行比较
var first15Num = bankno.substr(0, bankno.length - 1); //前15或18位
var newArr = [];
for (var i = first15Num.length - 1; i > -1; i--) {
//前15或18位倒序存进数组
newArr.push(first15Num.substr(i, 1));
}
var arrJiShu = []; //奇数位*2的积 <9
var arrJiShu2 = []; //奇数位*2的积 >9
var arrOuShu = []; //偶数位数组
for (var j = 0; j < newArr.length; j++) {
if ((j + 1) % 2 == 1) {
//奇数位
if (parseInt(newArr[j]) * 2 < 9) arrJiShu.push(parseInt(newArr[j]) * 2);
else arrJiShu2.push(parseInt(newArr[j]) * 2);
} //偶数位
else arrOuShu.push(newArr[j]);
}
var jishu_child1 = []; //奇数位*2 >9 的分割之后的数组个位数
var jishu_child2 = []; //奇数位*2 >9 的分割之后的数组十位数
for (var h = 0; h < arrJiShu2.length; h++) {
jishu_child1.push(parseInt(arrJiShu2[h]) % 10);
jishu_child2.push(parseInt(arrJiShu2[h]) / 10);
}
var sumJiShu = 0; //奇数位*2 < 9 的数组之和
var sumOuShu = 0; //偶数位数组之和
var sumJiShuChild1 = 0; //奇数位*2 >9 的分割之后的数组个位数之和
var sumJiShuChild2 = 0; //奇数位*2 >9 的分割之后的数组十位数之和
var sumTotal = 0;
for (var m = 0; m < arrJiShu.length; m++) {
sumJiShu = sumJiShu + parseInt(arrJiShu[m]);
}
for (var n = 0; n < arrOuShu.length; n++) {
sumOuShu = sumOuShu + parseInt(arrOuShu[n]);
}
for (var p = 0; p < jishu_child1.length; p++) {
sumJiShuChild1 = sumJiShuChild1 + parseInt(jishu_child1[p]);
sumJiShuChild2 = sumJiShuChild2 + parseInt(jishu_child2[p]);
}
//计算总和
sumTotal =
parseInt(sumJiShu) +
parseInt(sumOuShu) +
parseInt(sumJiShuChild1) +
parseInt(sumJiShuChild2);
//计算Luhm值
var k = parseInt(sumTotal) % 10 == 0 ? 10 : parseInt(sumTotal) % 10;
var luhm = 10 - k;
if (lastNum == luhm) {
return true;
} else {
return false;
}
}
/** /**
* 登录后跳转判断 * 登录后跳转判断
* 计算出当前router路径 * 计算出当前router路径
@@ -18,18 +81,17 @@
*/ */
export function whetherNavigate(type = "default") { export function whetherNavigate(type = "default") {
let navigation = getCurrentPages()[getCurrentPages().length - (getCurrentPages().length ) ];
if (getCurrentPages().length > 1) { if (getCurrentPages().length > 1) {
if ((getCurrentPages().length - 2).route == "pages/passport/login") { console.log(navigation, getCurrentPages());
if (navigation.route == "pages/passport/login") {
navigationToBack(type); navigationToBack(type);
} else { } else {
if ( if (!navigation.route || navigation.route == "undefined") {
!(getCurrentPages().length - 2).route ||
(getCurrentPages().length - 2).route == "undefined"
) {
navigationToBack(type); navigationToBack(type);
} else { } else {
uni.navigateBack({ uni.navigateBack({
delta: getCurrentPages().length - 2, delta: getCurrentPages().length,
}); });
} }
} }
@@ -154,12 +216,11 @@ export function countTimeDown(seconds) {
}; };
} }
function navigationToBack(type) { function navigationToBack(type) {
if (type == "wx") { if (type == "wx") {
// console.log(getCurrentPages().length - 3) // console.log(getCurrentPages().length - 3)
uni.navigateBack({ uni.navigateBack({
delta: getCurrentPages().length , delta: getCurrentPages().length,
}); });
} else { } else {
uni.switchTab({ uni.switchTab({
@@ -194,4 +255,5 @@ module.exports = {
countTimeDown, countTimeDown,
theNextDayTime, theNextDayTime,
whetherNavigate, whetherNavigate,
checkBankno,
}; };

View File

@@ -73,7 +73,7 @@ function cleanStorage() {
storage.setHasLogin(false); storage.setHasLogin(false);
storage.setAccessToken(""); storage.setAccessToken("");
storage.setRefreshToken(""); storage.setRefreshToken("");
console.log("清空token") console.log("清空token");
storage.setUuid(""); storage.setUuid("");
storage.setUserInfo({}); storage.setUserInfo({});
@@ -133,8 +133,11 @@ http.interceptors.request.use(
refresh(); refresh();
} else { } else {
if ( if (
JSON.parse(atob(accessToken.split(".")[1].replace(/-/g, '+').replace(/_/g, '/'))).exp < JSON.parse(
Math.round(new Date() / 1000) atob(
accessToken.split(".")[1].replace(/-/g, "+").replace(/_/g, "/")
)
).exp < Math.round(new Date() / 1000)
) { ) {
refresh(); refresh();
} }
@@ -151,7 +154,6 @@ http.interceptors.request.use(
} }
); );
async function refresh() { async function refresh() {
// 本地储存的是过期token了重新获取 // 本地储存的是过期token了重新获取
const getTokenResult = await refreshToken(); const getTokenResult = await refreshToken();

View File

@@ -9,6 +9,7 @@ const FACE_LOGIN = isDev ? "face_login_dev" : "face_login";
const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login"; const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login";
const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn"; const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn";
export default { export default {
// 获取face id登录 // 获取face id登录
getFaceLogin() { getFaceLogin() {
return uni.getStorageSync(FACE_LOGIN); return uni.getStorageSync(FACE_LOGIN);