修改小程序与app的兼容文件

This commit is contained in:
gaoxs
2020-04-06 17:18:09 +08:00
parent c837a94363
commit 57ae931f2d
31 changed files with 1257 additions and 1101 deletions

View File

@ -21,7 +21,7 @@
<view class="condition line1">{{ coupon.couponTitle }}</view>
<view class="data acea-row row-between-wrapper">
<view v-if="coupon.endTime === 0">不限时</view>
<view v-else><data-format-t :data="coupon.addTime"></data-format-t> - <data-format-t :data="coupon.endTime"></data-format-t></view>
<view v-else><data-format-t :date="coupon.addTime"></data-format-t> - <data-format-t :date="coupon.endTime"></data-format-t></view>
<view
class="iconfont icon-xuanzhong1 font-color-red"
v-if="checked === coupon.id"

View File

@ -6,18 +6,18 @@ import { dataFormat } from "@/utils";
export default {
name: "DataFormat",
props: ["data"],
props: ["date"],
data: function() {
return {
time: ""
};
},
mounted() {
this.time = dataFormat(this.data);
this.time = dataFormat(this.date);
},
watch: {
"$props.data"(props) {
this.time = dataFormat(this.data);
"$props.date"(props) {
this.time = dataFormat(this.date);
}
}
};

View File

@ -2,22 +2,22 @@
<text>{{time}}</text>
</template>
<script>
import { dataFormatT } from "@/utils";
import { dateFormatT } from "@/utils";
export default {
name: "DataFormatT",
props: ["data"],
props: ["date"],
data: function() {
return {
time: ""
};
},
mounted() {
this.time = dataFormatT(this.data);
this.time = dateFormatT(this.date);
},
watch: {
"$props.data"(props) {
this.time = dataFormatT(this.data);
"$props.date"(props) {
this.time = dateFormatT(this.date);
}
}
};