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