| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view class="pages">
- <!-- 这是我的发票页面 -->
- <u-empty mode="data" text="还没有发票哟">
- </u-empty>
- <div class="bottom-btn">
- <div @click="handleToAddBill">添加发票</div>
- <div @click="getBill">
- 读取微信发票信息
- </div>
- </div>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- }
- },
- methods: {
- getBill(){
- uni.chooseInvoiceTitle({
- success: function (res) {
- console.log(res);
- },
- fail: function (err) {
- console.log(err);
- },
- complete: function (res) {
- console.log(res);
- }
- });
- },
- handleToAddBill(){
- uni.navigateTo({
- url:'/components/bill/addBill',
- success:(res)=>{
- console.log('成功',res);
- },
- fail:(err)=>{
- console.log('失败',err);
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .pages {
- width: 100%;
- height: 100vh;
- background: #f5f5f5;
- }
- .bottom-btn{
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 70px;
- background: #fff;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 10px;
- div:nth-child(1){
- flex: 1;
- text-align: center;
- }
- div:nth-child(2){
- flex: 1;
- text-align: center;
- }
- }
- </style>
|