Feat:优惠券对接

This commit is contained in:
lifizer
2023-12-25 17:16:56 +08:00
parent 847a80f251
commit 18a2fbb8a6
46 changed files with 1360 additions and 858 deletions
+20 -4
View File
@@ -74,6 +74,19 @@
.cell:last-child {
margin-bottom: 0;
}
.coupon-label {
display: inline-block;
height: 46rpx;
box-sizing: border-box;
margin-right: 10rpx;
padding: 0 8rpx;
border: 2rpx solid #FD5749;
border-radius: 8rpx;
color: #FD5749;
font-size: 28rpx;
line-height: 46rpx;
}
}
.store-section {
@@ -111,14 +124,15 @@
height: 198rpx;
overflow: hidden;
.tag{
.tag {
position: absolute;
top: 0;
left: 0;
width: 92rpx;
height: 40rpx;
}
.cover{
.cover {
width: 100%;
height: 100%;
border-radius: 12rpx;
@@ -162,12 +176,14 @@
color: #ADADAD;
}
}
.row:last-child{
.row:last-child {
border-bottom: none;
}
.value {
width: 100%;
padding: 16rpx;
}
}
}
}
+30 -6
View File
@@ -26,6 +26,15 @@ export default {
}
},
levelJump: (level, url, params) => {
if (params) url += `?${params}`
if (level === 1) {
uni.switchTab({url})
} else {
uni.navigateTo({url})
}
},
navToGoods: (id) => {
uni.navigateTo({
url: "/pages/shop/GoodsCon/index?id=" + id
@@ -36,14 +45,14 @@ export default {
uni.navigateToMiniProgram({
appId: "wx9ca93d1f2a9c8156",
path: "pages/auth/login",
success(msg){
console.log("success",msg)
success(msg) {
console.log("success", msg)
},
fail(err){
console.log("fail",err)
fail(err) {
console.log("fail", err)
},
complete(msg){
console.log("complete",msg)
complete(msg) {
console.log("complete", msg)
}
})
},
@@ -68,6 +77,21 @@ export default {
res += chars[id];
}
return res;
},
deepClone(val) {
let oVal = Array.isArray(val) ? [] : {};
for (let v in val) {
if (val.hasOwnProperty(v)) {
if ('object' === typeof val[v]) {
//这里是深拷贝的关键所在(递归调用)
oVal[v] = this.deepClone(val[v]);
} else {
oVal[v] = val[v];
}
}
}
return oVal;
}
}