Commit 33eb8f34 authored by 黄奎's avatar 黄奎

新增直客登录

parent 9ba7ce44
This diff is collapsed.
......@@ -81,12 +81,6 @@
},
{
"root": "pages/live",
// "plugins": {
// "live-player-plugin": {
// "version": "1.3.0",
// "provider": "wx2b03c6e691cd7370"
// }
// },
"pages": [{
"path": "index"
}, {
......@@ -536,56 +530,66 @@
{
"root": "pages/jiuzhai",
"pages": [{
"path": "jz_Line" //九寨-线路
}, {
"path": "jz_LineDetail",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES"
"path": "jz_Line" //九寨-线路
}, {
"path": "jz_LineDetail",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES"
}
} //九寨-线路详情
}, {
"path": "jz_Reserve" //线路-预定
}, {
"path": "jz_MyOrder" //线路-我的订单
}, {
"path": "jz_SureOrder" //线路-确认订单
}, {
"path": "allorderList" //统一订单
}, {
"path": "allorderdetails" //统一订单详情
}, {
"path": "paysuccess" //支付成功页面
}, {
"path": "jz_Activity" //活动
}, {
"path": "jz_ActivityList" //活动列表
}, {
"path": "jz_ActiveInfo" //活动详情
}, {
"path": "jz_ActivePaySuccess" //活动下单成功
}, {
"path": "login",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "modify_password",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "bind_Customer",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "direct_Customer",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} //九寨-线路详情
}, {
"path": "jz_Reserve" //线路-预定
}, {
"path": "jz_MyOrder" //线路-我的订单
}, {
"path": "jz_SureOrder" //线路-确认订单
}, {
"path": "allorderList" //统一订单
}, {
"path": "allorderdetails" //统一订单详情
}, {
"path": "paysuccess" //支付成功页面
},{
"path":"jz_Activity" //活动
},{
"path":"jz_ActivityList" //活动列表
},{
"path":"jz_ActiveInfo" //活动详情
},{
"path":"jz_ActivePaySuccess" //活动下单成功
},{
"path" : "login",
"style" : {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "modify_password",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
]
},
//韩国馆项目
{
"root": "pages/kotra",
......@@ -736,35 +740,34 @@
// 机票
{
"root": "pages/airTicket",
"pages": [
{
"path": "airTicketList",//机票列表
"style":{
"pages": [{
"path": "airTicketList", //机票列表
"style": {
"navigationBarTitleText": "机票列表"
}
},
{
"path": "airTicketDetails",//机票下单
"style":{
"path": "airTicketDetails", //机票下单
"style": {
"navigationStyle": "custom"
}
},
{
"path": "AirplanePassengerList",//乘机人列表
"style":{
"path": "AirplanePassengerList", //乘机人列表
"style": {
"navigationBarTitleText": "乘机人列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "AirplanePassengerAddEditing"//添加编辑乘机人
"path": "AirplanePassengerAddEditing" //添加编辑乘机人
},
{
"path": "TicketOrderList",//机票订单列表
"path": "TicketOrderList", //机票订单列表
"navigationBarTitleText": "订单列表"
},
{
"path": "TicketOrderDetails",//机票订单详情
"path": "TicketOrderDetails", //机票订单详情
"navigationBarTitleText": "订单详情",
"style": {
"navigationStyle": "custom"
......@@ -790,4 +793,4 @@
}
}
}
\ No newline at end of file
}
......@@ -555,7 +555,7 @@ export default {
nickName: "未登录",
avatarUrl: "",
};
//that.showAuth = true;
that.showAuth = true;
} else {
that.sharejump(); //4-9新加
}
......
<template>
<!--同行绑定-->
<view class="login-page">
<view class="logo-head">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695262844000_280.png" mode="widthFix"></image>
<view class="logo-text">旅小友</view>
</view>
<view class="login-form">
<view class="login-title">绑定同行</view>
<view class="login-item">
<input type="text" v-model="msg.account" placeholder="请输入你的同业账号" :class="{'focus':currentFocus=='account'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('account')">
</view>
<view class="login-item">
<input type="password" v-model="msg.password" placeholder="请输入你的登录密码" :class="{'focus':currentFocus=='pwd'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('pwd')">
</view>
<view class="login-item">
<view @click="loginByAccount" class="login-btn" :class="{'disable':msg.account==''||msg.password==''}">绑定</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
msg: {
account: '',
password: '',
OpenId: ''
},
currentFocus: '',
loginLoading: false
}
},
mounted() {
this.getUserProfileHandler()
},
methods: {
changeCurrentFocus(val) {
this.currentFocus = val
},
loginByAccount() {
if (this.msg.account != '' && this.msg.password != '') {
this.loginErpHandler()
}
},
loginByOpenId() {
if (this.msg.OpenId != '') {
this.loginErpHandler(1)
} else {
uni.showToast({
icon: 'none',
title: '获取微信信息失败,请使用账号密码登录'
})
}
},
loginErpHandler(t = 0) {
if (this.loginLoading) return;
this.loginLoading = true
uni.showLoading({
title: '绑定中...'
})
let param = JSON.parse(JSON.stringify(this.msg))
if (t != 0) {
param.account = ''
param.password = ''
}
this.apipost("b2b_post_LvXiaoYouBindCustomer", param, (res) => {
if (res.resultCode == 1) {
//移除缓存=>跳转到首页重新登录
uni.removeStorageSync('b2b_user')
uni.removeStorageSync('mall_UserInfo')
uni.redirectTo({
url: '/pages/index/index'
})
} else {
this.loginLoading = false
uni.hideLoading()
}
}, (failed) => {
this.loginLoading = false;
uni.showToast({
title: failed.message,
icon: "none",
});
}, (error) => {
this.loginLoading = false;
uni.hideLoading()
})
},
getUserProfileHandler() {
wx.login({
success: (res) => {
this.getCode(res)
},
fail() {}
})
},
getCode(obj) {
var that = this;
that.request2({
url: "/api/mall/GetWeChatOpenId",
data: {
Code: obj.code,
},
},
(res) => {
if (res.resultCode == 1) {
this.msg.OpenId = res.data;
}
}
);
},
}
}
</script>
<style>
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
.login-page {
padding: 20px;
}
.login-page .logo-head {
margin-top: 20px;
display: flex;
align-items: center;
}
.login-page .logo-head image {
width: 50px;
height: 50px;
margin-right: 10px;
}
.login-page .logo-head .logo-text {
font-size: 32px;
font-family: logo-font;
font-weight: 700;
}
.login-page .login-form {
margin-top: 50px;
padding: 20px;
}
.login-page .login-form .login-title {
font-size: 20px;
font-weight: 700;
font-family: logo-font;
margin-bottom: 30px;
}
.login-page .login-form .login-item {
margin-top: 30px;
}
.login-page .login-form .login-item input {
background-color: rgba(0, 0, 0, .05);
padding: 0 12px;
height: 46px;
line-height: 46px;
border-radius: 8px;
color: #1d1d1d;
font-family: nav-font;
}
.login-page .login-form .login-item input.focus {
background: #1d1d1d;
color: #FFF;
}
.login-page .login-form .login-btn {
height: 80rpx;
background-color: #111111;
text-align: center;
line-height: 80rpx;
color: #fff;
/* font-weight: 600; */
font-size: 28rpx;
border-radius: 16rpx;
font-family: logo-font;
font-size: 16px;
}
.login-page .login-form .login-btn.disable {
/* background-color: #ecf1f4;
color: #111; */
opacity: 0.5;
}
.login-page .login-form .wechat-login {
background-color: none;
height: 40px;
width: 40px;
/* border-radius: 40px; */
overflow: hidden;
/* box-shadow: 0px 0px 20px 0px rgba(76,87,125,0.2)!important; */
padding: 0;
}
.login-page .login-form .wechat-login image {
width: 38px;
height: 38px;
margin: 1px;
}
.login-page .login-form .wechat-login::after {
border: none !important;
height: auto !important;
}
</style>
<template>
<!--直客修改用户基础信息-->
<view class="login-page">
<view class="logo-head">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695262844000_280.png" mode="widthFix"></image>
<view class="logo-text">旅小友</view>
</view>
<view class="login-form">
<view class="login-title">基础资料</view>
<view class="login-item">
<input type="text" v-model="msg.Name" placeholder="请输入姓名" :class="{'focus':currentFocus=='Name'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('Name')">
</view>
<view class="login-item">
<input type="text" v-model="msg.Moblie" placeholder="请输入手机号码" :class="{'focus':currentFocus=='Moblie'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('Moblie')">
</view>
<view class="login-item">
<view @click="updateDirectUserInfo" class="login-btn" :class="{'disable':msg.Name==''||msg.Moblie==''}">修改</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
msg: {
Name: '',
Moblie: '',
OpenId: ''
},
currentFocus: '',
loginLoading: false
}
},
mounted() {
var b2b_user = uni.getStorageSync('b2b_user');
if (b2b_user) {
if (b2b_user.name) {
this.msg.Name = b2b_user.name;
}
if (b2b_user.contactNumber) {
console.log("22");
this.msg.Moblie = b2b_user.contactNumber;
}
}
},
methods: {
changeCurrentFocus(val) {
this.currentFocus = val
},
updateDirectUserInfo() {
this.loginLoading = true
uni.showLoading({
title: '修改中...'
})
let param = JSON.parse(JSON.stringify(this.msg))
this.apipost("LvXiaoYouUpdateUserInfo_post", param, (res) => {
uni.hideLoading();
uni.showToast({
title: res.message,
icon: "none",
});
if (res.resultCode == 1) {
//更新用户缓存信息
var b2b_user_info = uni.getStorageSync('b2b_user');
b2b_user_info.name = param.Name;
b2b_user_info.contactNumber = param.Moblie
uni.setStorageSync('b2b_user', b2b_user_info);
uni.redirectTo({
url: '/pages/user-center/user-center'
})
} else {
this.loginLoading = false;
uni.hideLoading();
}
}, (failed) => {
this.loginLoading = false;
uni.showToast({
title: failed.message,
icon: "none",
});
}, (error) => {
this.loginLoading = false;;
uni.hideLoading();
})
},
}
}
</script>
<style>
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
.login-page {
padding: 20px;
}
.login-page .logo-head {
margin-top: 20px;
display: flex;
align-items: center;
}
.login-page .logo-head image {
width: 50px;
height: 50px;
margin-right: 10px;
}
.login-page .logo-head .logo-text {
font-size: 32px;
font-family: logo-font;
font-weight: 700;
}
.login-page .login-form {
margin-top: 50px;
padding: 20px;
}
.login-page .login-form .login-title {
font-size: 20px;
font-weight: 700;
font-family: logo-font;
margin-bottom: 30px;
}
.login-page .login-form .login-item {
margin-top: 30px;
}
.login-page .login-form .login-item input {
background-color: rgba(0, 0, 0, .05);
padding: 0 12px;
height: 46px;
line-height: 46px;
border-radius: 8px;
color: #1d1d1d;
font-family: nav-font;
}
.login-page .login-form .login-item input.focus {
background: #1d1d1d;
color: #FFF;
}
.login-page .login-form .login-btn {
height: 80rpx;
background-color: #111111;
text-align: center;
line-height: 80rpx;
color: #fff;
/* font-weight: 600; */
font-size: 28rpx;
border-radius: 16rpx;
font-family: logo-font;
font-size: 16px;
}
.login-page .login-form .login-btn.disable {
/* background-color: #ecf1f4;
color: #111; */
opacity: 0.5;
}
.login-page .login-form .wechat-login {
background-color: none;
height: 40px;
width: 40px;
/* border-radius: 40px; */
overflow: hidden;
/* box-shadow: 0px 0px 20px 0px rgba(76,87,125,0.2)!important; */
padding: 0;
}
.login-page .login-form .wechat-login image {
width: 38px;
height: 38px;
margin: 1px;
}
.login-page .login-form .wechat-login::after {
border: none !important;
height: auto !important;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<view class="package-good">
<view class="rm-left">
<image :src="data.MealPic" mode="aspectFill">
<image :src="packageGoods.MealPic" mode="aspectFill">
</image>
</view>
<view class="rm-right">
<view class="package-name">{{data.MealName}}</view>
<view class="package-name">{{packageGoods.MealName}}</view>
<view class="f11">
<text class="king" style="margin-right: 14rpx;" v-if="data.MinBuyNum>0">{{data.MinBuyNum}}人起订</text>
<text class="king" style="margin-right: 14rpx;" v-if="packageGoods.MinBuyNum>0">{{packageGoods.MinBuyNum}}人起订</text>
<text>
<text v-for="(item,index) in data.UsageTimeList" :key="index" v-if="data.UsageTimeList[0].ID!==0">
<text v-for="(item,index) in packageGoods.UsageTimeList" :key="index" v-if="packageGoods.UsageTimeList[0].ID!==0">
{{item.Name}}
<text v-if="index!=data.UsageTimeList.length-1"></text>
<text v-if="index!=packageGoods.UsageTimeList.length-1"></text>
</text>
<text v-if="data.UsageTimeList[0].ID!==0">可用,</text>
<text v-if="data.UsageTimeList[0].ID===0">
<text v-if="packageGoods.UsageTimeList[0].ID!==0">可用,</text>
<text v-if="packageGoods.UsageTimeList[0].ID===0">
使用时间不限
</text>
</text>
<text v-if="data.IsHoliday===1">节假日可用</text>
<text v-if="packageGoods.IsHoliday===1">节假日可用</text>
</view>
<viwe class="give f11">
<text v-if="data.MakeDay===0">可预约当天</text>
<text v-if="data.MakeDay>0">提前{{data.MakeDay}}天预约</text>
<text v-if="packageGoods.MakeDay===0">可预约当天</text>
<text v-if="packageGoods.MakeDay>0">提前{{packageGoods.MakeDay}}天预约</text>
</viwe>
<view class="buy-know" @click="seeBuyNotice">
购买须知
</view>
<view class="price" style="margin-top:10rpx;">
<text class="f11" style="margin-right: 10rpx;"></text>
<!-- <text v-if="data.LPriceB">{{data.LPriceB}}</text> -->
<!-- <text v-if="!data.LPriceB">暂无报价</text> -->
<text>{{$utils.getretailer()==true? data.LPriceB:data.LPriceC}}</text>
<text>{{$utils.getretailer()==true? packageGoods.LPriceB:packageGoods.LPriceC}}</text>
</view>
</view>
<view class="rm-opera">
<view class="buy" @click="previewOrder" v-if="data.RemainingInventory>0">
<view class="buy" @click="previewOrder" v-if="packageGoods.RemainingInventory>0">
<view class="buy-content"></view>
<view class="buy-tips">在线订</view>
</view>
<view class="buy disabled" v-if="data.RemainingInventory<=0">
<view class="buy disabled" v-if="packageGoods.RemainingInventory<=0">
<view class="buy-content"></view>
<view class="buy-tips">已售罄</view>
</view>
</view>
<u-popup v-model="showBuyNotice" mode="bottom" border-radius="40" :safe-area-inset-bottom="true">
<buyNotice :mealData="data" @success="buyNoticeSuccess"></buyNotice>
<buyNotice :mealData="packageGoods" @success="buyNoticeSuccess"></buyNotice>
</u-popup>
</view>
......@@ -59,7 +58,7 @@
buyNotice
},
props: {
data: {
packageGoods: {
type: Object,
dafault: {}
}
......@@ -70,7 +69,7 @@
}
},
mounted() {
console.log(this.data)
},
methods: {
previewOrder() {
......
<template>
<view class="restaurant-list-item" @click="confirm">
<view class="img-box">
<image :src="data.CoverImg" mode="aspectFill"></image>
<image :src="restaurantGoodsItem.CoverImg" mode="aspectFill"></image>
</view>
<view class="restaurant-info">
<view class="restaurant-name">{{data.Name}}</view>
<!-- <view class="restaurant-start">
<view class="other-rate">
<text class="feature">{{data.Feature}}</text>
<span class="line"></span>
</view>
</view> -->
<view class="localtion feature">{{data.Feature}}</view>
<view class="localtion feature addr">{{data.Address}}</view>
<view class="restaurant-name">{{restaurantGoodsItem.Name}}</view>
<view class="localtion feature">{{restaurantGoodsItem.Feature}}</view>
<view class="localtion feature addr">{{restaurantGoodsItem.Address}}</view>
<view style="display: flex;flex-wrap: wrap;">
<view v-for="(item,index) in data.FoodTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
<view v-for="(item,index) in restaurantGoodsItem.FoodTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;"
v-if="item"></u-tag>
</view>
<view v-for="(item,index) in data.GeographicTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
<view v-for="(item,index) in restaurantGoodsItem.GeographicTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;"
v-if="item"></u-tag>
</view>
</view>
<view class="price">
<text></text>
<!-- <text class="money">{{data.B2BPrice}}</text> -->
<text class="money">{{$utils.getretailer()==true? data.B2BPrice:data.B2CPrice}} </text>
<text class="money">{{$utils.getretailer()==true? restaurantGoodsItem.B2BPrice:restaurantGoodsItem.B2CPrice}}
</text>
<text>/起</text>
</view>
</view>
......@@ -34,14 +29,14 @@
<script>
export default {
props:{
restaurantType:{
type:Number,
default:0
props: {
restaurantType: {
type: Number,
default: 0
},
data:{
type:Object,
default:{}
restaurantGoodsItem: {
type: Object,
default: {}
}
},
data() {
......@@ -49,8 +44,8 @@
// key: value
}
},
methods:{
confirm(){
methods: {
confirm() {
this.$emit("confirm")
}
}
......@@ -58,14 +53,15 @@
</script>
<style>
.restaurant-list-item{
.restaurant-list-item {
margin: 30rpx 30rpx 0 30rpx;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #E2E2E2;
display: flex;
/* align-items: center; */
}
.restaurant-list-item .img-box{
.restaurant-list-item .img-box {
width: 220rpx;
height: 280rpx;
border-radius: 20rpx;
......@@ -73,16 +69,19 @@
margin-right: 30rpx;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
}
.restaurant-list-item .img-box image{
.restaurant-list-item .img-box image {
width: 100%;
height: 100%;
}
.restaurant-list-item .restaurant-info{
.restaurant-list-item .restaurant-info {
width: 1px;
flex: 1;
padding-top: 20rpx;
}
.restaurant-list-item .restaurant-info .restaurant-name{
.restaurant-list-item .restaurant-info .restaurant-name {
font-weight: 500;
color: #111111;
line-height: 30rpx;
......@@ -91,27 +90,33 @@
overflow: hidden;
text-overflow: ellipsis;
}
.restaurant-list-item .restaurant-info .restaurant-start{
margin:10rpx 0;
.restaurant-list-item .restaurant-info .restaurant-start {
margin: 10rpx 0;
}
.restaurant-list-item .restaurant-info .restaurant-start .rate{
.restaurant-list-item .restaurant-info .restaurant-start .rate {
font-size: 30rpx;
font-weight: 500;
color: #999999;
line-height: 30rpx;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate{
.restaurant-list-item .restaurant-info .restaurant-start .other-rate {
display: inline-block;
position: relative;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate text{
position: relative;z-index: 2;
.restaurant-list-item .restaurant-info .restaurant-start .other-rate text {
position: relative;
z-index: 2;
font-size: 30rpx;
line-height: 30rpx;
font-weight: 500;
color: #111;
}
.restaurant-list-item .restaurant-info .restaurant-start .other-rate .line{
.restaurant-list-item .restaurant-info .restaurant-start .other-rate .line {
background-color: #DFBE6E;
height: 6px;
bottom: 2px;
......@@ -120,12 +125,13 @@
position: absolute;
z-index: 1;
}
.restaurant-list-item .restaurant-info .localtion{
.restaurant-list-item .restaurant-info .localtion {
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
......@@ -134,27 +140,31 @@
-webkit-box-orient: vertical;
margin-bottom: 10rpx;
}
.restaurant-list-item .restaurant-info .price{
.restaurant-list-item .restaurant-info .price {
margin-top: 10rpx;
font-weight: 500;
color: #111;
font-size: 20rpx;
text-align: right;
}
.restaurant-list-item .restaurant-info .price .money{
.restaurant-list-item .restaurant-info .price .money {
font-size: 36rpx;
}
.feature{
.feature {
margin-top: 20rpx;
text-align: justify;
text-align-last: left;
overflow : hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.addr{
.addr {
color: #111111 !important;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -32,7 +32,8 @@ function getRect(selector) {//获取元素的信息
function getretailer() {//判断是否是分销商
let isdistributor = false
let mall_UserInfo = uni.getStorageSync("b2b_user");
if (mall_UserInfo && mall_UserInfo.token) {
//mall_UserInfo.customerType (1-直客,2-同行)
if (mall_UserInfo && mall_UserInfo.token && mall_UserInfo.customerType==2) {
isdistributor = true
}
return isdistributor
......
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