This commit is contained in:
2020-06-24 16:39:31 +08:00
parent 8c993da2cd
commit 28e80b49ff
14 changed files with 132 additions and 54 deletions

View File

@@ -7,12 +7,11 @@
export default {
data() {
return {
nodes: `<p>13268748568645634nfdhf dfvjdfjgdfl vdufhnh1</p>123346<h1>das</h1><h1>das</h1><h1>das1</h1><h2>das2</h2><h3>das3</h3>`
nodes: '',
}
},
onLoad(option) {
console.log(option);
this.setTitle(option.title);
// console.log(option);
this.getUseHelpInfo(option.id);
},
methods: {
@@ -21,6 +20,7 @@ export default {
title: title
});
},
// 处理富文本
unescapeHTML (temp){
temp = "" + temp;
return temp.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&apos;/g, "'");
@@ -29,7 +29,6 @@ export default {
this.$u.api.getUseHelpInfo({
launch_id: id,
}).then((res)=>{
// console.log(res)
if (res.errCode == 0) {
this.nodes = this.unescapeHTML(res.data.info[0].help_info);
this.setTitle(res.data.info[0].help_title);

View File

@@ -9,11 +9,11 @@
<view class="integral-top">
<view>
<view class="title">总积分</view>
<view class="value">999</view>
<view class="value">{{ memberInfo.member_points }}</view>
</view>
<view>
<view class="title">经验值</view>
<view class="value">999</view>
<view class="value">{{ memberInfo.member_exppoints }}</view>
</view>
<view>
<view class="title">预计进度</view>
@@ -71,10 +71,12 @@ export default {
current: 0,
swiperCurrent: 0,
nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>',
pointslogList: []
pointslogList: [],
memberInfo: {}
}
},
onShow() {
this.getMemberPointsStat();
this.getPointslogList();
},
methods: {
@@ -86,6 +88,13 @@ export default {
this.swiperCurrent = current;
this.current = current;
},
getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) {
this.memberInfo = res.data;
}
})
},
getPointslogList() {
this.$u.api.getPointslogList().then((res)=>{
if (res.errCode == 0) {

View File

@@ -1,5 +1,6 @@
<template>
<view class="store">
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
<u-swipe-action
v-for="(item, index) in list" :key="index"
:index='index'
@@ -26,21 +27,7 @@
export default {
data() {
return {
list: [
{
id: 1,
show: false
},
{
id: 2,
show: false
},
{
id: 3,
show: false,
}
],
btnWidth: 152,
list: [],
show: false,
options: [
{
@@ -52,7 +39,19 @@ export default {
]
}
},
mounted() {
this.getStoreFavoritesList();
},
methods: {
getStoreFavoritesList() {
this.$u.api.getStoreFavoritesList({
type: 2 // 固定值
}).then(res => {
if(res.errCode == 0) {
}
})
},
click(index) {
this.list.splice(index, 1);
this.$u.toast(`删除了第${index+1}个cell`);
@@ -70,6 +69,9 @@ export default {
</script>
<style lang="scss" scoped>
.store {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
padding-top: 1rpx;
.item {
padding: 30rpx;
display: flex;