【前端】纸掌柜h5端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.3 KiB

<template>
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="测试"></uni-nav-bar>
<view @click="getList">list</view>
<view @click="getDetail">detail</view>
<view @click="purchase">purchase</view>
</view>
</template>
<script>
import { go2, back } from '@/utils/hook.js'
import { getPaperList, getPaperDetail, purchasePaper } from '@/apis/testApi.js'
export default {
data() {
return {}
},
methods: {
go2,
back,
// 获取纸品列表
getList() {
getPaperList({ supplierId: this.$store.state.supplierId }).then((res) => {
console.log(res)
})
},
getDetail() {
getPaperDetail({ productId: '678972506887032832' })
},
purchase() {
let form = {
orderGoodsList: [
{
buyTon: 1,
gramWeight: 200,
length: 1000,
mallSupplierId: '677166944742412288',
pieceQuantity: 5000,
productId: '678972506887032832',
productSkuId: '678972507222577152',
unitPrice: 10000,
width: 1000
}
],
otherFee: 0,
purchaserEnterpriseId: '807704'
}
purchasePaper(form).then((res) => {
console.log(res)
})
}
}
}
</script>
<style lang="scss" scoped></style>