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 @@ ...@@ -2,10 +2,15 @@
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0", "version": "0.0",
"configurations": [{ "configurations": [{
"type": "uniCloud", "default" :
"default": { {
"launchtype": "local" "launchtype" : "local"
} },
} "mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
] ]
} }
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
export default { export default {
onLaunch: function(options) {//初始化完成时触发(全局只触发一次 onLaunch: function(options) {//初始化完成时触发(全局只触发一次
let path=options.path let path=options.path
let openid=uni.getStorageSync("openid") uni.setStorageSync("enterOptions",options)
if(!openid&&path.indexOf("pages/ourPayment/ourPayment")==-1){//扫码支付页面不需要在此登录 let token=uni.getStorageSync("token")
if(!token&&path.indexOf("pages/ourPayment/ourPayment")==-1){//扫码支付页面不需要在此登录
setTimeout(()=>{//解决关联普通二维码扫码首次进入时一直显示登录中 setTimeout(()=>{//解决关联普通二维码扫码首次进入时一直显示登录中
uni.navigateTo({ uni.navigateTo({
url: "/pages/login/login" url: "/pages/login/login"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<view> <view>
{{item.useStartDate}}-{{item.useEndDate}} {{item.useStartDate}}-{{item.useEndDate}}
<text> <text>
<text>¥</text>{{item.savedMoney.toFixed(2)}} <text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text> </text>
</view> </view>
</label> </label>
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
</view> </view>
<view> <view>
{{item.couponRule}} {{item.couponRule}}
<text> <text v-if="item.savedMoney">
<text>¥</text>{{item.savedMoney.toFixed(2)}} <text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text> </text>
</view> </view>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
"path" : "pages/login/login", "path" : "pages/login/login",
"style" : "style" :
{ {
"navigationBarTitleText": "登录中", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
...@@ -126,6 +126,33 @@ ...@@ -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", "path" : "pages/vlog/vlogIndex/vlogIndex",
"style" : { "style" : {
......
<template> <template>
<view> <view>
<!--#ifdef MP-WEIXIN -->
<web-view :src="outUrl"></web-view> <web-view :src="outUrl"></web-view>
<!--#endif-->
</view> </view>
</template> </template>
...@@ -31,12 +28,16 @@ ...@@ -31,12 +28,16 @@
let groupId=this.getUrlKey("groupId") let groupId=this.getUrlKey("groupId")
let groupChannelId=this.getUrlKey("groupChannelId") let groupChannelId=this.getUrlKey("groupChannelId")
let pageType=this.getUrlKey("pageType") 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){//组合 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{//分销 }else{//分销
uni.navigateTo({ 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{//小程序页面跳转进入 }else{//小程序页面跳转进入
...@@ -47,12 +48,14 @@ ...@@ -47,12 +48,14 @@
let groupChannelId=option.groupChannelId let groupChannelId=option.groupChannelId
let thirdOpenid=option.thirdOpenid//第三方openid let thirdOpenid=option.thirdOpenid//第三方openid
let touristType=option.touristType//游客类型 let touristType=option.touristType//游客类型
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let baseUrl="https://wx.pangdly.com/#/combiChoose?pdOpenid="+pdOpenid let pdToken=uni.getStorageSync("token")
this.outUrl=baseUrl+"&thirdOpenid="+thirdOpenid+"&touristType="+touristType+"&channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId 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: { methods: {
getUrlKey(name){//---------------------------------------------------------------获取url getUrlKey(name){//---------------------------------------------------------------获取url
......
<template> <template>
<view> <view>
<!--#ifdef MP-WEIXIN -->
<web-view :src="outUrl"></web-view> <web-view :src="outUrl"></web-view>
<!--#endif-->
</view> </view>
</template> </template>
...@@ -30,12 +28,16 @@ ...@@ -30,12 +28,16 @@
let groupId=this.getUrlKey("groupId") let groupId=this.getUrlKey("groupId")
let groupChannelId=this.getUrlKey("groupChannelId") let groupChannelId=this.getUrlKey("groupChannelId")
let pageType=this.getUrlKey("pageType") 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){//组合 if(pageType==1){//组合
uni.navigateTo({ 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{//分销 }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{//小程序页面跳转进入 }else{//小程序页面跳转进入
...@@ -44,7 +46,14 @@ ...@@ -44,7 +46,14 @@
let merchantId=option.merchantId let merchantId=option.merchantId
let groupId=option.groupId let groupId=option.groupId
let groupChannelId=option.groupChannelId 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 @@ ...@@ -35,21 +35,57 @@
} }
_this.$request('wechat/wx/getUserInfoByCode',data).then(res => { _this.$request('wechat/wx/getUserInfoByCode',data).then(res => {
if(res.code=='00'){ if(res.code=='00'){
console.log(res);
let openid=res.data.openid let openid=res.data.openid
uni.setStorageSync('openid',openid) uni.setStorageSync('openid',openid)
uni.navigateBack({ let userId=res.data.userId||""
delta:1 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{ }else{
uni.removeStorageSync('openid') // uni.removeStorageSync('openid')
uni.showToast({ uni.showToast({
title:res.message, title:res.message,
icon:"none" icon:"none"
}) })
} }
}).catch((err)=>{ }).catch((err)=>{
uni.removeStorageSync('openid') // uni.removeStorageSync('openid')
uni.showToast({
title:"登录失败",
icon:"none"
})
}) })
} }
} }
......
<template> <template>
<view> <view>
<!--#ifdef MP-WEIXIN -->
<web-view :src="outUrl"></web-view> <web-view :src="outUrl"></web-view>
<!--#endif-->
</view> </view>
</template> </template>
...@@ -14,7 +12,11 @@ ...@@ -14,7 +12,11 @@
} }
}, },
onLoad(option) { 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: { methods: {
......
...@@ -137,6 +137,11 @@ ...@@ -137,6 +137,11 @@
this.paySign=res.data.sign this.paySign=res.data.sign
//支付参数结束 //支付参数结束
this.pdOrderMoney = res.data.pdOrderMoney 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.errorMessage = res.data.errorMessage
this.totalMoney = res.data.totalMoney this.totalMoney = res.data.totalMoney
this.orderList = res.data.orderList this.orderList = res.data.orderList
......
This diff is collapsed.
...@@ -12,7 +12,11 @@ ...@@ -12,7 +12,11 @@
} }
}, },
onLoad(option) { 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: { methods: {
......
项目介绍文件 项目介绍文件
一、本地存储数据 一、本地存储数据
1.uni.getStorageSync("openid") 1.uni.getStorageSync("openid") //openid
2.uni.getStorageSync("alipayQrCode") 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