Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product

pull/9/head
tangqian 2023-06-01 11:27:17 +08:00
commit 5a5c69421c
5 changed files with 39 additions and 22 deletions

View File

@ -28,14 +28,14 @@
<view class="up" @tap="goEquity">
<image style="width: ;" src="@/static/images/shop/vip_oneStar.png" mode=""></image>
</view>
<text>会员等级1级</text>
<text>会员等级{{vipData.findIndex((item) => item == vip.grade) +1}}</text>
<view class="button" @tap="goEquity"></view>
</view>
<view class="right" v-else>
<view class="up" @tap="goEquity">
<image style="width: ;" src="@/static/images/shop/vip_oneStar.png" mode=""></image>
</view>
<text>会员等级0</text>
<text>会员等级{{vipData.findIndex((item) => item == vip.grade) +1}}</text>
<view class="button" @tap="goEquity"></view>
</view>
</view>
@ -223,7 +223,7 @@
bastInfo: '',
fastInfo: '',
fastList: [],
text: '尊敬的业主:接环卫所通知,近期将对小区进行大扫除,请大家做好准备',
text: '暂无公告',
firstInfo: '',
salesInfo: '',
indicatorDots: false,
@ -286,7 +286,7 @@
lineColor: 'red',
lineStyle: {}, // 线--
listActive: 0, //
vipData:['普通会员','中级会员','高级会员'],
duration: 0.2 // 线
}
},

View File

@ -14,7 +14,7 @@
</view>
<view class="item-text">
<text>充值档次{{item.grade}}</text>
<text>日期{{item.stringCreateTime}}</text>
<text>日期{{$util.timestampToTime(item.stringCreateTime)}}</text>
</view>
</view>
<u-empty v-show="!memberData.length" text="暂无数据" mode="list"></u-empty>

View File

@ -15,6 +15,9 @@ import {
setVisit,
getUserInfo
} from '@/api/user.js'
import {
mapGetters
} from "vuex";
export default {
data(){
return {
@ -23,11 +26,11 @@ export default {
userInfo: {}
}
},
computed: mapGetters(['tenantId']),
mounted(){
getUserInfo().then(res => {
this.userInfo = res.data
console.log(res.data)
getTenant(153).then(res => {
getTenant(this.tenantId).then(res => {
this.tenant = res.data
this.text = res.data.notice
})

View File

@ -67,7 +67,7 @@
<text>{{item.nickname}}</text>
</view>
<text class="extra">
{{ timestampToTime(item.payTime) }}
{{ $util.timestampToTime(item.payTime) }}
<view>{{ item.grade }}</view>
</text>
</view>
@ -152,20 +152,20 @@
}
},
methods: {
timestampToTime(timestamp) {
// 10*1000131000
var date = new Date(timestamp);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
var m = (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":";
var s = (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
return Y + M + D + h + m + s;
},
// timestampToTime(timestamp) {
// // 10*1000131000
// var date = new Date(timestamp);
// var Y = date.getFullYear() + "-";
// var M =
// (date.getMonth() + 1 < 10
// ? "0" + (date.getMonth() + 1)
// : date.getMonth() + 1) + "-";
// var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
// var h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
// var m = (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":";
// var s = (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
// return Y + M + D + h + m + s;
// },
selectClick(value) {
console.log(value)
this.active = value.id

View File

@ -8,6 +8,20 @@ import {
pathToBase64
} from '@/plugin/image-tools/index.js';
export default {
timestampToTime(timestamp) {
// 时间戳为10位需*1000时间戳为13位不需乘1000
var date = new Date(timestamp);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
var m = (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":";
var s = (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
return Y + M + D + h + m + s;
},
/**
* opt object | string
* to_url object | string