commonDeclare.js 782 Bytes
Newer Older
潘际乾 committed
1 2
export default {
    data() {
fukai committed
3
        return {
潘际乾 committed
4 5
            version: "1.0",
            trnName: "",
fukai committed
6 7
        }
    },
潘际乾 committed
8 9
    computed: {
        declareParams() {
fukai committed
10
            return {
潘际乾 committed
11
                version: this.version,
潘际乾 committed
12
                // 交易名
潘际乾 committed
13
                trnName: this.root ? this.root.trnName : this.trnName,
潘际乾 committed
14 15
                // 交易类型(进口、出口、买方、卖方等,为模块划分做准备)
                trnType: this.getTrnType()
fukai committed
16
            }
潘际乾 committed
17 18 19 20 21 22 23 24 25
        },
        requestPrefix() {
            return `/${this.declareParams.trnType}/${this.declareParams.trnName}`
        }
    },
    methods: {
        getTrnType() {
            const type = this.root ? this.root.trnType : this.trnType
            return type ? type : 'business'
fukai committed
26 27 28
        }
    }
}