1.修改问题 新增扫码进入银联入口

master
杨杰 3 years ago
parent 8377c5d683
commit 052d264d6e
  1. 8
      high-unionPay/Utils/Api.js
  2. 3
      high-unionPay/Utils/Request.js
  3. 99
      high-unionPay/pages.json
  4. 18
      high-unionPay/pages/goods/externalCoupon/externalCoupon.vue
  5. 15
      high-unionPay/pages/goods/goods-list/goods-list.vue
  6. 2360
      high-unionPay/pages/tabBar/home/home.vue
  7. 1614
      high-unionPay/pages/tabBar/user/user.vue
  8. 20
      high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue
  9. 87
      high-unionPay/pages/userLogin/userLogin.vue

@ -186,9 +186,13 @@ export const paygetOrderById = params => {
return POST('GET', `${base}/outRechargeOrder/getOrderById`, params).then(res => res.data);
}
//获取设置用户参数
export const getUserParam = params => {
return POST('GET', `${base}/highUser/getUserParam`, params).then(res => res.data);
export const getCacheParam = params => {
return POST('GET', `${base}/highUser/getCacheParam`, params).then(res => res.data);
}
export const delCacheParam = params => {
return POST('GET', `${base}/highUser/delCacheParam`, params).then(res => res.data);
}
/**
* 工会卡
*/

@ -12,7 +12,6 @@ function request(method, url, data) {
'Authorization': app.globalData.token
}, //有的时候这里不一定是 token 还可能是 Authorization
success(res) {
resolve(res)
if (res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code ==
104001) {
app.globalData.userInfo = '';
@ -37,6 +36,8 @@ function request(method, url, data) {
}, 800);
}
})
}else{
resolve(res)
}
},
fail(err) {

@ -1,6 +1,24 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/tabBar/home/home",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "嗨加油",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none",
"subNVues": [{
"id": "homeTitleNvue", //
"path": "pages/tabBar/home/subNvue/homeTitleNvue", //
"type": "navigationBar"
}]
}
}
},{
"path" : "pages/unionPay/unionPay-entrance/unionPay-entrance",
"style" :
{
@ -22,24 +40,6 @@
"enablePullDownRefresh": false
}
},{
"path": "pages/tabBar/home/home",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "首页",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none",
"subNVues": [{
"id": "homeTitleNvue", //
"path": "pages/tabBar/home/subNvue/homeTitleNvue", //
"type": "navigationBar"
}]
}
}
}, {
"path": "pages/user/bindingCardList/bindingCardList",
"style": {
@ -161,7 +161,7 @@
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
// "titleNView": false, //
"titleNView": false, //
"subNVues": [{
"id": "userTitleNvue", //
"path": "pages/tabBar/user/subNvue/userTitleNvue", //
@ -310,8 +310,8 @@
"path": "pages/user/order_list/order_list",
"style": {
"navigationBarTitleText": "我的订单",
"navigationBarBackgroundColor": "#f8f8f8",
"backgroundColorTop": "#f3f3f3",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"backgroundColorBottom": "#ffffff"
}
}, {
@ -470,7 +470,11 @@
"path": "pages/userLogin/userLogin",
"style": {
"navigationBarTitleText": "嗨加油",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
}
}, {
@ -554,31 +558,30 @@
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ffffff",
"backgroundColorBottom": "#ffffff"
},
"tabBar": {
"color": "#333333",
"selectedColor": "#0083f5",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/tabBar/home/home",
"iconPath": "static/img/tabBar/home.png",
"selectedIconPath": "static/img/tabBar/home-on.png",
"text": "嗨加油"
},
// {
// "pagePath": "pages/tabBar/category/category",
// "iconPath": "static/img/tabBar/category.png",
// "selectedIconPath": "static/img/tabBar/category-on.png",
// "text": "导航"
// },
{
"pagePath": "pages/tabBar/user/user",
"iconPath": "static/img/tabBar/user.png",
"selectedIconPath": "static/img/tabBar/user-on.png",
"text": "我的"
}
]
}
// "tabBar": {
// "color": "#333333",
// "selectedColor": "#0083f5",
// "borderStyle": "black",
// "backgroundColor": "#ffffff",
// "list": [{
// "pagePath": "pages/tabBar/home/home",
// "iconPath": "static/img/tabBar/home.png",
// "selectedIconPath": "static/img/tabBar/home-on.png",
// "text": "首页"
// },
// {
// "pagePath": "pages/tabBar/category/category",
// "iconPath": "static/img/tabBar/category.png",
// "selectedIconPath": "static/img/tabBar/category-on.png",
// "text": "导航"
// },
// {
// "pagePath": "pages/tabBar/user/user",
// "iconPath": "static/img/tabBar/user.png",
// "selectedIconPath": "static/img/tabBar/user-on.png",
// "text": "我的"
// }
// ]
// }
}

