npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

swan-tripgui

v1.2.3

Published

A Vue.js swanui

Downloads

31

Readme

swan-tripgui

A Vue.js project 存放tripg 应用的vue组件

重要 以下内容来修改_debugging 用以判断组件接口是否走沙箱模式

在自己项目的$ajax里 修改

	const assetsSubDirectory = process.env.NODE_ENV === 'production'
	export const signKey = {
		_sign: '1523237670977',
		_key: '285e3bb3df2e43d9b5745e44f7871868',
		_debugging: assetsSubDirectory ? 0 : 1
	}

在项目main.js中引入

	import {signKey} from './commons/$ajax.js'
	window.ajaxDebug = signKey._debugging

发票组件

注: 各个项目引入后 全局css样式表中mint-ui.css中修改mint-toast层级
	.mint-toast{
	  z-index: 99999 !important;
	} 
其他样式冲突==>自行调试 

依赖安装后 在main.js中 添加

import invoices from 'swan-tripgui'
Vue.use(invoices)

##申请单组件相关start <applicationBind :tabIndx_='tabIndex' :showTx='showTx' :postObj='postObj' :travelObj='travelObj' @bingBtn='bingBtn'>

//申请单参数
  tabIndex:1,//0 我的申请单 1同行人申请单
  showTx:1, // 0 不需要展示同行人 1展示同行人
  postObj : {
    product_id:2, //产品线ID 1机票 2火车 4酒店 5用车
    city:[{startDate: "2019-08-27", endDate: "2019-08-28", endCity: "上海", startCity: "北京"}],//火车最好加上站点代码 startStation endStation
    company_id:919, //公司id
    usrJson:['JMDJ526'], //改签时传多个人
    type:'inner_book', //类型 inner_change 改签 inner_book 预定 getPeersPerson 获取同行人
    travel_no:'',//改签时传申请单号 13232,2324 多人以','分割
  },
  travelObj:[
    {
      user_id:527005, //用户id
      tequan_status:'N', //是否是特权
      travel_id:"1017584-1" //申请单号
    },
    {
      user_id:526994,
      tequan_status:'Y',
      travel_id:""
    },
  ]
//申请单参数end

//获取申请单事件
 bingBtn(val){
  console.log('val 关联申请单 :', val);
},
//获取申请单事件end

##申请单组件相关end

####在需要引入发票组件的页面加入

发票内容展示页面

<invoicesSup
    :invoicesObj.sync = "invoicesObj"
    :checkinvoicesIndex.sync = "checkinvoicesIndex"
    :checkinvoicesflag.sync = 'checkinvoicesflag'
    :ajaxObj = "ajaxObj"
    :travelType='isYg'
  ></invoicesSup>
  

发票弹框展示页面
 <invmask 
  ref="inmask"
  :invoicesObj.sync = "invoicesObj"
  :checkinvoicesIndex.sync = "checkinvoicesIndex"
  :checkinvoicesflag.sync = 'checkinvoicesflag'
  :ajaxObj = "ajaxObj"
  ></invmask>
  
  
data里加入
  userInfo:{},//开局发票人员信息(登陆信息)
  ajaxObj:null, //发票请求ajax参数
  invoicesObj:{},//发票信息
  checkinvoicesIndex:null,//点击发票内容组件的项
  checkinvoicesflag:null, 
  isYg:null,  //true or false 因公因私 传Boolean类型


created() {
    this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
    this.ajaxObj = {
      	userInfo: this.userInfo,
      	product_id: '11', //产品线id 机票11 酒店12 租车13 火车票14 国际机票28 具体与产品线一致
    }
  },

###详情页跳补开发票页面时补充ajaxObj添加发票所需发票信息 allinvoiceInfo 及 mainOrderCode

let allinvoiceInfo = []; //所有发票信息
["订单号"].forEach(v => {
  //下面是机票线的,其它线修改一下。
  v.businessinfo = {
    product_id: v.product_id, //产品线ID
    order_no: v.tradeCode, //订单号
    ...this.paramsObj[0], //其它航班信息等
    money: v.pay_money //价格
  };
  this.allinvoiceInfo.push(v);
});
//综合订单号。
let mainOrderCode = order_info.Result.mainOrderCode;

this.ajaxObj.allinvoiceInfo = allinvoiceInfo;
this.ajaxObj.mainOrderCode = mainOrderCode;

	

收银台组件

注: 如果收银台页面左上角返回按钮不显示,请在当前页调整样式问题 其他样式冲突==>自行调试

依赖安装后 在main.js中 添加 import payment from 'swan-tripgui' Vue.use(payment)

在index.html页面中引入支付包 if(window.Vue){ document.write('</script>'); }else{ document.write('</script>'); }

####在需要引入支付组件的页面加入 <payment :payParams="payParams" :payUserInfo='payUserInfo' :payOrderStatus="payOrderStatus"
@cancelOrder="cancelOrderBtn"
@successOrder="successOrder">

data里加入支付组件所需
	payUserInfo:{},   //个人信息字符串
	payParams:{
		orderid: "",   //订单号
		callBackUrls: encodeURI(window.location.href),   //回调地址
		travelType:1,  //因公因私  1因公  2因私
		testPay:false,  //测试环境  true or false
		payId:'14',   //产品线id 机票11 酒店12 租车13 火车票14 国际机票28 具体与产品线一致
		exceed:false   //酒店超标支付
	},
	payOrderStatus:'20190524093020',   //20190524093020 保险订单创建时间

methods:{
	cancelOrderBtn(item){
  console.log('取消订单返回事件');
  console.log(item,'this.overtimePicker');
  // this.$router.back();
},
successOrderBtn(item){
  console.log('支付成功返回事件');
},
	}