Compare commits

...

3 Commits
master ... shop

Author SHA1 Message Date
高健
e84c1f69b1 店铺优惠券样式修改 2021-08-05 15:15:41 +08:00
高健
740b45d2a3 优惠券列表样式 2021-08-05 14:34:05 +08:00
高健
91149f4224 shop 2021-08-05 11:27:14 +08:00
5 changed files with 82 additions and 52 deletions

View File

@ -83,11 +83,9 @@ Page({
},
doSaveUserInfo() {
try {
console.log('保存')
var names = wx.getStorageSync('name')
var icon = wx.getStorageSync('userIcon')
var _self = this
console.log(names)
if (names) {
app.http.put(app.urls.doSaveUserInfo, {
header: {
@ -99,7 +97,6 @@ Page({
}
})
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
@ -111,7 +108,6 @@ Page({
},
//获取首页展示的栏目
getMainColumn(id) {
console.log(id)
var _self = this
_self.setData({
dataList: []
@ -359,7 +355,6 @@ Page({
const ix = e.currentTarget.dataset.i
const a = e.currentTarget.dataset.a
var audio = e.currentTarget.dataset.item
console.log(_self.data.isPlayAudio)
if (_self.data.isPlayAudio) {
//有播放的
//先需要停止其他录音文件的播放
@ -418,7 +413,6 @@ Page({
innerAudioContext.onCanplay((res) => {})
innerAudioContext.onStop((res) => {
console.log('onStop===')
_self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
@ -428,8 +422,6 @@ Page({
})
})
innerAudioContext.onEnded((res) => {
console.log(res)
console.log('播放完毕')
_self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
@ -439,8 +431,6 @@ Page({
})
})
innerAudioContext.onError((res) => {
console.log('播放错误')
console.log(res)
_self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
@ -457,8 +447,11 @@ Page({
// 跳转模板列表
goList: function () {
wx.navigateTo({
url: '/packagecard/cardList/cardList',
url: '/pages/mine/shop/mineshop',
})
// wx.navigateTo({
// url: '/packagecard/cardList/cardList',
// })
},
// 获取个人简介
getPersonIntro: function () {
@ -595,7 +588,6 @@ Page({
cardTemplateUseTop: ""
}
}).then(res => {
console.log(res.data)
wx.showToast({
title: '加入卡包成功!',
})
@ -802,7 +794,6 @@ Page({
wx.showShareMenu({
withShareTicket: true,
success: function (res) {
console.log(res)
}
})
@ -931,7 +922,6 @@ Page({
cardTemplateDispatchId: self.data.cardTemplateDispatchId
}
}).then(res => {
console.log(res)
}).catch(res => {
console.log(res)
})

View File

@ -63,7 +63,7 @@ Page({
})
},
//删除
doDel(e) {
doDelOne(e) {
var item = e.currentTarget.dataset.item
var _self = this
wx.showModal({

View File

@ -1,34 +1,36 @@
<cu-custom isBack="{{true}}">
<view slot="content">新增优惠券</view>
</cu-custom>
<scroll-view style="margin-bottom:80rpx;margin-top:10rpx" refresher-enabled="true" refresher-threshold="{{50}}"
<view class="radial-gradient"></view>
<scroll-view style="margin-bottom:100rpx;margin-top:10rpx" refresher-enabled="true" refresher-threshold="{{50}}"
refresher-background="#fff" bindrefresherrefresh="dorefresh" refresher-triggered="{{isRefreshing}}">
<view class="cu-list" wx:if="{{couponList.length>0}}">
<view class="cu-item" wx:for="{{couponList}}" wx:key="index">
<view style="display: flex;margin: 10rpx;">
<view style="display: flex;margin: 5rpx 20rpx;">
<view class="left-box">
<view>
{{item.couponName}}
<view style="display: flex;align-items: center;">
<!-- 可用商品 -->
<view wx:if="{{item.useCommodity=='0'}}" class="coupon-type-yellow">
<!-- 无限制 -->
全部商品
</view>
<view wx:else class="coupon-type-blue">
限品类
</view>
<text class="coupon-name"> {{item.couponName}}</text>
</view>
<view wx:if="{{item.expiringDate=='0'}}">
<view wx:if="{{item.expiringDate=='0'}}" class="coupon-desc">
<!-- 开始时间结束时间 -->
{{item.startDate+'-'+item.endDate}}
</view>
<view wx:elif="{{item.expiringDate=='1'}}">
<view wx:elif="{{item.expiringDate=='1'}}" class="coupon-desc">
领取当日{{item.expiringDays}}天内有效
</view>
<view wx:else>
<view wx:else class="coupon-desc">
领取次日{{item.expiringDays}}天内有效
</view>
<!-- 可用商品 -->
<view wx:if="{{item.useCommodity=='0'}}">
<!-- 无限制 -->
全部商品
</view>
<view wx:else>
限品类
</view>
</view>
<view class="right-box bg-yellow-yellow">
<view class="right-box">
<view>
<text class="price-icon">¥</text>
<text class="price">{{item.amount}}</text>
@ -46,7 +48,7 @@
<view class="btn-box">
<view class="btn bg-red radius" bindtap="doDelOne" data-item="{{item}}">删除</view>
<view class="btn bg-yellow-light-1 radius margin-left-sm" bindtap="doRecoverOne" data-item="{{item}}">恢复
<view class="btn bg-yellow-light-1 radius margin-left-sm" bindtap="toEditPage" data-item="{{item}}">编辑
</view>
</view>
</view>

View File

@ -6,18 +6,39 @@ page {
.right-box {
width: 100%;
position: relative;
min-height: 200rpx;
min-height: 140rpx;
flex: 3;
display: flex;
align-items: center;
justify-content: center;
border-radius: 15rpx 10rpx 10rpx 15rpx;
border-radius: 0rpx 10rpx 10rpx 0rpx;
flex-direction: column;
padding: 10rpx;
background-image: radial-gradient(circle at left top, #f2f2f2, #f2f2f2 10rpx, transparent 11rpx),
radial-gradient(circle at left bottom, #f2f2f2, #f2f2f2 10rpx, transparent 11rpx);
background-color: #E6B980;
}
.left-box {
width: 100%;
flex: 7;
position: relative;
min-height: 140rpx;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: space-between;
padding: 10rpx 15rpx;
position: relative;
border-radius: 10rpx 0rpx 0rpx 10rpx;
background-image: radial-gradient(circle at right top, #f2f2f2, #f2f2f2 10rpx, transparent 11rpx),
radial-gradient(circle at right bottom, #f2f2f2, #f2f2f2 10rpx, transparent 11rpx);
background-color: #ffffff;
}
.price {
color: #ffffff;
font-size: 54rpx;
font-size: 48rpx;
}
.price-icon {
@ -26,31 +47,48 @@ page {
}
.price-term {
font-size: 20rpx;
font-size: 24rpx;
color: #ffffff;
}
.left-box {
width: 100%;
flex: 7;
background: #ffffff;
position: relative;
border-radius: 10rpx 15rpx 15rpx 10rpx;
min-height: 200rpx;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
}
.btn-box {
width: 100%;
display: flex;
flex-direction: row;
justify-content: flex-end;
padding: 10rpx;
padding: 10rpx 20rpx;
}
.btn {
padding: 10rpx 40rpx;
}
.coupon-name {
font-size: 32rpx;
font-weight: bold;
color: black;
flex: 1;
}
.coupon-desc {
font-size: 24rpx;
color: #797979;
}
.coupon-type-yellow {
font-size: 24rpx;
color: #ffffff;
background: #ff9800;
padding: 0rpx 10rpx;
border-radius: 5rpx;
}
.coupon-type-blue {
font-size: 24rpx;
color: #ffffff;
background: #0471ff;
padding: 0rpx 10rpx;
border-radius: 5rpx;
}

View File

@ -1,7 +1,7 @@
var apis = {
url: 'http://192.168.0.115:8091/systemcard/',
userCenter: 'http://192.168.0.115:8091/systemcard/',
baseImgUrl: 'http://192.168.0.115:8091/systemcard/route/file/download/true/',
url: 'http://192.168.0.111:8091/systemcard/',
userCenter: 'http://192.168.0.111:8091/systemcard/',
baseImgUrl: 'http://192.168.0.111:8091/systemcard/route/file/download/true/',
doSaveUserInfo: `app/miniapp/user/update-info`, //保存微信头像与名称
doUpdatePhone: `app/miniapp/update-phone`, //绑定手机号 token, {phone:''} put
doUploadImg: `app/file/uploadimage`, //上传图片