Commit 37032289 authored by 潘永坪's avatar 潘永坪

首页和个人中心开发

parent 237982a9
......@@ -21,13 +21,13 @@ export default {
let path = options.path
uni.setStorageSync('enterOptions', options)
let token = uni.getStorageSync('token')||''
if (!token && path.indexOf('pages/payment/ourPayment/ourPayment') == -1) { //扫码支付页面不需要在此登录
setTimeout(() => { //解决关联普通二维码扫码首次进入时一直显示登录中
uni.navigateTo({
url: '/pages/login/login'
})
}, 300)
}
// if (!token && path.indexOf('pages/payment/ourPayment/ourPayment') == -1) { //扫码支付页面不需要在此登录
// setTimeout(() => { //解决关联普通二维码扫码首次进入时一直显示登录中
// uni.navigateTo({
// url: '/pages/login/login'
// })
// }, 300)
// }
//#ifdef MP-WEIXIN
uni.setStorageSync('appid', 'wxe678d5240e98a7b8')
//#endif
......
......@@ -130,7 +130,7 @@
{
"path" : "pages/scenic/scenicProduct/scenicProduct",
"style" : {
"navigationBarTitleText" : "",
"navigationBarTitleText" : "产品",
"enablePullDownRefresh" : false
}
},
......@@ -144,7 +144,7 @@
{
"path" : "pages/my/order/applyAfterSales/applyAfterSales",
"style" : {
"navigationBarTitleText" : "",
"navigationBarTitleText" : "售后",
"enablePullDownRefresh" : false
}
},
......@@ -197,6 +197,78 @@
}
,{
"path" : "pages/hotel/hotelIndex/hotelIndex",
"style" :
{
"navigationBarTitleText": "酒店",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/specialProduct/specialIndex/specialIndex",
"style" :
{
"navigationBarTitleText": "特产",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/scenic/scenicIndex/scenicIndex",
"style" :
{
"navigationBarTitleText": "景区",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/my/center/center",
"style" :
{
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/my/shopCart/shopCart",
"style" :
{
"navigationBarTitleText": "购物车",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/my/commonInfo/commonInfo",
"style" :
{
"navigationBarTitleText": "常用信息",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/my/passCode/codeResult/codeResult",
"style" :
{
"navigationBarTitleText": "通行码",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/my/customerService/enterpriseWechat/enterpriseWechat",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
//分包加载配置,此配置为小程序的分包加载机制。
"subPackages": [
......@@ -408,6 +480,27 @@
"navigationBarBackgroundColor" : "#192033",
"backgroundColor" : "#F8F8F8"
},
// 配置tabbar导航栏
"tabBar": {
"color": "#7A7E83", //字体颜色
"selectedColor": "#007AFF", //选中时字体颜色
"borderStyle": "black", //底部的上边框线条
"backgroundColor": "#F8F8F8", //底部背景色
"fontSize": "18px", //字体大小
"spacing": "10px", //字体到图标的距离
"iconWidth": "16px",
"list": [{
"pagePath": "pages/indexs/index/index",
"iconPath": "static/img/index/home.png",
"selectedIconPath":"static/img/index/homeChoose.png",
"text": "首页"
}, {
"pagePath": "pages/my/center/center",
"iconPath": "static/img/index/my.png",
"selectedIconPath":"static/img/index/myChoose.png",
"text": "我的"
}]
},
"condition" : {
//模式配置,仅开发期间生效
"current" : 0, //当前激活的模式(list 的索引项)
......
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
}
},
onLoad(option) {
let companyId=option.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/#/hotelIndex?companyId='
this.outUrl=baseUrl+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
},
methods: {
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view >
<!-- <view class="top">
<view class="top-search">
</view>
<view class="top-content">
<view>
<navigator url="../scenic/scenic">
<image src="../../static/img/index/classify1.png"></image>
<view>景区门票</view>
</navigator>
</view>
<view>
<navigator url="../hotel/hotel">
<image src="../../static/img/index/classify2.png"></image>
<view>酒店民宿</view>
</navigator>
</view>
<view>
<navigator url="../restaurant/restaurant">
<image src="../../static/img/index/classify3.png"></image>
<view>特色美食</view>
</navigator>
</view>
<view>
<navigator url="../nearby/nearby">
<image src="../../static/img/index/classify4.png"></image>
<view>周边游</view>
</navigator>
</view>
<view>
<navigator url="../travelOne/travelOne">
<image src="../../static/img/index/classify5.png"></image>
<view>跟团游</view>
</navigator>
</view>
<view>
<navigator url="../travelTwo/travelTwo">
<image src="../../static/img/index/classify6.png"></image>
<view>亲子游</view>
</navigator>
</view>
<view>
<navigator url="../dingzhi/dingzhi">
<image src="../../static/img/index/classify7.png"></image>
<view>行程订制</view>
</navigator>
</view>
<view>
<navigator url="../special/special">
<image src="../../static/img/index/classify8.png"></image>
<view>特产好礼</view>
</navigator>
</view>
</view>
<view class="top-img">
</view>
</view> -->
<!-- <text @click="getUserInfo()"> 授权获取头像昵称 </text> -->
<view class="bottom">
<web-view :src="outUrl"></web-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
companyId:'',//公司Id
}
},
onLoad(option){
this.companyId=option.companyId||''
if(!this.companyId){
this.getCompanyId()
}else{
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/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}
},
methods: {
getUserInfo() { // 获取用户信息
uni.getUserProfile({
lang:'zh_CN',
desc:'登录',
success:(res)=>{
console.log(res)
},
fail:(res)=>{
}
})
},
getCompanyId(){//获取公司Id
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId')
let data={
openid:pdOpenid
}
this.$request('wechatUser/wxUser/getLastRecord',data).then((res) => {
if (res.code == '00'){
this.companyId=res.data.companyId||''
this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}else{
this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}
}).catch(()=>{
this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
})
}
}
}
</script>
<style>
.top{padding: 0 24rpx;}
.top-content{display: flex;flex-wrap: wrap;background: #FFFFFF;border-radius:24rpx;padding-bottom:32rpx;}
.top-content>view{width: 25%;text-align: center;margin-top:40rpx;}
.top-content view image{width:64rpx;height:64rpx;}
</style>
This diff is collapsed.
<template>
<view>
<view class="head">
<image src="@/static/img/common/pangdingLogo.png">
</image>
<text>尊敬的胖丁用户</text>
</view>
<view class="middle">
<view class="middle1">
<view class="middle1-list">
<view>
0
</view>
<view>
收藏
</view>
</view>
<view class="middle1-list">
<view>
0
</view>
<view>
券中心
</view>
</view>
<view class="middle1-list">
<view>
0
</view>
<view>
钱包
</view>
</view>
<view class="middle1-list">
<view>
0
</view>
<view>
积分
</view>
</view>
</view>
<view class="middle2" @click="goOrderlist()">
<view class="middle2-top">
<view>
我的订单
</view>
<view style="font-size: 24rpx;color: #999999;">
全部订单
<u-icon name='arrow-right'></u-icon>
</view>
</view>
<view class="middle2-bottom">
<view class="middle2-list">
<view>
<image src="@/static/img/my/center/pay.png"></image>
</view>
<view>
待付款
</view>
</view>
<view class="middle2-list">
<view>
<image src="@/static/img/my/center/play.png"></image>
</view>
<view>
待使用
</view>
</view>
<view class="middle2-list">
<view>
<image src="@/static/img/my/center/evaluate.png"></image>
</view>
<view>
评价
</view>
</view>
<view class="middle2-list">
<view>
<image src="@/static/img/my/center/refund.png"></image>
</view>
<view>
退款/售后
</view>
</view>
</view>
</view>
<view class="middle3">
<view class="middle3-top">
其他工具
</view>
<view class="middle3-bottom">
<view class="middle3-list" @click="goCommoninfo()">
<view>
<image src="@/static/img/my/center/info.png"></image>
</view>
<view>
常用信息
</view>
</view>
<view class="middle3-list" @click="goMyServe()">
<view>
<image src="@/static/img/my/center/customer.png"></image>
</view>
<view>
我的客服
</view>
</view>
<view class="middle3-list" @click="goCodeResult()" >
<view>
<image src="@/static/img/my/center/code.png"></image>
</view>
<view>
通行码
</view>
</view>
<view class="middle3-list" @click="goMyPhoto()">
<view>
<image src="@/static/img/my/center/album.png"></image>
</view>
<view>
我的影集
</view>
</view>
<view class="middle3-list" @click="goshopping()">
<view>
<image src="@/static/img/my/center/shopping.png"></image>
</view>
<view>
购物车
</view>
</view>
<view class="middle3-list">
<view>
<image src="@/static/img/my/center/schedule.png"></image>
</view>
<view>
行程单
</view>
</view>
<view class="middle3-list">
<view>
<image src="@/static/img/my/center/mark.png"></image>
</view>
<view>
我的行记
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
//---跳转到订单列表
goOrderlist(){
uni.navigateTo({
url:'/pages/my/order/orderList/orderList'
})
},
//---跳转购物车
goshopping(){
uni.navigateTo({
url:'/pages/my/shopCart/shopCart'
})
},
//---跳转常用信息
goCommoninfo(){
uni.navigateTo({
url:'/pages/my/commonInfo/commonInfo'
})
},
//---跳转通行码
goCodeResult(){
uni.navigateTo({
url:'/pages/my/passCode/codeResult/codeResult'
})
},
//---跳转我的影集
goMyPhoto(){
uni.navigateTo({
url:'/pages/album/purchasedPhotoAlbum/purchasedPhotoAlbum'
})
},
//---跳转我的客服
goMyServe(){
uni.navigateTo({
url:'/pages/my/customerService/enterpriseWechat/enterpriseWechat'
})
},
}
}
</script>
<style lang="scss" scoped>
.head{
padding: 0 24rpx;
display: flex;
align-items: center;
color: #ffffff;
height: 300rpx;
background: linear-gradient(76deg, #1877FF 0%, #3C99F9 100%);
image{
width: 144rpx;
height: 144rpx;
margin-right:20rpx;
}
}
.middle{
position: relative;
top: -60rpx;
padding: 0 24rpx;
}
.middle1{
display: flex;
background: #FFFFFF;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
border-radius:12rpx;
padding:40rpx;
justify-content: space-between;
}
.middle1-list{
text-align: center;
view:first-child{
font-size: 40rpx;
font-weight: bold;
}
view:nth-child(2){
margin-top: 10rpx;
}
}
.middle2,.middle3{
background: #ffffff;
margin-top: 20rpx;
border-radius: 12rpx;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
}
.middle2-top,.middle3-top{
height: 100rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ececec;
padding: 0 24rpx;
font-weight: bold;
}
.middle2-bottom{
display: flex;
justify-content: space-between;
padding: 24rpx 0;
}
.middle2-list{
text-align: center;
width: 25%;
image{
width: 64rpx;
height: 64rpx;
}
}
.middle3-bottom{
display: flex;
padding: 24rpx 0;
flex-wrap: wrap;
}
.middle3-list{
text-align: center;
width: 25%;
margin: 20rpx 0;
image{
width:80rpx;
height:80rpx;
}
}
</style>
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
}
},
onLoad(option) {
let companyId=option.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/#/commonInfo?companyId='
this.outUrl=baseUrl+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
},
methods: {
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
}
},
onLoad(option) {
let companyId=option.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/#/enterpriseWechat?companyId='
this.outUrl=baseUrl+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
},
methods: {
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
}
},
onLoad(option) {
let companyId=option.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/#/codeResult?companyId='
this.outUrl=baseUrl+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
},
methods: {
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
}
},
onLoad(option) {
let companyId=option.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/#/shopCart?companyId='
this.outUrl=baseUrl+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
},
methods: {
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
}
},
onLoad(option) {
let companyId=option.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/#/scenicIndex?companyId='
this.outUrl=baseUrl+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId
},
methods: {
}
}
</script>
<style>
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
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