Commit 60755f0c by zhangzhen

细节优化

parent ae7d46f5
......@@ -66,10 +66,11 @@
<script>
import {dictList} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js"
import indexConfig from "@/config/index.config";
import FixedHeader from "@/components/fixedHeader/index";
import {getCouponList} from "@/api/coupon"
import {getDictItem} from "@/utils/tools.js"
export default {
data() {
......
......@@ -25,11 +25,11 @@
<text class="text-black">可用时段:</text>
<text class="text-black">{{item.couponTimeStart}}-{{item.couponTimeEnd}}</text>
</view>
<text>{{item.platformType==2?'美团核销':''}}</text>
<text>{{platformEnum[item.platformType]}}</text>
</view>
<view v-else class="des margin-top">
<text class="">全天通用</text>
<text>{{item.platformType==2?'美团核销':''}}</text>
<text>{{platformEnum[item.platformType]}}</text>
</view>
</view>
......@@ -62,12 +62,12 @@
</template>
<script>
import {dictList} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js"
import config from "@/config/index.config"
import indexConfig from "@/config/index.config";
import FixedHeader from "@/components/fixedHeader/index";
import {
getUseCoupon
} from "@/api/coupon"
import {getUseCoupon} from "@/api/coupon"
export default {
data() {
......@@ -90,13 +90,15 @@
tipText: "",
show: false,
eventChannel: null,
selectId: ''
selectId: '',
platformEnum:{}
};
},
components: {
'fixed-header': FixedHeader
},
onLoad() {
this.onGetDicts();
this.eventChannel = this.getOpenerEventChannel();
// eventChannel.emit('acceptDataFromOpenedPage', {data: 'data from test page'});
......@@ -106,6 +108,24 @@
})
},
methods: {
onGetDicts() {
let dicts = []
let dictStr = uni.getStorageSync('dicts')
if (dictStr) {
let dicts = JSON.parse(dictStr)
this.platformEnum = getDictItem(dicts, "consumer_coupon_platform_type");
this.couponSourceEnum = getDictItem(dicts, "consumer_coupon_source_type");
this.$forceUpdate()
}
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.platformEnum = getDictItem(dicts, "consumer_coupon_platform_type");
this.couponSourceEnum = getDictItem(dicts, "consumer_coupon_source_type");
this.$forceUpdate()
})
},
onLoading(d) {
getUseCoupon(d).then(res => {
if (res.statusCode == 200) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment