Compare commits

...

2 Commits

Author SHA1 Message Date
56d58b4c0b crm功能开发 2025-06-20 15:20:04 +08:00
2128c68570 bug修复 2025-06-16 15:12:54 +08:00
11 changed files with 286 additions and 90 deletions

View File

@ -176,7 +176,6 @@ export function prepayment(data) {
params: data
})
}
export function saveOrder(data) {
return request({
url: '/member/order/uniSaveOrder',

View File

@ -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;

View File

@ -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>

View File

@ -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;
}

View File

@ -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()
//urlsearch
@ -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,6 +327,7 @@
},
// WeixinJSBridge
wxpay(data) {
if (this.payType == 'h5') {
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady(data), false);
@ -322,6 +338,36 @@
} else {
this.onBridgeReady(data);
}
} else {
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) {

View File

@ -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,6 +366,7 @@
},
// WeixinJSBridge
wxpay(data) {
if (this.payType == 'h5') {
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady(data), false);
@ -360,6 +377,36 @@
} else {
this.onBridgeReady(data);
}
} else {
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) {

View File

@ -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) {
@ -213,11 +237,12 @@
this.$refs.inputDialog.open()
},
repay(){
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,
@ -227,6 +252,8 @@
console.log('success:', res);
this.initWayOrder()
this.initData()
this.getDetail()
},
fail: (res) => {
console.log('fail:', res);

View File

@ -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.getDetail()
this.viewNotice()
},

View File

@ -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)
},
/**
* 查看通告详情

View File

@ -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()

View File

@ -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