Commit c687c692 authored by zhoucong's avatar zhoucong

Merge branch 'develop' of http://git.tbd.yanzuoguang.com/panyongping/uni-pdtravel into zhoucong

# Conflicts:
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/myVlog/myVlog.js.map
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/photoAlbum/photoAlbum.js.map
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/scenicList/scenicList.js.map
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/share/share.js.map
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/vlogIndex/vlogIndex.js.map
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/vlogList/vlogList.js.map
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/vlog/vlogface/vlogface.js.map
parents 30cfdad1 c54574d0
......@@ -2,10 +2,15 @@
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "local"
}
}
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
......@@ -7,8 +7,9 @@
export default {
onLaunch: function(options) {//初始化完成时触发(全局只触发一次
let path=options.path
let openid=uni.getStorageSync("openid")
if(!openid&&path.indexOf("pages/ourPayment/ourPayment")==-1){//扫码支付页面不需要在此登录
uni.setStorageSync("enterOptions",options)
let token=uni.getStorageSync("token")
if(!token&&path.indexOf("pages/ourPayment/ourPayment")==-1){//扫码支付页面不需要在此登录
setTimeout(()=>{//解决关联普通二维码扫码首次进入时一直显示登录中
uni.navigateTo({
url: "/pages/login/login"
......
......@@ -28,7 +28,7 @@
<view>
{{item.useStartDate}}-{{item.useEndDate}}
<text>
<text>¥</text>{{item.savedMoney.toFixed(2)}}
<text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text>
</view>
</label>
......@@ -50,8 +50,8 @@
</view>
<view>
{{item.couponRule}}
<text>
<text>¥</text>{{item.savedMoney.toFixed(2)}}
<text v-if="item.savedMoney">
<text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text>
</view>
......
......@@ -31,7 +31,7 @@
"path" : "pages/login/login",
"style" :
{
"navigationBarTitleText": "登录中",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
......@@ -126,6 +126,33 @@
}
}
,{
"path" : "pages/combination/combiChoose/combiChoose",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/my/order/electronicTicket/electronicTicket",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/combination/distributionCombiChoose/distributionCombiChoose",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/vlog/vlogIndex/vlogIndex",
"style" : {
......
<template>
<view>
<!--#ifdef MP-WEIXIN -->
<web-view :src="outUrl"></web-view>
<!--#endif-->
</view>
</template>
......@@ -31,12 +28,16 @@
let groupId=this.getUrlKey("groupId")
let groupChannelId=this.getUrlKey("groupChannelId")
let pageType=this.getUrlKey("pageType")
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
if(pageType==1){//组合
this.outUrl="https://wx.pangdly.com/#/combiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
this.outUrl="https://wx.pangdly.com/#/combiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
}else{//分销
uni.navigateTo({
url:"../distributionCombiChoose/distributionCombiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
url:"../distributionCombiChoose/distributionCombiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid
})
}
}else{//小程序页面跳转进入
......@@ -47,12 +48,14 @@
let groupChannelId=option.groupChannelId
let thirdOpenid=option.thirdOpenid//第三方openid
let touristType=option.touristType//游客类型
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid
let baseUrl="https://wx.pangdly.com/#/combiChoose?pdOpenid="+pdOpenid
this.outUrl=baseUrl+"&thirdOpenid="+thirdOpenid+"&touristType="+touristType+"&channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
let baseUrl="https://wx.pangdly.com/#/combiChoose?thirdOpenid="+thirdOpenid+"&touristType="+touristType
this.outUrl=baseUrl+"&channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
}
},
methods: {
getUrlKey(name){//---------------------------------------------------------------获取url
......
<template>
<view>
<!--#ifdef MP-WEIXIN -->
<web-view :src="outUrl"></web-view>
<!--#endif-->
</view>
</template>
......@@ -30,12 +28,16 @@
let groupId=this.getUrlKey("groupId")
let groupChannelId=this.getUrlKey("groupChannelId")
let pageType=this.getUrlKey("pageType")
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
if(pageType==1){//组合
uni.navigateTo({
url:"../combiChoose/combiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
url:"../combiChoose/combiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid
})
}else{//分销
this.outUrl="https://wx.pangdly.com/#/distributionCombiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
this.outUrl="https://wx.pangdly.com/#/distributionCombiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
}
}else{//小程序页面跳转进入
......@@ -44,7 +46,14 @@
let merchantId=option.merchantId
let groupId=option.groupId
let groupChannelId=option.groupChannelId
this.outUrl="https://wx.pangdly.com/#/distributionCombiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
let thirdOpenid=option.thirdOpenid//第三方openid
let touristType=option.touristType//游客类型
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
let baseUrl="https://wx.pangdly.com/#/distributionCombiChoose?thirdOpenid="+thirdOpenid+"&touristType="+touristType
this.outUrl=baseUrl+"&channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
}
},
......
......@@ -35,21 +35,57 @@
}
_this.$request('wechat/wx/getUserInfoByCode',data).then(res => {
if(res.code=='00'){
console.log(res);
let openid=res.data.openid
uni.setStorageSync('openid',openid)
uni.navigateBack({
delta:1
let userId=res.data.userId||""
let datas={openid,source,userId}
_this.$request("wechatUser/login/findWxUserAndLogin",datas).then((res)=>{//通过openid获取token
if(res.code=="00"){
let token=res.data.token||""
uni.setStorageSync('token',token)
let createUserId=res.data.personId||""
uni.setStorageSync('createUserId',createUserId)
let userId=res.data.userId||""
uni.setStorageSync('userId',userId)
let enterOptions=uni.getStorageSync("enterOptions")
let queryTotal=""
for(let key in enterOptions.query){
queryTotal+="&"+key+"="+enterOptions.query[key]
}
queryTotal=queryTotal.substr(1)
if(token){
uni.redirectTo({
url:"/"+enterOptions.path+"?"+queryTotal
})
// uni.navigateBack({
// delta:1
// })
}
}else{
uni.showToast({
title:res.message,
icon:"none"
})
}
}).catch((err)=>{
uni.showToast({
title:"登录失败",
icon:"none"
})
})
}else{
uni.removeStorageSync('openid')
// uni.removeStorageSync('openid')
uni.showToast({
title:res.message,
icon:"none"
})
}
}).catch((err)=>{
uni.removeStorageSync('openid')
// uni.removeStorageSync('openid')
uni.showToast({
title:"登录失败",
icon:"none"
})
})
}
}
......
<template>
<view>
<!--#ifdef MP-WEIXIN -->
<web-view :src="outUrl"></web-view>
<!--#endif-->
</view>
</template>
......@@ -14,7 +12,11 @@
}
},
onLoad(option) {
this.outUrl="https://wx.pangdly.com/#/unusedDetail?id="+option.orderId
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
this.outUrl="https://wx.pangdly.com/#/unusedDetail?id="+option.orderId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
},
methods: {
......
......@@ -137,6 +137,11 @@
this.paySign=res.data.sign
//支付参数结束
this.pdOrderMoney = res.data.pdOrderMoney
if(this.pdOrderMoney==0&&res.data.subOrderType == -1){//0元购直接跳电子门票页面
uni.navigateTo({
url:"../my/order/electronicTicket/electronicTicket?orderId="+this.orderId
})
}
this.errorMessage = res.data.errorMessage
this.totalMoney = res.data.totalMoney
this.orderList = res.data.orderList
......
This diff is collapsed.
......@@ -12,7 +12,11 @@
}
},
onLoad(option) {
this.outUrl="https://wx.pangdly.com/#/paySuccess?orderId="+option.orderId
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
this.outUrl="https://wx.pangdly.com/#/paySuccess?orderId="+option.orderId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
},
methods: {
......
项目介绍文件
一、本地存储数据
1.uni.getStorageSync("openid")
2.uni.getStorageSync("alipayQrCode")
1.uni.getStorageSync("openid") //openid
2.uni.getStorageSync("token") //token
3.uni.getStorageSync("createUserId") //当前用户的id
4.uni.getStorageSync("userId") //平台id
5.uni.getStorageSync("alipayQrCode") //支付宝参数码
6.uni.getStorageSync("enterOptions") //进入项目参数
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment