Compare commits
2 Commits
9fc851abfc
...
56d58b4c0b
Author | SHA1 | Date | |
---|---|---|---|
56d58b4c0b | |||
2128c68570 |
@ -176,7 +176,6 @@ export function prepayment(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveOrder(data) {
|
export function saveOrder(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/order/uniSaveOrder',
|
url: '/member/order/uniSaveOrder',
|
||||||
|
@ -68,13 +68,15 @@
|
|||||||
.navigationBar {
|
.navigationBar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--status-bar-height);
|
top: var(--status-bar-height);
|
||||||
height: 90rpx;
|
height: 110rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
|
||||||
.navigationBarBack {
|
.navigationBarBack {
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
|
@ -22,21 +22,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-item" style="border-bottom: 1rpx solid #F4F4F4;padding-bottom: 10rpx;">
|
<view class="text-item" style="border-bottom: 1rpx solid #F4F4F4;padding-bottom: 10rpx;">
|
||||||
<image class="dl-icon" src="@/static/index/xing.png" mode="aspectFit"></image>
|
<image class="dl-icon" src="@/static/index/xing.png" mode="aspectFit"></image>
|
||||||
<view class="dl-content">类型:{{item.bloggerTypesText||'无限制'}}</view>
|
<view class="dl-content">类型:{{item.bloggerTypes||'无限制'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-item" style="padding-top: 16rpx;">
|
<view class="text-item" style="padding-top: 16rpx;">
|
||||||
<view class="item-box" style="flex: 1;">
|
<view class="item-box" style="flex: 1;">
|
||||||
<image class="dl-icon2" :src="imageUrl+item.avatar" mode="scaleToFill"></image>
|
<image class="dl-icon2" :src="imageUrl+item.avatar" mode="scaleToFill"></image>
|
||||||
<view class="dl-item-right">{{item.userNickName}}</view>
|
<view class="dl-item-right" style="color: #929292;font-size: 20rpx;">{{item.userNickName}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="item-box" style="width: 28%;">
|
<!-- <view class="item-box" style="width: 28%;">
|
||||||
<image class="dl-icon3" src="@/static/index/person.png" mode="aspectFit"></image>
|
<image class="dl-icon3" src="@/static/index/person.png" mode="aspectFit"></image>
|
||||||
<view class="dl-item-right dl-number">{{item.reportNum}}</view>
|
<view class="dl-item-right dl-number">{{item.reportNum}}</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="item-box" style="width: 35%;">
|
<!-- <view class="item-box" style="width: 35%;">
|
||||||
<image class="dl-icon3" src="@/static/index/eye.png" mode="aspectFit"></image>
|
<image class="dl-icon3" src="@/static/index/eye.png" mode="aspectFit"></image>
|
||||||
<view class="dl-item-right dl-number">{{item.viewNum}}</view>
|
<view class="dl-item-right dl-number">{{item.viewNum}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <view class="item-box" style="width: 25%;">
|
<!-- <view class="item-box" style="width: 25%;">
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
@ -70,21 +71,23 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-item" style="border-bottom: 1rpx solid #F4F4F4;padding-bottom: 10rpx;">
|
<view class="text-item" style="border-bottom: 1rpx solid #F4F4F4;padding-bottom: 10rpx;">
|
||||||
<image class="dl-icon" src="@/static/index/xing.png" mode="aspectFit"></image>
|
<image class="dl-icon" src="@/static/index/xing.png" mode="aspectFit"></image>
|
||||||
<view class="dl-content">类型:{{dataObj.bloggerTypesText||'无限制'}}</view>
|
<view class="dl-content">类型:{{dataObj.bloggerTypes||'无限制'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-item" style="padding-top: 10rpx;">
|
<view class="text-item" style="padding-top: 10rpx;">
|
||||||
<view class="item-box">
|
<view class="item-box">
|
||||||
<image class="dl-icon2" :src="imageUrl+dataObj.avatar" mode="aspectFit"></image>
|
<image class="dl-icon2" :src="imageUrl+dataObj.avatar" mode="aspectFit"></image>
|
||||||
<view class="dl-item-right">{{dataObj.userNickName}}</view>
|
<view class="dl-item-right" style="color: #929292;font-size: 16rpx;">
|
||||||
|
{{dataObj.userNickName}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="item-box" style="width: 25%;">
|
<!-- <view class="item-box" style="width: 25%;">
|
||||||
<image class="dl-icon3" src="@/static/index/person.png" mode="aspectFit"></image>
|
<image class="dl-icon3" src="@/static/index/person.png" mode="aspectFit"></image>
|
||||||
<view class="dl-item-right dl-number">{{dataObj.reportNum}}</view>
|
<view class="dl-item-right dl-number">{{dataObj.reportNum}}</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="item-box" style="width: 25%;">
|
<!-- <view class="item-box" style="width: 25%;">
|
||||||
<image class="dl-icon3" src="@/static/index/eye.png" mode="aspectFit"></image>
|
<image class="dl-icon3" src="@/static/index/eye.png" mode="aspectFit"></image>
|
||||||
<view class="dl-item-right dl-number">{{dataObj.viewNum}}</view>
|
<view class="dl-item-right dl-number">{{dataObj.viewNum}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="normal-login-container">
|
<view class="normal-login-container">
|
||||||
|
<view class="navigationBarBack" @click="back">
|
||||||
|
<uni-icons size="24" type="left" :color="titleColor"></uni-icons>
|
||||||
|
</view>
|
||||||
<view class="logo-content align-center justify-center flex">
|
<view class="logo-content align-center justify-center flex">
|
||||||
<image style="width: 260rpx;height: 260rpx;" src="@/static/logo.png" mode="widthFix">
|
<image style="width: 260rpx;height: 260rpx;" src="@/static/logo.png" mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
@ -87,6 +90,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
back() {
|
||||||
|
uni.navigateBack()
|
||||||
|
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 同意
|
* 同意
|
||||||
* @param {Object} e
|
* @param {Object} e
|
||||||
@ -139,6 +146,10 @@
|
|||||||
toast("请先阅读并同意《隐私协议》《用户服务协议》")
|
toast("请先阅读并同意《隐私协议》《用户服务协议》")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (uni.getStorageSync("inviteId")) {
|
||||||
|
this.wxLoginForm.inviteId = uni.getStorageSync("inviteId")
|
||||||
|
}
|
||||||
|
console.log(this.wxLoginForm, 145);
|
||||||
let ok = await this.wxLogin()
|
let ok = await this.wxLogin()
|
||||||
console.log("微信小程序发起授权登录")
|
console.log("微信小程序发起授权登录")
|
||||||
this.$modal.loading("登录中...")
|
this.$modal.loading("登录中...")
|
||||||
@ -159,9 +170,7 @@
|
|||||||
},
|
},
|
||||||
//向后端发起登录请求
|
//向后端发起登录请求
|
||||||
sendWxLoginFormToLocalService() {
|
sendWxLoginFormToLocalService() {
|
||||||
if (uni.getStorageSync("inviteId")) {
|
|
||||||
this.wxLoginForm.inviteId = uni.getStorageSync("inviteId")
|
|
||||||
}
|
|
||||||
this.$store.dispatch('WxLogin', this.wxLoginForm).then(() => {
|
this.$store.dispatch('WxLogin', this.wxLoginForm).then(() => {
|
||||||
this.$modal.closeLoading()
|
this.$modal.closeLoading()
|
||||||
this.loginSuccess()
|
this.loginSuccess()
|
||||||
@ -220,6 +229,12 @@
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navigationBarBack {
|
||||||
|
position: fixed;
|
||||||
|
left: 30rpx;
|
||||||
|
top: 98rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.checklist-box {
|
.checklist-box {
|
||||||
margin-right: 0rpx !important;
|
margin-right: 0rpx !important;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 调整h5 -->
|
<!-- 调整h5 -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button class="button-dom" open-type="contact">购买</button>
|
<button v-if="payType=='h5'" class="button-dom" open-type="contact">购买</button>
|
||||||
|
<!-- <view class="buy-button" @click="openVip()">立即开通</view> -->
|
||||||
|
<view class="button-dom" v-else @click="toOrder()">购买</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -95,12 +97,16 @@
|
|||||||
import {
|
import {
|
||||||
getToken
|
getToken
|
||||||
} from '@/utils/auth'
|
} from '@/utils/auth'
|
||||||
|
import {
|
||||||
|
getConfigByCode
|
||||||
|
} from '@/api/system/config.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue
|
navigationBarVue
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
payType: 'h5',
|
||||||
globalConfig: getApp().globalData.config,
|
globalConfig: getApp().globalData.config,
|
||||||
menus: ['急招券', '购买记录'],
|
menus: ['急招券', '购买记录'],
|
||||||
menuIndex: 0,
|
menuIndex: 0,
|
||||||
@ -124,6 +130,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.menuIndex = option.index || 0
|
this.menuIndex = option.index || 0
|
||||||
|
this.getConfigKey()
|
||||||
this.initCoupon();
|
this.initCoupon();
|
||||||
this.initOrder()
|
this.initOrder()
|
||||||
//获取url中的search
|
//获取url中的search
|
||||||
@ -162,6 +169,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getConfigKey() {
|
||||||
|
getConfigByCode('payType').then(res => {
|
||||||
|
if (res.msg) {
|
||||||
|
this.payType = res.msg
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
initMyCoupon() {
|
initMyCoupon() {
|
||||||
getMemberCoupon().then(res => {
|
getMemberCoupon().then(res => {
|
||||||
this.coupon = res.data
|
this.coupon = res.data
|
||||||
@ -257,7 +271,8 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
//吊起支付
|
//吊起支付
|
||||||
let payData = {
|
let payData = {
|
||||||
orderNo: res.data.orderNo
|
orderNo: res.data.orderNo,
|
||||||
|
type: that.payType
|
||||||
}
|
}
|
||||||
prepayment(payData).then(paymentData => {
|
prepayment(payData).then(paymentData => {
|
||||||
that.wxpay(paymentData)
|
that.wxpay(paymentData)
|
||||||
@ -312,16 +327,47 @@
|
|||||||
},
|
},
|
||||||
// 检测支付环境中的 WeixinJSBridge
|
// 检测支付环境中的 WeixinJSBridge
|
||||||
wxpay(data) {
|
wxpay(data) {
|
||||||
if (typeof WeixinJSBridge == "undefined") {
|
if (this.payType == 'h5') {
|
||||||
if (document.addEventListener) {
|
if (typeof WeixinJSBridge == "undefined") {
|
||||||
document.addEventListener('WeixinJSBridgeReady', onBridgeReady(data), false);
|
if (document.addEventListener) {
|
||||||
} else if (document.attachEvent) {
|
document.addEventListener('WeixinJSBridgeReady', onBridgeReady(data), false);
|
||||||
document.attachEvent('WeixinJSBridgeReady', onBridgeReady(data));
|
} else if (document.attachEvent) {
|
||||||
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady(data));
|
document.attachEvent('WeixinJSBridgeReady', onBridgeReady(data));
|
||||||
|
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady(data));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onBridgeReady(data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.onBridgeReady(data);
|
console.log(data, 381);
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay', // 支付提供商
|
||||||
|
timeStamp: data.timeStamp + '', // 时间戳
|
||||||
|
nonceStr: data.nonceStr, // 随机字符串
|
||||||
|
appId: data.appId,
|
||||||
|
package: data.packageVal, // 统一下单接口返回的prepay_id参数值
|
||||||
|
signType: data.signType, // 签名算法
|
||||||
|
paySign: data.paySign, // 签名
|
||||||
|
success: (res) => {
|
||||||
|
// 支付成功回调
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付成功",
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err, 160);
|
||||||
|
// 支付失败回调
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付失败,请联系管理员!",
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onBridgeReady(data) {
|
onBridgeReady(data) {
|
||||||
|
@ -33,9 +33,9 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 调整h5 -->
|
<!-- 调整h5 -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button class="buy-button" open-type="contact">立即开通</button>
|
<button v-if="payType=='h5'" class="buy-button" open-type="contact">立即开通</button>
|
||||||
<!-- <view class="buy-button" @click="openVip()">立即开通</view> -->
|
<!-- <view class="buy-button" @click="openVip()">立即开通</view> -->
|
||||||
|
<view class="buy-button" v-else @click="toOrder()">立即开通</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 协议 -->
|
<!-- 协议 -->
|
||||||
<view class="xieyi-box">
|
<view class="xieyi-box">
|
||||||
@ -77,6 +77,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||||
|
import {
|
||||||
|
getConfigByCode
|
||||||
|
} from '@/api/system/config.js'
|
||||||
import {
|
import {
|
||||||
baseCardList,
|
baseCardList,
|
||||||
rightList
|
rightList
|
||||||
@ -99,6 +102,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
payType: 'h5',
|
||||||
globalConfig: getApp().globalData.config,
|
globalConfig: getApp().globalData.config,
|
||||||
ifAgree: 0,
|
ifAgree: 0,
|
||||||
//当前选中的会员卡下标
|
//当前选中的会员卡下标
|
||||||
@ -204,9 +208,17 @@
|
|||||||
} else {
|
} else {
|
||||||
this.toLogin(userTypeTemp)
|
this.toLogin(userTypeTemp)
|
||||||
}
|
}
|
||||||
|
this.getConfigKey()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getConfigKey() {
|
||||||
|
getConfigByCode('payType').then(res => {
|
||||||
|
if (res.msg) {
|
||||||
|
this.payType = res.msg
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
openVip() {
|
openVip() {
|
||||||
// 在你想触发跳转的地方
|
// 在你想触发跳转的地方
|
||||||
wx.openOfficialAccountProfile({
|
wx.openOfficialAccountProfile({
|
||||||
@ -333,11 +345,15 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
//吊起支付
|
//吊起支付
|
||||||
let payData = {
|
let payData = {
|
||||||
orderNo: res.data.orderNo
|
orderNo: res.data.orderNo,
|
||||||
|
type: that.payType
|
||||||
}
|
}
|
||||||
|
|
||||||
prepayment(payData).then(paymentData => {
|
prepayment(payData).then(paymentData => {
|
||||||
that.wxpay(paymentData)
|
that.wxpay(paymentData)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// uni.navigateBack()
|
// uni.navigateBack()
|
||||||
}
|
}
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
@ -350,16 +366,47 @@
|
|||||||
},
|
},
|
||||||
// 检测支付环境中的 WeixinJSBridge
|
// 检测支付环境中的 WeixinJSBridge
|
||||||
wxpay(data) {
|
wxpay(data) {
|
||||||
if (typeof WeixinJSBridge == "undefined") {
|
if (this.payType == 'h5') {
|
||||||
if (document.addEventListener) {
|
if (typeof WeixinJSBridge == "undefined") {
|
||||||
document.addEventListener('WeixinJSBridgeReady', onBridgeReady(data), false);
|
if (document.addEventListener) {
|
||||||
} else if (document.attachEvent) {
|
document.addEventListener('WeixinJSBridgeReady', onBridgeReady(data), false);
|
||||||
document.attachEvent('WeixinJSBridgeReady', onBridgeReady(data));
|
} else if (document.attachEvent) {
|
||||||
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady(data));
|
document.attachEvent('WeixinJSBridgeReady', onBridgeReady(data));
|
||||||
|
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady(data));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onBridgeReady(data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.onBridgeReady(data);
|
console.log(data, 381);
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay', // 支付提供商
|
||||||
|
timeStamp: data.timeStamp + '', // 时间戳
|
||||||
|
nonceStr: data.nonceStr, // 随机字符串
|
||||||
|
appId: data.appId,
|
||||||
|
package: data.packageVal, // 统一下单接口返回的prepay_id参数值
|
||||||
|
signType: data.signType, // 签名算法
|
||||||
|
paySign: data.paySign, // 签名
|
||||||
|
success: (res) => {
|
||||||
|
// 支付成功回调
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付成功",
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err, 160);
|
||||||
|
// 支付失败回调
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付失败,请联系管理员!",
|
||||||
|
icon: "none"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onBridgeReady(data) {
|
onBridgeReady(data) {
|
||||||
@ -617,4 +664,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -34,7 +34,7 @@
|
|||||||
<view v-if="ifHasWaiting" class="daiban-box">
|
<view v-if="ifHasWaiting" class="daiban-box">
|
||||||
<view class="daiban-dom" @click="repay()">
|
<view class="daiban-dom" @click="repay()">
|
||||||
<uni-icons type="chat-filled" size="18" style="padding-right: 10rpx;"></uni-icons>
|
<uni-icons type="chat-filled" size="18" style="padding-right: 10rpx;"></uni-icons>
|
||||||
您有一笔<text>{{ wayOrder.points }}</text>积分的提现订单,请及时处理
|
您有一笔<text>{{ wayOrder.points }}</text>积分的提现订单,请及时处理
|
||||||
<uni-icons type="right" size="18" style="padding-left: 10rpx;"></uni-icons>
|
<uni-icons type="right" size="18" style="padding-left: 10rpx;"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -93,6 +93,9 @@
|
|||||||
import {
|
import {
|
||||||
entPay
|
entPay
|
||||||
} from '@/api/wxApi.js'
|
} from '@/api/wxApi.js'
|
||||||
|
import {
|
||||||
|
queryDetail
|
||||||
|
} from '@/api/business/member.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -102,6 +105,7 @@
|
|||||||
return {
|
return {
|
||||||
//是否是会员
|
//是否是会员
|
||||||
ifMember: true,
|
ifMember: true,
|
||||||
|
userInfo: {},
|
||||||
//是否有待处理订单
|
//是否有待处理订单
|
||||||
ifHasWaiting: true,
|
ifHasWaiting: true,
|
||||||
menus: ['积分收支明细'],
|
menus: ['积分收支明细'],
|
||||||
@ -133,7 +137,8 @@
|
|||||||
isTriggered: false,
|
isTriggered: false,
|
||||||
userId: null,
|
userId: null,
|
||||||
pointsBalance: 0,
|
pointsBalance: 0,
|
||||||
money: ""
|
money: "",
|
||||||
|
interval: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -142,12 +147,31 @@
|
|||||||
this.queryParams.userId = option.userId
|
this.queryParams.userId = option.userId
|
||||||
this.pointsBalance = option.pointsBalance
|
this.pointsBalance = option.pointsBalance
|
||||||
this.initData()
|
this.initData()
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.initWayOrder()
|
this.initWayOrder()
|
||||||
},
|
this.getDetail()
|
||||||
|
let that = this
|
||||||
|
this.interval = setInterval(function() {
|
||||||
|
that.initData()
|
||||||
|
that.initWayOrder()
|
||||||
|
that.getDetail()
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
console.log('clear');
|
||||||
|
clearTimeout(this.interval); // 清除定时器
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDetail() {
|
||||||
|
let param = {
|
||||||
|
userId: this.userId,
|
||||||
|
userType: '02'
|
||||||
|
}
|
||||||
|
queryDetail(param).then(res => {
|
||||||
|
this.pointsBalance = res.data.pointsBalance.toString()
|
||||||
|
this.$forceUpdate()
|
||||||
|
})
|
||||||
|
},
|
||||||
initWayOrder() {
|
initWayOrder() {
|
||||||
getOnWayOrder().then(res => {
|
getOnWayOrder().then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -176,7 +200,7 @@
|
|||||||
/**初始化数据*/
|
/**初始化数据*/
|
||||||
initData() {
|
initData() {
|
||||||
pointList(this.queryParams).then(res => {
|
pointList(this.queryParams).then(res => {
|
||||||
this.isTriggered = false
|
this.isTriggered = false
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (this.queryParams.pageNum == 1) {
|
if (this.queryParams.pageNum == 1) {
|
||||||
this.dataList = res.data.records
|
this.dataList = res.data.records
|
||||||
@ -186,13 +210,13 @@
|
|||||||
this.total = res.data.total
|
this.total = res.data.total
|
||||||
}
|
}
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
this.isTriggered = false
|
this.isTriggered = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
title: e
|
title: e
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 计算提现的积分等于多少钱
|
* 计算提现的积分等于多少钱
|
||||||
@ -213,33 +237,36 @@
|
|||||||
this.$refs.inputDialog.open()
|
this.$refs.inputDialog.open()
|
||||||
},
|
},
|
||||||
|
|
||||||
repay(){
|
repay() {
|
||||||
// 关闭窗口后,恢复默认内容
|
// 关闭窗口后,恢复默认内容
|
||||||
entPay(this.wayOrder.orderNo).then(payS => {
|
entPay(this.wayOrder.orderNo).then(payS => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (wx.canIUse('requestMerchantTransfer')) {
|
if (wx.canIUse('requestMerchantTransfer')) {
|
||||||
wx.requestMerchantTransfer({
|
let that = this
|
||||||
mchId: payS.config.mchId,
|
wx.requestMerchantTransfer({
|
||||||
appId: payS.config.appId,
|
mchId: payS.config.mchId,
|
||||||
package: payS.runData.packageInfo,
|
appId: payS.config.appId,
|
||||||
success: (res) => {
|
package: payS.runData.packageInfo,
|
||||||
// res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
|
success: (res) => {
|
||||||
console.log('success:', res);
|
// res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
|
||||||
this.initWayOrder()
|
console.log('success:', res);
|
||||||
this.initData()
|
this.initWayOrder()
|
||||||
},
|
this.initData()
|
||||||
fail: (res) => {
|
this.getDetail()
|
||||||
console.log('fail:', res);
|
|
||||||
},
|
},
|
||||||
});
|
fail: (res) => {
|
||||||
} else {
|
console.log('fail:', res);
|
||||||
wx.showModal({
|
},
|
||||||
content: '你的微信版本过低,请更新至最新版本。',
|
});
|
||||||
showCancel: false,
|
} else {
|
||||||
});
|
wx.showModal({
|
||||||
}
|
content: '你的微信版本过低,请更新至最新版本。',
|
||||||
})
|
showCancel: false,
|
||||||
},
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
dialogInputConfirm(val) {
|
dialogInputConfirm(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
@ -304,7 +331,7 @@
|
|||||||
}
|
}
|
||||||
//页码+1,调用获取数据的方法获取第二页数据
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
this.queryParams.pageNum++
|
this.queryParams.pageNum++
|
||||||
this.initData()
|
this.initData()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 下拉刷新数据
|
* 下拉刷新数据
|
||||||
@ -313,7 +340,7 @@
|
|||||||
this.isTriggered = true
|
this.isTriggered = true
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.total = 0
|
this.total = 0
|
||||||
this.initData()
|
this.initData()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
title-color="#000000"></navigation-bar-vue>
|
title-color="#000000"></navigation-bar-vue>
|
||||||
<view class="notice-detail-last-box">
|
<view class="notice-detail-last-box">
|
||||||
<!-- 报名列表 -->
|
<!-- 报名列表 -->
|
||||||
<view class="info-box notice-detail" v-if="viewMy">
|
<view class="info-box notice-detail" v-if="viewMy&&!ifBz">
|
||||||
<view class="detail-title">已报名:{{allImgNum||0}}人</view>
|
<view class="detail-title">已报名:{{allImgNum||0}}人</view>
|
||||||
<view class="image-box" v-if="imageArray.length>0"
|
<view class="image-box" v-if="imageArray.length>0"
|
||||||
:style="{height:(imageArray.length*((imageWidth-15)*2))+'rpx'}">
|
:style="{height:(imageArray.length*((imageWidth-15)*2))+'rpx'}">
|
||||||
@ -129,7 +129,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bottom-box">
|
<view class="bottom-box">
|
||||||
<text class="update-text">{{calculateTimeDifference(noticeDetail.updateTime)||''}}更新</text>
|
<text class="update-text">{{calculateTimeDifference(noticeDetail.updateTime)||''}}更新</text>
|
||||||
<text class="view-text">{{noticeDetail.viewNum||''}} 阅读</text>
|
<!-- <text class="view-text">{{noticeDetail.viewNum||''}} 阅读</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 通告详情 -->
|
<!-- 通告详情 -->
|
||||||
@ -390,8 +390,9 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
if (null != getJSONData(constant.userInfo)) {
|
if (null != getJSONData(constant.userInfo)) {
|
||||||
this.userInfo = getJSONData(constant.userInfo)
|
this.userInfo = getJSONData(constant.userInfo)
|
||||||
|
this.getRole()
|
||||||
}
|
}
|
||||||
this.getRole()
|
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
this.viewNotice()
|
this.viewNotice()
|
||||||
},
|
},
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
截止时间
|
截止时间
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
<view class="item-value">
|
||||||
<uni-datetime-picker type="date" :clear-icon="false" v-model="dataObj.endDate"
|
<uni-datetime-picker :start="nowDate" type="date" :clear-icon="false"
|
||||||
@maskClick="maskClick" />
|
v-model="dataObj.endDate" @maskClick="maskClick" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-field">
|
<view class="item-field">
|
||||||
@ -210,6 +210,14 @@
|
|||||||
placeholder="请输入通告明细" /> -->
|
placeholder="请输入通告明细" /> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="item-field" v-if="userInfo.identityType=='05'">
|
||||||
|
<view class="item-lable is-required">
|
||||||
|
三方报名链接
|
||||||
|
</view>
|
||||||
|
<view class="item-value">
|
||||||
|
<input class="uni-input" v-model="dataObj.thirdUrl" type="text" placeholder="请输入" />
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
<view class="item-field">
|
<view class="item-field">
|
||||||
<view class="item-lable">
|
<view class="item-lable">
|
||||||
三方报名链接
|
三方报名链接
|
||||||
@ -283,8 +291,14 @@
|
|||||||
toast,
|
toast,
|
||||||
hasRights
|
hasRights
|
||||||
} from '@/utils/common.js'
|
} from '@/utils/common.js'
|
||||||
import constant from '@/utils/constant';
|
|
||||||
import rightsCode from '@/utils/rightsCode'
|
import rightsCode from '@/utils/rightsCode'
|
||||||
|
import {
|
||||||
|
getJSONData
|
||||||
|
} from '@/utils/auth.js'
|
||||||
|
import constant from '@/utils/constant';
|
||||||
|
import {
|
||||||
|
queryDetail
|
||||||
|
} from '@/api/business/member.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue,
|
navigationBarVue,
|
||||||
@ -292,6 +306,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading: false,
|
||||||
|
nowDate: new Date(),
|
||||||
//城市树结构
|
//城市树结构
|
||||||
dataTree: [],
|
dataTree: [],
|
||||||
//一行显示几个
|
//一行显示几个
|
||||||
@ -380,7 +396,8 @@
|
|||||||
text: "限制"
|
text: "限制"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
isEdit: 0
|
isEdit: 0,
|
||||||
|
userInfo: {}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -396,9 +413,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
if (null != getJSONData(constant.userInfo)) {
|
||||||
|
this.userInfo = getJSONData(constant.userInfo)
|
||||||
|
this.getDetail()
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDetail() {
|
||||||
|
let param = {
|
||||||
|
userId: this.userInfo.userId,
|
||||||
|
userType: '01'
|
||||||
|
}
|
||||||
|
queryDetail(param).then(res => {
|
||||||
|
this.userInfo.identityType = res.data.identityType
|
||||||
|
this.$forceUpdate()
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 鉴权通用方法
|
* 鉴权通用方法
|
||||||
* @param {Object} rigthsCode
|
* @param {Object} rigthsCode
|
||||||
@ -424,7 +455,6 @@
|
|||||||
if (this.isEdit == 0) {
|
if (this.isEdit == 0) {
|
||||||
this.dataObj.id = null
|
this.dataObj.id = null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.data.noticeDetail.bloggerTypes) {
|
if (res.data.noticeDetail.bloggerTypes) {
|
||||||
this.dataObj.bloggerTypesList = res.data.noticeDetail.bloggerTypes.split(",")
|
this.dataObj.bloggerTypesList = res.data.noticeDetail.bloggerTypes.split(",")
|
||||||
} else {
|
} else {
|
||||||
@ -552,12 +582,22 @@
|
|||||||
})
|
})
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// if (this.userInfo.identityType == '05' && !data.thirdUrl) {
|
||||||
|
// //转发pr 第三方链接必填
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '三方报名链接必填',
|
||||||
|
// icon: 'none',
|
||||||
|
// duration: 1000
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
//预览功能
|
//预览功能
|
||||||
preview() {
|
preview() {
|
||||||
if (this.validForm(this.dataObj)) {
|
if (this.validForm(this.dataObj)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let str = this.dataObj.detail.replace(/\n|\r\n/g, "<br>")
|
let str = this.dataObj.detail.replace(/\n|\r\n/g, "<br>")
|
||||||
console.log(str, "str")
|
console.log(str, "str")
|
||||||
this.dataObj.detail = str
|
this.dataObj.detail = str
|
||||||
@ -587,9 +627,20 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
publish() {
|
publish() {
|
||||||
|
if (this.loading) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请勿重复发布'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (this.validForm(this.dataObj)) {
|
if (this.validForm(this.dataObj)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
|
uni.showLoading({
|
||||||
|
title: '发布检测中'
|
||||||
|
})
|
||||||
|
//身份为转发pr必填第三方链接
|
||||||
let str = this.dataObj.detail.replace(/\n|\r\n/g, "<br>")
|
let str = this.dataObj.detail.replace(/\n|\r\n/g, "<br>")
|
||||||
this.dataObj.detail = str
|
this.dataObj.detail = str
|
||||||
if (this.fileList && this.fileList.length > 0) {
|
if (this.fileList && this.fileList.length > 0) {
|
||||||
@ -602,8 +653,6 @@
|
|||||||
this.dataObj.images = this.dataObj.images.join(',')
|
this.dataObj.images = this.dataObj.images.join(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.groupImageList.forEach(it => {
|
this.groupImageList.forEach(it => {
|
||||||
this.dataObj.groupImage = it.url.replace(config.baseUrl, '')
|
this.dataObj.groupImage = it.url.replace(config.baseUrl, '')
|
||||||
})
|
})
|
||||||
@ -612,19 +661,23 @@
|
|||||||
//待审核状态
|
//待审核状态
|
||||||
this.dataObj.approvalStatus = '0'
|
this.dataObj.approvalStatus = '0'
|
||||||
saveNotice(this.dataObj).then(res => {
|
saveNotice(this.dataObj).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
this.dataObj.id = res.data.noticeId
|
this.dataObj.id = res.data.noticeId
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.data.msg,
|
title: res.data.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
this.loading = false
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
setTimeout(function() {
|
||||||
|
this.loading = false
|
||||||
|
}, 3000)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 查看通告详情
|
* 查看通告详情
|
||||||
@ -1138,4 +1191,4 @@
|
|||||||
.checklist-box {
|
.checklist-box {
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -62,8 +62,9 @@ const user = {
|
|||||||
const code = wxUserInfo.code
|
const code = wxUserInfo.code
|
||||||
const encryptedIv = wxUserInfo.encryptedIv
|
const encryptedIv = wxUserInfo.encryptedIv
|
||||||
const encryptedData = wxUserInfo.encryptedData
|
const encryptedData = wxUserInfo.encryptedData
|
||||||
|
const inviteId = wxUserInfo.inviteId
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wxLogin(code, encryptedIv, encryptedData).then(res => {
|
wxLogin(code, encryptedIv, encryptedData, inviteId).then(res => {
|
||||||
setToken(res.token)
|
setToken(res.token)
|
||||||
commit('SET_TOKEN', res.token)
|
commit('SET_TOKEN', res.token)
|
||||||
resolve()
|
resolve()
|
||||||
@ -161,4 +162,4 @@ const user = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default user
|
export default user
|
@ -35,6 +35,7 @@ const request = config => {
|
|||||||
header: config.header,
|
header: config.header,
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
uni.hideLoading()
|
||||||
let [error, res] = response
|
let [error, res] = response
|
||||||
if (error) {
|
if (error) {
|
||||||
toast('后端接口连接异常')
|
toast('后端接口连接异常')
|
||||||
@ -65,6 +66,7 @@ const request = config => {
|
|||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
uni.hideLoading()
|
||||||
let {
|
let {
|
||||||
message
|
message
|
||||||
} = error
|
} = error
|
||||||
|
Loading…
Reference in New Issue
Block a user