会员权益
This commit is contained in:
699
pagesTools/sequence/details.vue
Normal file
699
pagesTools/sequence/details.vue
Normal file
@@ -0,0 +1,699 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 活动接龙详情 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="container" :style="{'--theme-color': themeColor}">
|
||||
<!-- 标题栏 -->
|
||||
<title-bar :showBack="true" title="活动接龙详情"></title-bar>
|
||||
<!-- 内容区 -->
|
||||
<view class="container-main">
|
||||
<block v-if="loadEnd">
|
||||
<!-- 接龙信息 -->
|
||||
<view class="main-column">
|
||||
<view class="column-title text-ellipsis-more">{{ chainsInfo.name }}</view>
|
||||
<view class="column-publisher flex align-items-center">
|
||||
<image class="publisher-avatar" :src="chainsInfo.avatar" mode="aspectFill"></image>
|
||||
<view class="publisher-info">
|
||||
<view class="info-top flex align-items-center">
|
||||
<view class="top-name">{{ chainsInfo.member_name }}</view>
|
||||
<view class="top-level">{{ chainsInfo.level_name }}</view>
|
||||
</view>
|
||||
<view class="info-time">{{ chainsInfo.createtime }}</view>
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button class="publisher-share flex align-items-center" open-type="share">
|
||||
<image class="share-icon" src="/static/invite.png" mode="aspectFill"></image>
|
||||
<text class="share-text">邀请填写</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="column-time">
|
||||
<view class="time-text">结束时间:{{ chainsInfo.expire_time }}</view>
|
||||
<view class="time-bg"></view>
|
||||
</view>
|
||||
<view class="column-content">
|
||||
<text user-select>{{ chainsInfo.content }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 接龙完成情况 -->
|
||||
<view class="main-situation">
|
||||
<view class="situation-title">接龙完成情况</view>
|
||||
<view class="situation-list" v-if="situationList.length">
|
||||
<view class="list-item" :class="{select: item.status == 1}" v-for="(item, index) in situationList" :key="index" @click="handleFeedback(index)">
|
||||
<text class="item-name">{{item.member_name}}</text>
|
||||
<view class="item-select" v-if="item.status == 1">
|
||||
<image src="/static/tick.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="situation-empty" v-else>
|
||||
<image class="empty-icon" src="/static/empty.png" mode="aspectFit"></image>
|
||||
<view class="empty-text flex align-items-center">
|
||||
<text class="text">暂无接龙人员,</text>
|
||||
<view class="btn" @click="toFeedback()" v-if="userMobile">去反馈</view>
|
||||
<button class="btn clear" open-type="getPhoneNumber" @getphonenumber="bindPhoneNumber" v-else>去反馈</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部按钮 -->
|
||||
<view class="main-footer">
|
||||
<view class="flex align-items-center">
|
||||
<view class="footer-label" @click="onContact()">
|
||||
<image class="label-icon" src="/static/phone.png" mode="aspectFit"></image>
|
||||
<view class="label-text">联系电话</view>
|
||||
</view>
|
||||
<block v-if="feedbackResult.status == 2">
|
||||
<view class="footer-btn flex-item" @click="toFeedback()" v-if="userMobile">我要接龙</view>
|
||||
<button class="footer-btn flex-item clear" open-type="getPhoneNumber" @getphonenumber="bindPhoneNumber" v-else>我要接龙</button>
|
||||
</block>
|
||||
<view class="footer-btn flex-item" @click="viewFeedback(chainsInfo.id)" v-else>查看反馈</view>
|
||||
</view>
|
||||
<view class="safe-padding"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="main-login" v-else-if="showLogin">
|
||||
<image class="login-image" :src="loginImg" mode="aspectFit"></image>
|
||||
<view class="login-tips">小程序需要登录注册才能使用相关功能,请登录后查看该页面</view>
|
||||
<view class="login-btn" :style="{background: themeColor}" @click="toLogin()">前往登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
// #ifdef H5
|
||||
import wx from 'weixin-js-sdk';
|
||||
// #endif
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 加载完成
|
||||
loadEnd: false,
|
||||
// 接龙id
|
||||
chainsId: null,
|
||||
// 反馈结果
|
||||
feedbackResult: {},
|
||||
// 接龙详情
|
||||
chainsInfo: {},
|
||||
// 接龙情况
|
||||
situationList: [],
|
||||
// 是否显示登录提示
|
||||
showLogin: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor,
|
||||
jielongImg: state => state.app.jielongImg,
|
||||
loginImg: state => state.app.loginImg,
|
||||
userMobile: state => state.user.mobile,
|
||||
})
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
this.chainsId = option.id || option.scene
|
||||
this.getFeedbackResult()
|
||||
this.getChainsInfo(() => {
|
||||
uni.hideLoading()
|
||||
this.loadEnd = true
|
||||
// #ifdef H5
|
||||
this.initConfig()
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
if (this.loadEnd) {
|
||||
this.getFeedbackResult()
|
||||
this.getChainsInfo()
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: this.chainsInfo.name,
|
||||
path: '/pagesTools/sequence/details?id=' + this.chainsId,
|
||||
imageUrl: this.jielongImg,
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: this.chainsInfo.name,
|
||||
path: '/pagesTools/sequence/details?id=' + this.chainsId,
|
||||
imageUrl: this.jielongImg,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// #ifdef H5
|
||||
// 微信公众号初始化方法
|
||||
initConfig() {
|
||||
this.$util.request("main.WeChatConfig", {
|
||||
url: location.href.split('#')[0]
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: res.data.appId,
|
||||
timestamp: Number(res.data.timestamp),
|
||||
nonceStr: res.data.nonceStr,
|
||||
signature: res.data.signature,
|
||||
jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"],
|
||||
openTagList: ["updateAppMessageShareData", "updateTimelineShareData"],
|
||||
})
|
||||
wx.ready(() => {
|
||||
wx.updateAppMessageShareData({
|
||||
title: this.chainsInfo.name,
|
||||
desc: "",
|
||||
link: window.location.href,
|
||||
imgUrl: this.jielongImg,
|
||||
});
|
||||
wx.updateTimelineShareData({
|
||||
title: this.chainsInfo.name,
|
||||
link: window.location.href,
|
||||
imgUrl: this.jielongImg,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('通过config接口注入权限验证配置 ', error)
|
||||
})
|
||||
},
|
||||
// #endif
|
||||
// 获取详情
|
||||
getChainsInfo(fn) {
|
||||
this.$util.request("sequence.chainsDetails", {
|
||||
id: this.chainsId,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.data.jielong_auth == 2) {
|
||||
this.getMemberState(() => {
|
||||
if (fn) fn()
|
||||
this.chainsInfo = res.data.data
|
||||
this.situationList = res.data.member_data
|
||||
})
|
||||
} else {
|
||||
if (fn) fn()
|
||||
this.chainsInfo = res.data.data
|
||||
this.situationList = res.data.member_data
|
||||
}
|
||||
} else {
|
||||
if (fn) fn()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
if (fn) fn()
|
||||
if (error == 401) {
|
||||
this.showLogin = true
|
||||
} else {
|
||||
console.error('获取详情 ', error)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取会员状态
|
||||
getMemberState(fn) {
|
||||
this.$util.request("member.state").then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.state.state == 6) {
|
||||
fn()
|
||||
} else if (res.data.state.state == -1) {
|
||||
uni.showModal({
|
||||
title: "系统提示",
|
||||
content: "此页面需成为会员后可查看!",
|
||||
confirmColor: this.themeColor,
|
||||
confirmText: "去加入",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/member/apply/index"
|
||||
})
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: "系统提示",
|
||||
content: "此页面需成为会员后可查看!",
|
||||
confirmColor: this.themeColor,
|
||||
confirmText: "前往查看",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.switchTab({
|
||||
url: "/pages/mine/index"
|
||||
})
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取会员状态 ', error)
|
||||
})
|
||||
},
|
||||
// 获取反馈结果
|
||||
getFeedbackResult() {
|
||||
this.$util.request("sequence.feedbackResult", {
|
||||
id: this.chainsId,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.feedbackResult = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取反馈结果', error)
|
||||
})
|
||||
},
|
||||
// 点击名字去反馈
|
||||
handleFeedback(index) {
|
||||
if (!this.userMobile) return
|
||||
const item = this.situationList[index]
|
||||
if (this.chainsInfo.type == 2 && this.feedbackResult.id == item.id) {
|
||||
if (this.feedbackResult.status == 1) {
|
||||
uni.showToast({
|
||||
title: "您已反馈过该接龙",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
})
|
||||
} else {
|
||||
this.getChainsSeniority(() => {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: `/pagesTools/sequence/feedback?id=${this.chainsId}`,
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
// 前往反馈
|
||||
toFeedback() {
|
||||
if (this.feedbackResult.status == 1) {
|
||||
uni.showToast({
|
||||
title: "您已反馈过该接龙",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
})
|
||||
} else {
|
||||
this.getChainsSeniority(() => {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: `/pagesTools/sequence/feedback?id=${this.chainsId}`,
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取限定接龙资格
|
||||
getChainsSeniority(fn) {
|
||||
if (this.chainsInfo.type == 2) {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true,
|
||||
})
|
||||
this.$util.request("sequence.chainsSeniority", {
|
||||
id: this.chainsId,
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
if (res.data.state == 1) {
|
||||
fn()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "您无法参加此限定接龙,请联系管理员添加",
|
||||
icon: 'none',
|
||||
duration: 2500
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('获取限定接龙资格', error)
|
||||
})
|
||||
} else {
|
||||
fn()
|
||||
}
|
||||
},
|
||||
// 绑定手机号
|
||||
bindPhoneNumber(e) {
|
||||
if (e.detail.errMsg == "getPhoneNumber:ok") {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: "加载中",
|
||||
})
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
let data = e.detail
|
||||
data.code = loginRes.code
|
||||
this.$util.request("login.bindMobile", data).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.$store.commit('user/updateMobile', res.data.phoneNumber)
|
||||
this.toFeedback()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('获取用户手机号码 ', error)
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "授权手机号失败,请重试"
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取手机号失败,请重新获取',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查看反馈信息
|
||||
viewFeedback(id) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pagesTools/sequence/feedInfo?id=" + id
|
||||
})
|
||||
},
|
||||
// 联系电话
|
||||
onContact() {
|
||||
this.$util.toPage({
|
||||
mode: 6,
|
||||
phone: this.chainsInfo.mobile,
|
||||
})
|
||||
},
|
||||
// 前往登录
|
||||
toLogin() {
|
||||
uni.redirectTo({
|
||||
url: `/pagesTools/sequence/details?id=${this.chainsId}`,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
.container-main {
|
||||
padding: 32rpx 32rpx 144rpx;
|
||||
|
||||
.main-column {
|
||||
padding: 32rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.column-title {
|
||||
color: #5A5B6E;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.column-publisher {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.publisher-avatar {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.publisher-info {
|
||||
flex: 1;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.info-top {
|
||||
.top-name {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.top-level {
|
||||
margin-left: 8rpx;
|
||||
color: var(--theme-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.info-time {
|
||||
margin-top: 6rpx;
|
||||
color: #8D929C;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.publisher-share {
|
||||
margin-left: 24rpx;
|
||||
padding: 12rpx;
|
||||
border-radius: 8rpx;
|
||||
background: var(--theme-color);
|
||||
|
||||
.share-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.share-text {
|
||||
color: #FFF;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.column-time {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: 32rpx;
|
||||
padding: 16rpx 32rpx;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
|
||||
.time-text {
|
||||
color: #5A5B6E;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.time-bg {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: var(--theme-color);
|
||||
opacity: .05;
|
||||
}
|
||||
}
|
||||
|
||||
.column-content {
|
||||
margin-top: 32rpx;
|
||||
color: #8D929C;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.main-situation {
|
||||
padding: 32rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.situation-title {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.situation-list {
|
||||
margin-top: 32rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx;
|
||||
|
||||
.list-item {
|
||||
position: relative;
|
||||
padding: 10rpx 14rpx;
|
||||
border: 2rpx solid #F6F7FB;
|
||||
border-radius: 8rpx;
|
||||
background: #F6F7FB;
|
||||
|
||||
.item-name {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.item-select {
|
||||
position: absolute;
|
||||
top: -2rpx;
|
||||
right: -2rpx;
|
||||
z-index: 1;
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: var(--theme-color);
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&.select {
|
||||
border-color: var(--theme-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.situation-empty {
|
||||
margin-top: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 16rpx;
|
||||
|
||||
.empty-icon {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
.text {
|
||||
color: #8D929C;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: var(--theme-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #FFF;
|
||||
padding: 12rpx 24rpx;
|
||||
z-index: 99;
|
||||
|
||||
.footer-label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 32rpx;
|
||||
|
||||
.label-icon {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
}
|
||||
|
||||
.label-text {
|
||||
color: #5A5B6E;
|
||||
text-align: center;
|
||||
font-size: 20rpx;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
padding: 22rpx 32rpx;
|
||||
background: var(--theme-color);
|
||||
border-radius: 16rpx;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.main-login {
|
||||
padding: 96rpx 60rpx 0;
|
||||
|
||||
.login-image {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
}
|
||||
|
||||
.login-tips {
|
||||
color: #585858;
|
||||
font-size: 36rpx;
|
||||
line-height: 50rpx;
|
||||
margin-top: 48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin-top: 56rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
background: var(--theme-color);
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
205
pagesTools/sequence/feedInfo.vue
Normal file
205
pagesTools/sequence/feedInfo.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 接龙反馈信息 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="container" :style="{'--theme-color': themeColor}">
|
||||
<!-- 标题栏 -->
|
||||
<title-bar :showBack="true" title="反馈信息"></title-bar>
|
||||
<!-- 内容区 -->
|
||||
<view class="container-main" v-if="loadEnd">
|
||||
<view class="main-column">
|
||||
<view class="column-member flex align-items-center">
|
||||
<image class="member-avatar" :src="memberInfo.avatar" mode="aspectFill"></image>
|
||||
<view class="member-info">
|
||||
<view class="info-top">
|
||||
<view class="top-name">{{memberInfo.name}}</view>
|
||||
<view class="top-level">{{memberInfo.member_level}}</view>
|
||||
</view>
|
||||
<view class="info-time">{{feedbackInfo.createtime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="column-form">
|
||||
<view class="form-content" v-if="feedbackInfo.status">{{feedbackInfo.status}}</view>
|
||||
<view class="form-content" v-if="feedbackInfo.content">
|
||||
<text>{{feedbackInfo.content}}</text>
|
||||
</view>
|
||||
<view class="form-list flex flex-wrap" v-if="feedbackImages.length">
|
||||
<view class="list-image" v-for="(image, index) in feedbackImages" :key="index">
|
||||
<image class="image-box" :src="image" mode="aspectFill" @click="previewImage(index)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部导航 -->
|
||||
<tab-bar></tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 加载状态
|
||||
loadEnd: false,
|
||||
// 反馈id
|
||||
feedbackId: null,
|
||||
// 用户信息
|
||||
memberInfo: {},
|
||||
// 反馈信息
|
||||
feedbackInfo: {},
|
||||
// 反馈图片
|
||||
feedbackImages: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor
|
||||
}),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.feedbackId = option.id
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
this.getDetails(() => {
|
||||
this.loadEnd = true
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取反馈详情
|
||||
getDetails(fn) {
|
||||
this.$util.request("sequence.feedbackDetails", {
|
||||
jielong_id: this.feedbackId,
|
||||
}).then(res => {
|
||||
if (fn) fn()
|
||||
if (res.code == 1) {
|
||||
this.memberInfo = res.data.member_data
|
||||
this.feedbackInfo = res.data.feedback_data
|
||||
if (res.data.feedback_data.images) {
|
||||
this.feedbackImages = res.data.feedback_data.images.split(",")
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
if (fn) fn()
|
||||
console.error('获取反馈详情', error)
|
||||
})
|
||||
},
|
||||
// 预览图片
|
||||
previewImage(index) {
|
||||
uni.previewImage({
|
||||
urls: this.feedbackImages,
|
||||
current: index,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
.container-main {
|
||||
padding: 32rpx;
|
||||
|
||||
.main-column {
|
||||
padding: 32rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.column-member {
|
||||
.member-avatar {
|
||||
margin-right: 16rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.member-info {
|
||||
.info-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.top-name {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.top-level {
|
||||
color: var(--theme-color);
|
||||
margin-left: 8rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.info-time {
|
||||
margin-top: 6rpx;
|
||||
color: #8D929C;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.column-form {
|
||||
.form-content {
|
||||
margin-top: 32rpx;
|
||||
color: #8D929C;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.form-list {
|
||||
margin-top: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
row-gap: 24rpx;
|
||||
column-gap: 3.5%;
|
||||
|
||||
.list-image {
|
||||
position: relative;
|
||||
width: 31%;
|
||||
height: 0;
|
||||
padding-top: 31%;
|
||||
|
||||
.image-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.image-close {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: -16rpx;
|
||||
right: -16rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
370
pagesTools/sequence/feedback.vue
Normal file
370
pagesTools/sequence/feedback.vue
Normal file
@@ -0,0 +1,370 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 活动接龙反馈 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="container" :style="{'--theme-color': themeColor}">
|
||||
<!-- 标题栏 -->
|
||||
<title-bar :showBack="true" title="活动接龙反馈"></title-bar>
|
||||
<!-- 内容区 -->
|
||||
<view class="container-main" v-if="loadEnd">
|
||||
<view class="main-form">
|
||||
<view class="form-group">
|
||||
<view class="group-title">1.署名<text class="symbol">*</text></view>
|
||||
<input class="group-input" v-model="formData.name" type="text" />
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="group-title">2.图片</view>
|
||||
<view class="group-list flex flex-wrap">
|
||||
<view class="list-image" v-for="(image, index) in selectImages" :key="index">
|
||||
<image class="image-box" :src="image" mode="aspectFill" @click="previewImage(index)"></image>
|
||||
<image class="image-close" src="/static/cancel.png" mode="aspectFit" @click="deleteImage(index)"></image>
|
||||
</view>
|
||||
<view class="list-upload" @click="chooseImage()" v-if="selectImages.length < 9">
|
||||
<view class="upload-bg"></view>
|
||||
<view class="upload-choose flex-direction-column flex-center">
|
||||
<view class="choose-icon">
|
||||
<image src="/static/camera.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="choose-text">上传图片</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="group-title">3.内容</view>
|
||||
<view class="group-textarea">
|
||||
<textarea class="textarea" placeholder="请输入反馈内容" placeholder-class="placeholder" v-model="formData.content"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-btn">
|
||||
<view class="btn" :style="{ background: themeColor }" @click="handleSubmit(1)">参加</view>
|
||||
<view class="btn" :style="{ background: themeColorOne }" @click="handleSubmit(2)">不参加</view>
|
||||
<view class="btn" :style="{ background: themeColorTwo }" @click="handleSubmit(3)">参加其它</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部导航 -->
|
||||
<tab-bar></tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 加载完成
|
||||
loadEnd: false,
|
||||
// 接龙id
|
||||
chainsId: null,
|
||||
// 表单内容
|
||||
formData: {},
|
||||
// 已选择图片
|
||||
selectImages: [],
|
||||
// 延时器
|
||||
delayer: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor
|
||||
}),
|
||||
themeColorOne() {
|
||||
return this.$util.hexToRgb(this.themeColor, 0.6);
|
||||
},
|
||||
themeColorTwo() {
|
||||
return this.$util.hexToRgb(this.themeColor, 0.3);
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.chainsId = option.id
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
this.getFeedbackResult(() => {
|
||||
uni.hideLoading()
|
||||
this.loadEnd = true
|
||||
})
|
||||
},
|
||||
onUnload() {
|
||||
if (this.delayer) clearTimeout(this.delayer)
|
||||
},
|
||||
methods: {
|
||||
// 获取反馈结果
|
||||
getFeedbackResult(fn) {
|
||||
this.$util.request("sequence.feedbackResult", {
|
||||
id: this.chainsId,
|
||||
}).then(res => {
|
||||
if (fn) fn()
|
||||
if (res.code == 1) {
|
||||
this.formData = {
|
||||
jielong_id: this.chainsId,
|
||||
member_id: res.data.id,
|
||||
name: res.data.member_name || res.data.name,
|
||||
images: "",
|
||||
content: "",
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
if (fn) fn()
|
||||
console.error('获取反馈结果', error)
|
||||
})
|
||||
},
|
||||
// 选择图片
|
||||
chooseImage() {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.chooseMedia({
|
||||
count: 9 - this.selectImages.length,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
sizeType: ['compressed'],
|
||||
success: (res) => {
|
||||
this.selectImages = [...this.selectImages, ...res.tempFiles.map(item => item.tempFilePath)]
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.chooseImage({
|
||||
count: 9 - this.selectImages.length,
|
||||
sourceType: ['album', 'camera '],
|
||||
sizeType: ['compressed'],
|
||||
success: (res) => {
|
||||
this.selectImages = [...this.selectImages, ...res.tempFilePaths]
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 删除图片
|
||||
deleteImage(index) {
|
||||
this.$delete(this.selectImages, index)
|
||||
},
|
||||
// 预览图片
|
||||
previewImage(index) {
|
||||
uni.previewImage({
|
||||
urls: this.selectImages,
|
||||
current: index,
|
||||
})
|
||||
},
|
||||
// 提交反馈
|
||||
handleSubmit(status) {
|
||||
this.formData.status = status
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true
|
||||
})
|
||||
if (this.selectImages.length) {
|
||||
this.$util.uploadFileMultiple(this.selectImages).then(result => {
|
||||
this.formData.images = result.join(",")
|
||||
this.submitEvent()
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('上传文件 ', error)
|
||||
})
|
||||
} else {
|
||||
this.submitEvent()
|
||||
}
|
||||
},
|
||||
// 提交事件
|
||||
submitEvent() {
|
||||
this.$util.request("sequence.addFeedback", this.formData).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
icon: "success",
|
||||
title: "反馈成功",
|
||||
mask: true,
|
||||
duration: 1500
|
||||
})
|
||||
this.delayer = setTimeout(() => {
|
||||
if (getCurrentPages().length == 1) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/index/index"
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}, 1500)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('提交反馈', error)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
.container-main {
|
||||
padding: 48rpx;
|
||||
|
||||
.main-form {
|
||||
.form-group {
|
||||
margin-top: 32rpx;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.group-title {
|
||||
color: #5A5B6E;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
line-height: 44rpx;
|
||||
|
||||
.symbol {
|
||||
color: #E60012;
|
||||
}
|
||||
}
|
||||
|
||||
.group-input {
|
||||
margin-top: 32rpx;
|
||||
padding: 36rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FFFFFF;
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.group-list {
|
||||
margin-top: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
row-gap: 24rpx;
|
||||
column-gap: 3.5%;
|
||||
|
||||
.list-image {
|
||||
position: relative;
|
||||
width: 31%;
|
||||
height: 0;
|
||||
padding-top: 31%;
|
||||
|
||||
.image-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.image-close {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: -16rpx;
|
||||
right: -16rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-upload {
|
||||
position: relative;
|
||||
width: 31%;
|
||||
height: 0;
|
||||
padding-top: 31%;
|
||||
background: #FFF;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.upload-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: var(--theme-color);
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
.upload-choose {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
left: 20rpx;
|
||||
z-index: 1;
|
||||
background: #FFF;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.choose-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
padding: 16rpx;
|
||||
background: var(--theme-color);
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.choose-text {
|
||||
margin-top: 16rpx;
|
||||
color: var(--theme-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.group-textarea {
|
||||
margin-top: 32rpx;
|
||||
padding: 36rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
height: 144rpx;
|
||||
color: #ACADB7;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #ACADB7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-btn {
|
||||
margin-top: 48rpx;
|
||||
|
||||
.btn {
|
||||
margin-top: 16rpx;
|
||||
padding: 28rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
232
pagesTools/sequence/index.vue
Normal file
232
pagesTools/sequence/index.vue
Normal file
@@ -0,0 +1,232 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 活动接龙 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 标题栏 -->
|
||||
<title-bar title="活动接龙"></title-bar>
|
||||
<!-- 内容区 -->
|
||||
<view class="container-main">
|
||||
<block v-if="loadEnd">
|
||||
<!-- 活动接龙 -->
|
||||
<view class="main-column">
|
||||
<chains-item :show-data="chainsList" show-type="1" @setShareData="setShareData"></chains-item>
|
||||
<empty top="36%" title="暂无活动接龙~" v-if="!chainsList.length"></empty>
|
||||
</view>
|
||||
</block>
|
||||
<view class="main-login" v-else-if="showLogin">
|
||||
<image class="login-image" :src="loginImg" mode="aspectFit"></image>
|
||||
<view class="login-tips">小程序需要登录注册才能使用相关功能,请登录后查看该页面</view>
|
||||
<view class="login-btn" :style="{background: themeColor}" @click="toLogin()">前往登录</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部导航 -->
|
||||
<tab-bar></tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
import chainsItem from "@/pages/component/chains/index.vue"
|
||||
// #ifdef H5
|
||||
import wx from 'weixin-js-sdk';
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
chainsItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 加载完成
|
||||
loadEnd: false,
|
||||
// 接龙列表
|
||||
chainsList: [],
|
||||
// 分类查询参数
|
||||
page: 1,
|
||||
limit: 20,
|
||||
hasMore: false,
|
||||
// 分享数据
|
||||
shareData: {},
|
||||
// 是否显示登录提示
|
||||
showLogin: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor,
|
||||
shareImage: state => state.app.shareImage,
|
||||
shareTitle: state => state.app.shareTitle,
|
||||
loginImg: state => state.app.loginImg,
|
||||
})
|
||||
},
|
||||
onLoad() {
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
this.getChainsList(() => {
|
||||
uni.hideLoading()
|
||||
this.loadEnd = true
|
||||
})
|
||||
// #ifdef H5
|
||||
this.initConfig()
|
||||
// #endif
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from == "button") {
|
||||
return {
|
||||
title: this.shareData.title,
|
||||
path: this.shareData.path,
|
||||
imageUrl: this.shareData.imageUrl || this.shareImage,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
title: this.shareTitle,
|
||||
imageUrl: this.shareImage,
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: this.shareTitle,
|
||||
imageUrl: this.shareImage,
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.getChainsList(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.hasMore) {
|
||||
this.page++
|
||||
this.getChainsList();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// #ifdef H5
|
||||
// 微信公众号初始化方法
|
||||
initConfig() {
|
||||
this.$util.request("main.WeChatConfig", {
|
||||
url: location.href.split('#')[0]
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: res.data.appId,
|
||||
timestamp: Number(res.data.timestamp),
|
||||
nonceStr: res.data.nonceStr,
|
||||
signature: res.data.signature,
|
||||
jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"],
|
||||
openTagList: ["updateAppMessageShareData", "updateTimelineShareData"],
|
||||
})
|
||||
wx.ready(() => {
|
||||
wx.updateAppMessageShareData({
|
||||
title: this.shareTitle,
|
||||
desc: "",
|
||||
link: window.location.href,
|
||||
imgUrl: this.shareImage,
|
||||
});
|
||||
wx.updateTimelineShareData({
|
||||
title: this.shareTitle,
|
||||
link: window.location.href,
|
||||
imgUrl: this.shareImage,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('通过config接口注入权限验证配置 ', error)
|
||||
})
|
||||
},
|
||||
// #endif
|
||||
// 获取接龙列表
|
||||
getChainsList(fn) {
|
||||
this.$util.request("sequence.chainsList", {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}).then(res => {
|
||||
if (fn) fn()
|
||||
if (res.code == 1) {
|
||||
let list = res.data.data
|
||||
this.hasMore = this.page < res.data.total / this.limit ? true : false
|
||||
this.chainsList = this.page == 1 ? list : [...this.chainsList, ...list];
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
if (error == 401) {
|
||||
this.showLogin = true
|
||||
} else {
|
||||
console.error('获取接龙列表 ', error)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置分享数据
|
||||
setShareData(data) {
|
||||
this.shareData = data
|
||||
},
|
||||
// 前往登录
|
||||
toLogin() {
|
||||
uni.redirectTo({
|
||||
url: "/pagesTools/sequence/index",
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
.container-main {
|
||||
padding: 32rpx;
|
||||
|
||||
.main-login {
|
||||
padding: 96rpx 60rpx 0;
|
||||
|
||||
.login-image {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
}
|
||||
|
||||
.login-tips {
|
||||
color: #585858;
|
||||
font-size: 36rpx;
|
||||
line-height: 50rpx;
|
||||
margin-top: 48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin-top: 56rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
background: var(--theme-color);
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user