@ -14,8 +14,7 @@
</view>
</view>
<view class="line1 mart15"></view>
<button class="coupne-btn width60w mart20 marb20" v-if="userInfo == 1" lang="zh_CN" open-type="getPhoneNumber" @getphonenumber="loginByPhone"
withCredentials="true">点击领取</button>
<button class="coupne-btn width60w mart20 marb20" v-if="userInfo == 1" lang="zh_CN" @click="jumpres">点击领取</button>
<button class="coupne-btn width60w mart20 marb20" v-else @click="receiveDiscount">点击领取</button>
<view class="width90 mart10 fcor666">去使用</view>
<view v-if="minecoupones == '' " class="mart60 fotct font14 fcor666">
@ -105,11 +104,12 @@
}
},
onLoad(options) {
if (app.globalData.userInfo) {
if (app.globalData.userInfo.phone) {
this.userInfo = 2;
} else {
this.userInfo = 1;
}
uni.login({
provider: 'weixin',
success: function(loginRes) {
@ -158,7 +158,6 @@
},
//
receiveDiscount() {
uni.showLoading({
title: '领取中...'
})
@ -166,15 +165,14 @@
codeId: this.couponsDetails.highDiscountAgentCode.id
}
receiveDiscount(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: res.return_data,
duration: 2000
})
} else {
uni.hideLoading();
}else{
uni.showToast({
icon: 'none',
title: res.return_msg,
@ -291,6 +289,12 @@
}
});
},
//
jumpres() {
uni.navigateTo({
url:'../../login/register?id=2'
})
},
//
toGoods(e) {
if (app.globalData.userInfo) {

@ -29,19 +29,19 @@
<view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view>
<view class="info mart10">
<view class="price" v-if="typeId == 2">
<view class="price" v-if="row.payType != 1">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfx.png">
</image> {{ row.discountPrice*100}}
</view>
<view class="price" v-if="typeId == 1">
{{ row.discountPrice*100}}
<view class="price" v-else>
{{ row.discountPrice}}
</view>
<!-- v-if="product.discountPrice !== product.salesPrice" -->
<view class="slogan" v-if="row.discountPrice !== row.salesPrice">
<image v-if="typeId == 2" style="width: 15px;height: 15px;vertical-align: sub;"
<image v-if="row.payType != 1" style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image> <text v-if="typeId == 1"></text>{{ row.salesPrice*100}}
</image> <text v-else></text>{{ row.salesPrice*100}}
</view>
</view>
</view>
@ -96,6 +96,11 @@
title: '积分列表'
});
}
if (option.id == 3) {
uni.setNavigationBarTitle({
title: '商品列表'
});
}
this.getCouponListArea();
this.getCmsContent();
},

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -13,7 +13,7 @@
<script>
import {
getUserParam
getCacheParam
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -25,12 +25,11 @@
uni.getStorage({
key: "user",
success(e) {
app.globalData.userInfo = e.data //token
app.globalData.userInfo = e.data; //token
uni.getStorage({
key: 'token',
success(e) {
app.globalData.token = e.data;
that.getUserParam();
},
fail() {
uni.navigateTo({
@ -38,6 +37,13 @@
})
}
})
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
that.getCacheParam();
},
fail: res => {
uni.navigateTo({
@ -45,11 +51,15 @@
})
}
})
},
methods: {
//ID
getUserParam() {
getUserParam().then(res => {
getCacheParam() {
let params = {
key: app.globalData.userInfo.phone
}
getCacheParam(params).then(res => {
if (res.return_code == '000000' && res.return_data) {
uni.navigateTo({
url: '../../goods/externalCoupon/externalCoupon?id=' + res.return_data

@ -1,22 +1,17 @@
<template>
<view>
<image mode="widthFix" class="width90 mart20" :src="imagewxUrl+imgadres"></image>
<!-- <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user.phone">授权手机号</button> -->
<!-- <view class="width94">{{code}}</view> -->
<UPButton class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet bornone" @click="btnClick" :scope="scope">
授权手机号
<image mode="widthFix" class="width100" :src="imagewxUrl+imgadres"></image>
<view class="width100 height45l font14 fcor666 paddleft10 backcorfff">
授权 <text class="font16 fcor333 fontwig6 sqjl">重庆嗨加油</text> 获取以下信息为您提供相关服务
</view>
<button class="width35 flleft mart40 height50 font16"
style="margin-left: 10%;color: #5bbdd6;border: 1px solid #4992ee;" @click="backlatpage">暂不授权</button>
<UPButton class="mart40 width35 height50 fcorfff backcor008 fotct btns font16 fontlet bornone flright"
style="margin-right: 10%;" @click="btnClick" :scope="scope">
确认授权
</UPButton>
<!-- #ifdef H5 -->
<!-- button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16"
@click="getH5userinfo">授权并登录</button> -->
<!-- <view id="app" class="fotct">
<UPButton class="customBtn" @click="getH5userinfo" :scope="scope"
:style="{width:'80%',height:'45px',backgroundColor:'#0083f5'}">
授权并登录
</UPButton>
</view> -->
<!-- #endif -->
<view class="mart10 fcor333 font14">{{resinfo}}</view>
</view>
</template>
@ -24,7 +19,7 @@
const app = getApp();
import {
getUserInfo,
GetPhoneNumber,
GetPhoneNumber,
unionPhoneLogin
} from "../../Utils/Api.js"
export default {
@ -35,8 +30,6 @@
scope: "scope.mobile,scope.auth",
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'loginunion.png',
imgadres1: 'loginphone.png',
resinfo: '',
scope: "scope.mobile",
code: ''
}
@ -46,9 +39,9 @@
},
methods: {
btnClick(result) {
this.code = result.code;
if(result.code){
this.unionPhoneLogin(result.code)
this.code = result.code;
if (result.code) {
this.unionPhoneLogin(result.code)
}
},
getuserinfo() {
@ -98,18 +91,6 @@
})
that.isShowAuth = false
},
//
// reqmessage() {
// uni.requestSubscribeMessage({
// tmplIds: ['oUvaCPeeOg4wH6HTvCcSabU6FnzXUXOBXsqBYAPOV-U'],
// success(res) {
// uni.navigateBack({})
// },
// fail: (res) => {
// uni.navigateBack({})
// }
// })
// },
//
unionPhoneLogin(item) {
let params = {
@ -122,7 +103,7 @@
icon: 'none',
duration: 2000
})
this.user = res.return_data.object.highUser;
this.user = res.return_data.object.highUser;
app.globalData.token = res.return_data.uniqueCode;
app.globalData.userInfo = res.return_data
.object
@ -132,19 +113,19 @@
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
uni.navigateBack({})
}
});
},
// getH5userinfo(event, err, result) {
// console.log(event, err, result)
// this.resinfo = JSON.stringify(result);
// },
//
backlatpage() {
uni.navigateBack({})
},
getH5userinfo() {
uni.navigateTo({
url: '/pages/login/register?id=1'
@ -155,6 +136,24 @@
</script>
<style lang="scss">
page {
background-color: #efeff4;
}
.bacolorl {
background: linear-gradient(to right, #408aea, #4890ee);
}
.unionimg {
width: 200rpx;
height: 200rpx;
}
.sqjl {
padding-left: 5px;
padding-right: 5px;
}
.btns {
border-radius: 6px;
}

Loading…
Cancel
Save