123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <template>
- <view>
- <product ref="product" :index="index" :item="fetch.product" :control="control" :bottom="bottom" v-if="fetch.product.goods_id"></product>
- </view>
- </template>
- <script>
- import product from "@/pages/dream/view/product.vue";
- export default{
- data() {
- return {
- id : '',
- table : '',
- code : '',
- index : -1,
- bottom : {},
- control : {},
- fetch : {
- product: {},
- }
- }
- },
- onLoad(option) {
- this.id = option.id;
- this.table = option.table;
- this.code = option.code;
- this.getData();
- },
- // 重新加载
- onPullDownRefresh: function() {
- this.getData();
- },
- onReachBottom : function() {
- this.$refs.product.getData(2);
- },
- methods:{
- getData: function(id, table) {
- this.Dever.get(this, 'app/collection/?l=api.getProductOne', {code:this.code, product_id:this.id, table:this.table});
- },
- },
- components:{
- product
- }
- }
- </script>
- <style>
- </style>
|