1.修改基本信息。页面样式

yj-dev
杨杰 3 years ago
parent 85075e3f7c
commit 9635927ca4
  1. 18
      App.vue
  2. 4
      Utils/Api.js
  3. 17
      Utils/Request.js
  4. 5
      components/Authorize.vue
  5. 6
      manifest.json
  6. 72
      pages.json
  7. 709
      pages/goods/externalCoupon/externalCoupon.vue
  8. 2
      pages/goods/refuel-details/refuel-details.vue
  9. 135
      pages/login/register.vue
  10. 43
      pages/order/confirmation.vue
  11. 217
      pages/qianZhuPay/union-pay/union-pay.vue
  12. 2
      pages/tabBar/user/user.vue
  13. 2
      pages/userLogin/userLogin.vue
  14. 2
      subPages/unionComfirmation/unionComfirmation.vue
  15. 83
      subPages/unionPay/unionPay.vue

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl : 'https://hsg.dctpay.com/brest',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest',
imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//
url: 'https://hsgcs.dctpay.com/crest',
brestUrl : 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',
@ -27,6 +27,8 @@
balancePrice : '',
balanceCardNo:'',
identificationCode:'',
// h5
h5code:'',
//ID
storeid:'',
//

@ -182,8 +182,8 @@ export const getCmsContent = params => {
}
//设置用户参数
export const setUserParam = params => {
return POST('GET', `${base}/highUser/setUserParam`, params).then(res => res.data);
export const setCacheParam = params => {
return POST('POST', `${base}/highUser/setCacheParam`, params).then(res => res.data);
}
/**
* 工会卡

@ -24,16 +24,23 @@ function request(method, url, data) {
uni.setStorage({
key: "token",
data: ''
})
})
uni.showToast({
title: '登录信息过期,请重新授权',
icon: 'none',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url:'/pages/userLogin/userLogin'
})
setTimeout(() => {
// #ifdef H5
uni.navigateTo({
url:'/pages/login/register'
})
// #endif
// #ifdef MP
uni.navigateTo({
url: '/pages/userLogin/userLogin'
})
// #endif
}, 800);
}
})

@ -115,9 +115,8 @@
},
getH5userinfo(){
uni.navigateTo({
url:'/pages/login/register?id=1'
})
// location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_userinfo#wechat_redirect';
url:'/pages/login/register'
})
},
close() {
uni.reLaunch({

@ -2,7 +2,7 @@
"name" : "嗨森逛",
"appid" : "__UNI__E807B53",
"description" : "",
"versionName" : "1.2.0",
"versionName" : "1.2.1",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
@ -80,14 +80,14 @@
}
}
},
"title" : "嗨森逛",
"title" : "嗨加油",
"router" : {
"mode" : "hash",
"base" : "/H5"
},
"devServer" : {
"port" : "",
"https" : true
"https" : false
},
"domain" : "https://hsgcs.dctpay.com",
"template" : ""

@ -1,23 +1,33 @@
{
"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/qianZhuPay/union-pay/union-pay",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "选择方式",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"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": {
@ -321,9 +331,21 @@
}, {
"path": "pages/goods/externalCoupon/externalCoupon",
"style": {
"navigationBarTitleText": "扫码领取优惠券",
"enablePullDownRefresh": false
"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"
}]
}
}
}, {
@ -462,14 +484,6 @@
"navigationBarTextStyle": "white"
}
},{
"path" : "pages/qianZhuPay/union-pay/union-pay",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}

@ -1,378 +1,333 @@
<template>
<view>
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponsDetails.highDiscount.discountImg"></image>
</view>
<view class="coupon-mes mart10" style="margin-right: 90px;">
<view class="fcor333 fontwig6 font24 width100 text2">{{couponsDetails.highDiscount.discountName}}</view>
<view class="fcor666 font13 width100 mart5">
活动截止时间:{{salesEndTime | formatDate('-')}}</view>
</view>
<view class="fcor666 font13 width100 mart5">
领取有效期:{{couponsDetails.highDiscount.effectiveDay}}
</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-else @click="receiveDiscount">点击领取</button>
<view class="width90 mart10 fcor666">去使用</view>
<view v-if="minecoupones == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="product-list mart20 width90">
<view class="product" v-for="product in minecoupones" :key="product.id"
@tap="toGoods(product.highCoupon.id)">
<image mode="widthFix" :src="imageUrl+product.highCoupon.couponImg"></image>
<view class="name">{{ product.highCoupon.couponName }}</view>
<view class="info" v-if="product.highCoupon.payType == 1">
<view class="price">
{{ product.highCoupon.discountPrice}}
</view>
<view class="slogan" v-if="product.highCoupon.discountPrice !== product.highCoupon.salesPrice">
{{ product.highCoupon.salesPrice}}
</view>
</view>
<view class="info" v-else>
<view class="price">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfx.png">
</image>{{ product.highCoupon.discountPrice*100}}
</view>
<view class="slogan" v-if="product.highCoupon.discountPrice !== product.highCoupon.salesPrice">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image>{{ product.highCoupon.salesPrice*100}}
</view>
</view>
</view>
</view>
<view class="width100 height60"></view>
<!-- <button class="coupne-btn width100" v-if="userInfo == 1" open-type="getUserInfo" lang="zh_CN"
@getuserinfo="getuserinfo" withCredentials="true">点击领取</button>
<button class="coupne-btn width100" v-else @click="receiveDiscount">点击领取</button> -->
<!-- <authorize></authorize> -->
</view>
</template>
<script>
import {
getCouponByDiscount,
getDiscountByQrCode,
receiveDiscount,
HandleCode,
getUserInfo,
loginByPhone
} from '../../../Utils/Api.js';
// import authorize from '../../../components/Authorize';
let app = getApp();
export default {
// components: {
// authorize
// },
data() {
return {
minecoupones: [],
imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg,
imgadres:'noorder.png',
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
couponsDetails: '',
salesEndTime: '',
codes: '',
userInfo: ''
}
},
filters: {
//
formatDate: function(value, spe = '/') {
let data = new Date(value);
let year = data.getFullYear();
let month = data.getMonth() + 1;
let day = data.getDate();
let h = data.getHours();
let mm = data.getMinutes();
let s = data.getSeconds();
month = month >= 10 ? month : "0" + month;
day = day >= 10 ? day : "0" + day;
h = h >= 10 ? h : "0" + h;
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day}`;
}
},
onLoad(options) {
if (app.globalData.userInfo) {
this.userInfo = 2;
} else {
this.userInfo = 1;
}
uni.login({
provider: 'weixin',
success: function(loginRes) {
app.globalData.code = loginRes.code;
//
let params = {
code: app.globalData.code
}
HandleCode(params).then(res => {
if (res.return_code == '000000') {
app.globalData.openId = res.return_data.openId;
}
})
}
})
// var arr1 = decodeURIComponent(options.q);
// var arr2 = arr1.split('=');
this.codes = options.id;
this.getDiscountByQrCode();
},
methods: {
//
getDiscountByQrCode() {
let params = {
code: this.codes
}
getDiscountByQrCode(params).then(res => {
if (res.return_code == '000000') {
this.couponsDetails = res.return_data;
this.salesEndTime = res.return_data.highDiscount.salesEndTime;
this.getCouponByDiscount(res.return_data.highDiscount.id);
}
})
},
//
getCouponByDiscount(item) {
let params = {
discountId: item
}
getCouponByDiscount(params).then(res => {
if (res.return_code == '000000') {
this.minecoupones = res.return_data;
}
})
},
//
receiveDiscount() {
uni.showLoading({
title: '领取中...'
})
let params = {
codeId: this.couponsDetails.highDiscountAgentCode.id
}
receiveDiscount(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: res.return_data,
duration: 2000
})
} else {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: res.return_msg,
duration: 2000
})
}
})
},
//
getuserinfo() {
let that = this;
// wx.login({
// success(res) {
// if (res.code) {
//
// var code = res.code;
//
uni.getUserProfile({
desc: '登录中...',
success: function(res) {
let params = {
openId: app.globalData.openId,
iv: res.iv,
encryptedData: res.encryptedData
}
getUserInfo(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
app.globalData.userInfo = res
.return_data
.object
.highUser;
app.globalData.token = res
.return_data.uniqueCode;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data
.uniqueCode
})
that.receiveDiscount();
that.userInfo = 2;
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},
fail: res => {
uni.showToast({
title: "微信登录授权失败",
icon: "none"
});
}
})
// } else {
// uni.showToast({
// title: "",
// icon: "none"
// });
// }
// }
// })
},
//
loginByPhone(PhoneNumber) {
if(PhoneNumber.detail.iv == undefined){
uni.showToast({
title: "用户取消授权",
icon: "none"
});
return;
}
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
}
loginByPhone(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '手机号授权成功',
icon: 'none',
duration: 2000
})
this.user = res.return_data.object.highUser;
app.globalData.token = res.return_data.uniqueCode;
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
this.receiveDiscount();
this.userInfo = 2;
}
});
},
//
toGoods(e) {
if (app.globalData.userInfo) {
uni.navigateTo({
url: '../../order/confirmation?id=' + e
})
} else {
uni.showToast({
icon: 'none',
title: '请点击领取后再使用',
duration: 2000
})
}
}
}
}
</script>
<style lang="scss">
.coupon-mes {
// margin-right: 90px;
}
.coupon-img {
width: 80px;
height: 80px;
}
.product-list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.product {
width: 48%;
border-radius: 20upx;
background-color: #fff;
margin: 0 0 15upx 0;
box-shadow: 0upx 5upx 25upx rgba(0, 0, 0, 0.1);
image {
width: 100%;
border-radius: 20upx 20upx 0 0;
}
.name {
width: 92%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;
}
.info {
display: flex;
justify-content: space-between;
align-items: flex-end;
width: 92%;
padding: 10upx 4% 10upx 4%;
.price {
color: #e65339;
font-size: 30upx;
font-weight: 600;
}
.slogan {
color: #807c87;
font-size: 24upx;
text-decoration: line-through;
margin-right: 10px;
}
}
}
}
.coupne-btn {
background-color: red;
color: #FFFFFF;
}
<template>
<view>
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponsDetails.highDiscount.discountImg"></image>
</view>
<view class="coupon-mes mart10" style="margin-right: 90px;">
<view class="fcor333 fontwig6 font24 width100 text2">{{couponsDetails.highDiscount.discountName}}</view>
<view class="fcor666 font13 width100 mart5">
活动截止时间:{{salesEndTime | formatDate('-')}}</view>
</view>
<view class="fcor666 font13 width100 mart5">
领取有效期:{{couponsDetails.highDiscount.effectiveDay}}
</view>
</view>
<view class="line1 mart15"></view>
<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">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="product-list mart20 width90">
<view class="product" v-for="product in minecoupones" :key="product.id"
@tap="toGoods(product.highCoupon.id)">
<image mode="widthFix" :src="imageUrl+product.highCoupon.couponImg"></image>
<view class="name">{{ product.highCoupon.couponName }}</view>
<view class="info" v-if="product.highCoupon.payType == 1">
<view class="price">
{{ product.highCoupon.discountPrice}}
</view>
<view class="slogan" v-if="product.highCoupon.discountPrice !== product.highCoupon.salesPrice">
{{ product.highCoupon.salesPrice}}
</view>
</view>
<view class="info" v-else>
<view class="price">
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png">
</image>{{ product.highCoupon.discountPrice*100}}
</view>
<view class="slogan" v-if="product.highCoupon.discountPrice !== product.highCoupon.salesPrice">
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfh.png">
</image>{{ product.highCoupon.salesPrice*100}}
</view>
</view>
</view>
</view>
<view class="width100 height60"></view>
<!-- <button class="coupne-btn width100" v-if="userInfo == 1" open-type="getUserInfo" lang="zh_CN"
@getuserinfo="getuserinfo" withCredentials="true">点击领取</button>
<button class="coupne-btn width100" v-else @click="receiveDiscount">点击领取</button> -->
<!-- <authorize></authorize> -->
</view>
</template>
<script>
import {
getCouponByDiscount,
getDiscountByQrCode,
receiveDiscount,
HandleCode,
getUserInfo,
getH5AccessToken,
loginByPhone
} from '../../../Utils/Api.js';
// import authorize from '../../../components/Authorize';
let app = getApp();
export default {
// components: {
// authorize
// },
data() {
return {
minecoupones: [],
imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
couponsDetails: '',
salesEndTime: '',
codes: '',
userInfo: ''
}
},
filters: {
//
formatDate: function(value, spe = '/') {
let data = new Date(value);
let year = data.getFullYear();
let month = data.getMonth() + 1;
let day = data.getDate();
let h = data.getHours();
let mm = data.getMinutes();
let s = data.getSeconds();
month = month >= 10 ? month : "0" + month;
day = day >= 10 ? day : "0" + day;
h = h >= 10 ? h : "0" + h;
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day}`;
}
},
onShow() {
if (app.globalData.userInfo.phone) {
this.userInfo = 2;
} else {
this.userInfo = 1;
}
},
onLoad() {
var arr1 = window.location.href;
var arr2 = arr1.split('=');
this.getH5AccessToken(arr2[1]);
this.getDiscountByQrCode();
},
methods: {
//
getDiscountByQrCode() {
let that = this;
uni.getStorage({
key: 'h5code',
success: (res) => {
let params = {
code: res.data
}
getDiscountByQrCode(params).then(res => {
if (res.return_code == '000000') {
that.couponsDetails = res.return_data;
that.salesEndTime = res.return_data.highDiscount.salesEndTime;
that.getCouponByDiscount(res.return_data.highDiscount.id);
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 20000
})
}
})
}
});
},
//
getCouponByDiscount(item) {
let params = {
discountId: item
}
getCouponByDiscount(params).then(res => {
if (res.return_code == '000000') {
this.minecoupones = res.return_data;
}
})
},
//
receiveDiscount() {
uni.showLoading({
title: '领取中...'
})
let params = {
codeId: this.couponsDetails.highDiscountAgentCode.id
}
receiveDiscount(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: res.return_data,
duration: 2000
})
} else {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: res.return_msg,
duration: 2000
})
}
})
},
//
jumpres() {
uni.navigateTo({
url: '../../login/register?id=2'
})
},
//H5 openId
getH5AccessToken(item) {
let params = {
code: item
}
getH5AccessToken(params).then(res => {
if (res.return_code == '000000') {
app.globalData.openId = res.return_data.openid;
uni.setStorage({
key: "openId",
data: res.return_data.openid
})
}
});
},
//
loginByPhone(PhoneNumber) {
if (PhoneNumber.detail.iv == undefined) {
uni.showToast({
title: "用户取消授权",
icon: "none"
});
return;
}
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
}
loginByPhone(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '手机号授权成功',
icon: 'none',
duration: 2000
})
this.user = res.return_data.object.highUser;
app.globalData.token = res.return_data.uniqueCode;
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
this.receiveDiscount();
this.userInfo = 2;
}
});
},
//
toGoods(e) {
if (app.globalData.userInfo) {
uni.navigateTo({
url: '../../order/confirmation?id=' + e
})
} else {
uni.showToast({
icon: 'none',
title: '请点击领取后再使用',
duration: 2000
})
}
}
}
}
</script>
<style lang="scss">
.coupon-mes {
// margin-right: 90px;
}
.coupon-img {
width: 80px;
height: 80px;
}
.product-list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.product {
width: 48%;
border-radius: 20upx;
background-color: #fff;
margin: 0 0 15upx 0;
box-shadow: 0upx 5upx 25upx rgba(0, 0, 0, 0.1);
image {
width: 100%;
border-radius: 20upx 20upx 0 0;
}
.name {
width: 92%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;
}
.info {
display: flex;
justify-content: space-between;
align-items: flex-end;
width: 92%;
padding: 10upx 4% 10upx 4%;
.price {
color: #e65339;
font-size: 30upx;
font-weight: 600;
}
.slogan {
color: #807c87;
font-size: 24upx;
text-decoration: line-through;
margin-right: 10px;
}
}
}
}
.coupne-btn {
background-color: red;
color: #FFFFFF;
}
</style>

@ -279,7 +279,7 @@
// H5
jumpH5Bding() {
uni.navigateTo({
url: '/pages/login/register?id=2'
url: '/pages/login/register'
})
},
//

@ -9,22 +9,22 @@
</view>
<view class="form re">
<view class="username">
<view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">{{getCodeText}}</view>
<input placeholder="请输入手机号" v-model="phoneNumber" placeholder-style="color: rgba(255,255,255,0.8);" />
<view class="get-code" style="color: #676767;" @click.stop="getCode()">{{getCodeText}}</view>
<input placeholder="请输入手机号" v-model="phoneNumber" placeholder-style="color: #676767;" />
</view>
<view class="code">
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: rgba(255,255,255,0.8);" />
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: #676767;" />
</view>
<!-- <view class="password">
<input placeholder="请输入密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> -->
<view class="btn mart50" v-if="Typeid == 1" @tap="doReg">立即注册</view>
<view class="btn mart50" v-else @tap="doReg">绑定手机号</view>
<view class="btn mart50" @tap="doReg">立即注册</view>
<!-- <view class="btn mart50" v-else @tap="doReg">绑定手机号</view> -->
<!-- <view class="res">
<view @tap="toLogin">已有账号立即登录</view>
</view> -->
<image v-if="Typeid == 1" @click="openWx" :src="imagewxUrl+imgadres" class="wximg"></image>
<!-- <image v-if="Typeid == 1" @click="openWx" :src="imagewxUrl+imgadres" class="wximg"></image> -->
</view>
</view>
@ -43,17 +43,15 @@
return {
phoneNumber: "",
imagewxUrl: app.globalData.imageWxImg,
imgadres:'wx.png',
imgadres: 'wx.png',
code: '',
passwd: "",
getCodeText: '获取验证码',
getCodeBtnColor: "#ffffff",
getCodeisWaiting: false,
Typeid: ''
getCodeisWaiting: false
}
},
onLoad(options) {
this.Typeid = options.id
onLoad() {
},
methods: {
Timer() {},
@ -129,67 +127,59 @@
phone: this.phoneNumber,
code: this.code
}
if (this.Typeid == 1) {
H5login(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
app.globalData.token = res.return_data.uniqueCode;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
if (this.isWeiXinLogin()) {
//
location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
}else{
uni.reLaunch({
url: '/pages/tabBar/home/home'
})
}
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
} else {
bindUserPhone(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
// if (this.Typeid == 1) {
H5login(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
app.globalData.token = res.return_data.uniqueCode;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser;
app.globalData.token = res.return_data.uniqueCode;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
uni.navigateBack({})
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
}
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
uni.navigateBack({})
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
// } else {
// bindUserPhone(params).then(res => {
// uni.hideLoading()
// if (res.return_code == '000000') {
// app.globalData.userInfo = res.return_data
// .object
// .highUser;
// app.globalData.token = res.return_data.uniqueCode;
// uni.setStorage({
// key: "user",
// data: res.return_data
// .object
// .highUser
// })
// uni.setStorage({
// key: "token",
// data: res.return_data.uniqueCode
// })
// uni.navigateBack({})
// } else {
// uni.showToast({
// title: res.return_msg,
// icon: "none"
// });
// }
// })
// }
},
//
@ -224,6 +214,7 @@
width: 50px;
height: 50px;
margin-left: 40%;
margin-top: 250upx;
margin-top: 90px;
margin-bottom: 40px;
}
</style>

@ -164,7 +164,6 @@
getCouponById,
loginByPhone,
getUserNormalDiscountList,
bindUserPhone,
orderToPay,
orderToGoldPay,
findUser,
@ -205,12 +204,12 @@
orderId: '',
jumpType: '',
tongCardPrice: 0,
storeId:''
storeId: ''
};
},
onLoad(option) {
this.couponId = option.id;
this.couponId = option.id;
this.getCouponById();
},
onShow() {
@ -272,7 +271,7 @@
couponId: this.couponId
}
getCouponById(params).then(res => {
if (res.return_code == '000000') {
if (res.return_code == '000000') {
this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice;
uni.hideLoading()
@ -347,7 +346,7 @@
// H5
jumpH5Bding() {
uni.navigateTo({
url: '/pages/login/register?id=2'
url: '/pages/login/register'
})
},
//
@ -399,9 +398,9 @@
}
uni.showLoading({
title: '提交订单中...'
})
if(this.couponList.reserveStatus){
this.storeId = app.globalData.storeid
})
if (this.couponList.reserveStatus) {
this.storeId = app.globalData.storeid
}
let goods = {
"memDiscountId": this.memDiscountId,
@ -409,7 +408,7 @@
"highChildOrderList": [{
"goodsType": 1,
"goodsId": this.couponId,
"saleCount": 1,
"saleCount": 1,
"storeId": this.storeId
}]
}
@ -457,11 +456,21 @@
orderToPay(item) {
let that = this;
if (that.paytype == 'weixin') {
// #ifdef H5
let params = {
"orderId": item.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": item.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
// #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
@ -479,8 +488,8 @@
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
app.globalData.storeid = '';
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + that.couponId
@ -568,8 +577,8 @@
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
app.globalData.storeid = '';
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
@ -600,8 +609,8 @@
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
app.globalData.storeid = '';
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
@ -654,8 +663,8 @@
//
uni.showToast({
title: '支付成功'
})
app.globalData.storeid = '';
})
app.globalData.storeid = '';
app.globalData.storename = '';
if (that.jumpType == 4) {
uni.reLaunch({

@ -1,27 +1,192 @@
<template>
<view>
<view>测试中</view>
</view>
</template>
<script>
export default {
data() {
return {
url: 'https://base.95516.com/s/wl/WebAPP/helpAgree/page/help/shareRutineHelp.html?params=eyJlbmNyeXB0QXBwSWQiOiIxOTAwYmM4NDQ5N2NhYjNiIiwidG9MaW5rIjoiaHR0cHMlM0ElMkYlMkZoc2cuZGN0cGF5LmNvbSUyRnVuaW9uUGF5JTJGIn0'
}
},
onLoad() {
this.jumpurl();
},
methods: {
jumpurl(){
location.href = this.url;
}
}
}
</script>
<style>
<template>
<view>
<image class="width100" mode="widthFix" :src="imagewxUrl+imgadres" @click="showModal"></image>
<image class="width100" mode="widthFix" :src="imagewxUrl+imgadres1" @click="jumpMp"></image>
<view v-if="isShowModal">
<view class="masking" v-if="showMasking" :style="{'background-color': bgColor}"></view>
<view class="model-wraper">
<view class="modal-title">
请务必输入云闪付绑定的手机号
</view>
<view class="modal-body">
<input v-model="inputSerialNum" type="number" maxlength="11"
style="padding: 10rpx;font-size: 30rpx;" class="uni-input" focus placeholder="请输入" />
</view>
<view>
<view class="btn cancel" :style="{'color': cancelTextColor}" @click="handleCancel">{{cancelText}}
</view>
<view class="btn confirm" :style="{'color': confirmTextColor}" @click="handleConfirm">
{{confirmText}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
setCacheParam,
HandleCode
} from '../../../Utils/Api.js';
let app = getApp();
export default {
props: {
//
showMasking: {
type: Boolean,
default: true
},
//
bgColor: {
type: String,
default: 'rgba(0,0,0,.6)'
},
//
cancelText: {
type: String,
default: '取消'
},
//
confirmText: {
type: String,
default: '确定'
},
//
cancelTextColor: {
type: String,
default: '#666'
},
//
confirmTextColor: {
type: String,
default: '#5999FF'
}
},
data() {
return {
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'union1.jpg?id=1',
imgadres1: 'union2.jpg?id=2',
codes: '',
isShowModal: false,
inputSerialNum: '',
url: 'https://base.95516.com/s/wl/WebAPP/helpAgree/page/help/shareRutineHelp.html?params=eyJlbmNyeXB0QXBwSWQiOiIxOTAwYmM4NDQ5N2NhYjNiIiwidG9MaW5rIjoiaHR0cHMlM0ElMkYlMkZoc2cuZGN0cGF5LmNvbSUyRnVuaW9uUGF5JTJGIn0'
}
},
onLoad() {
var arr1 = window.location.href;
var arr2 = arr1.split('=');
var arr3 = arr2[2].split('#/');
this.codes = arr3[0];
uni.setStorage({
key: "h5code",
data: arr3[0]
})
},
methods: {
showModal() {
this.isShowModal = true;
},
handleCancel() {
this.$emit('onClickCancel', 'cancel')
this.isShowModal = false;
},
//
handleConfirm() {
this.isShowModal = false;
this.$emit('onClickConfirm', this.inputSerialNum)
if (!this.inputSerialNum) {
uni.showToast({
title: '请输入银联绑定手机号',
icon: 'none',
duration: 2000
})
return;
}
let params = {
key: this.inputSerialNum,
value: this.codes
}
setCacheParam(params).then(res => {
if (res.return_code == '000000') {
location.href = this.url;
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
//
jumpMp() {
if (!app.globalData.openId) {
location.href =
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsg.dctpay.com%2FH5%2F%23%2Fpages%2Fgoods%2FexternalCoupon%2FexternalCoupon&response_type=code&scope=snsapi_base#wechat_redirect';
} else {
uni.reLaunch({
url: '../../goods/externalCoupon/externalCoupon'
})
}
}
}
}
</script>
<style scoped>
.masking {
height: 100vh;
width: 100vw;
position: fixed;
top: 0;
left: 0;
z-index: 999;
}
.model-wraper {
width: 600rpx;
background-color: #fff;
border-radius: 16rpx;
position: absolute;
z-index: 1000;
top: 50%;
left: 50%;
margin-top: -161rpx;
margin-left: -300rpx;
box-shadow: #dcdcdc 0px 0px 20rpx;
}
.modal-title {
height: 90rpx;
line-height: 90rpx;
width: 100%;
text-align: center;
font-size: 32rpx;
color: #666;
}
.modal-body {
padding: 30rpx 30rpx 80rpx 30rpx;
}
.btn {
width: 300rpx;
height: 90rpx;
text-align: center;
line-height: 90rpx;
font-size: 32rpx;
float: left;
border-top: 1rpx solid #ddd;
}
.btn.cancel {
width: 299rpx;
border-right: 1rpx solid #dcdcdc;
}
</style>

@ -362,7 +362,7 @@
// H5
jumpH5Bding() {
uni.navigateTo({
url: '/pages/login/register?id=2'
url: '/pages/login/register'
})
},
//

@ -129,7 +129,7 @@
},
getH5userinfo() {
uni.navigateTo({
url: '/pages/login/register?id=1'
url: '/pages/login/register'
})
},
}

@ -196,7 +196,7 @@
// H5
jumpH5Bding() {
uni.navigateTo({
url: '/pages/login/register?id=2'
url: '/pages/login/register'
})
},
//

@ -7,7 +7,7 @@
<script>
import {
setUserParam,
setUserParam,
HandleCode
} from '../../Utils/Api.js';
let app = getApp();
@ -28,51 +28,42 @@
},
methods: {
//
jumpunionpay() {
// uni.navigateTo({
// url:'../unionWeb/unionWeb'
// })
uni.showToast({
title: '暂未开放',
icon: 'none',
duration: 2000
})
// if (!app.globalData.userInfo) {
// uni.login({
// provider: 'weixin',
// success: function(loginRes) {
// app.globalData.code = loginRes.code;
// //
// let params = {
// code: app.globalData.code
// }
// HandleCode(params).then(res => {
// if (res.return_code == '000000') {
// app.globalData.openId = res.return_data.openId;
// uni.navigateTo({
// url: '../../pages/userLogin/userLogin'
// })
// }
// })
// }
// })
// return;
// }
// let params = {
// param: this.codes
// }
// setUserParam(params).then(res => {
// if (res.return_code == '000000') {
// location.href = this.url;
// } else {
// uni.showToast({
// title: res.return_msg,
// icon: 'none',
// duration: 2000
// })
// }
// })
jumpunionpay() {
if (!app.globalData.userInfo) {
uni.login({
provider: 'weixin',
success: function(loginRes) {
app.globalData.code = loginRes.code;
//
let params = {
code: app.globalData.code
}
HandleCode(params).then(res => {
if (res.return_code == '000000') {
app.globalData.openId = res.return_data.openId;
uni.navigateTo({
url: '../../pages/userLogin/userLogin'
})
}
})
}
})
return;
}
let params = {
param: this.codes
}
setUserParam(params).then(res => {
if (res.return_code == '000000') {
location.href = this.url;
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
//
jumpMp() {

Loading…
Cancel
Save