代码合并
@@ -2,7 +2,7 @@
|
|||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
27
App.vue
@@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { init } from '@/api/init.js'
|
import { init } from '@/api/init.js';
|
||||||
import http from '@/http/http.js'
|
import http from '@/http/http.js';
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
console.log('App Launch')
|
console.log('App Launch');
|
||||||
// const systemInfo = uni.getSystemInfoSync();
|
// const systemInfo = uni.getSystemInfoSync();
|
||||||
// const isA = systemInfo.platform === 'android'
|
// const isA = systemInfo.platform === 'android'
|
||||||
// if (isA) {
|
// if (isA) {
|
||||||
@@ -11,23 +11,22 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// uni.setStorageSync('isAI', false)
|
// uni.setStorageSync('isAI', false)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
init()
|
init();
|
||||||
// ios是否在审核
|
// ios是否在审核
|
||||||
http.request({
|
http.request({
|
||||||
url: '/common/type/919',
|
url: '/common/type/919'
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.setStorageSync('isExamine', res.data.value)
|
uni.setStorageSync('isExamine', res.data.value);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log('App Hide')
|
console.log('App Hide');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -120,4 +119,10 @@ web-view {
|
|||||||
top: 800rpx;
|
top: 800rpx;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
.u-image {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.u-status-bar {
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -41,3 +41,13 @@ export const forgetPwd = (data) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定
|
||||||
|
*/
|
||||||
|
export const bind = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/Login/registerCode',
|
||||||
|
method: 'POST',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
63
api/me/me.js
@@ -9,4 +9,67 @@ export const selectByUserId = (data) => {
|
|||||||
data: data,
|
data: data,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客服微信
|
||||||
|
*/
|
||||||
|
export const commonType = (type) => {
|
||||||
|
return http.request({
|
||||||
|
url: `/common/type/${type}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币明细
|
||||||
|
*/
|
||||||
|
export const queryUserMoneyDetails = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/moneyDetails/queryUserMoneyDetails',
|
||||||
|
method: 'GET',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意见反馈
|
||||||
|
*/
|
||||||
|
export const sendMessage = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/message/sendMessage',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 帮助中心
|
||||||
|
*/
|
||||||
|
export const selectHelpList = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/helpWord/selectHelpList',
|
||||||
|
method: 'GET',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中心数据
|
||||||
|
*/
|
||||||
|
export const collectVideoSummary = () => {
|
||||||
|
return http.request({
|
||||||
|
url: '/courseCollect/collectVideoSummary',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币
|
||||||
|
*/
|
||||||
|
export const selectUserMoney = () => {
|
||||||
|
return http.request({
|
||||||
|
url: '/moneyDetails/selectUserMoney',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
11
api/me/message.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import http from '@/http/http.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取消息列表
|
||||||
|
*/
|
||||||
|
export const selectMessageByUserId = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/message/selectMessageByUserId',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
71
api/me/withdraw.js
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import http from '@/http/http.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取提现金额
|
||||||
|
*/
|
||||||
|
export const selectUserMoney = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/moneyDetails/selectUserMoney',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取提现记录
|
||||||
|
*/
|
||||||
|
export const selectPayDetails = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/cash/selectPayDetails',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红包明细记录
|
||||||
|
*/
|
||||||
|
export const queryUserMoneyDetails = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/moneyDetails/queryUserMoneyDetails',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改提现账号
|
||||||
|
*/
|
||||||
|
export const updateUser = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/user/updateUser',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取看广告状态
|
||||||
|
*/
|
||||||
|
export const canCash = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/cash/canCash',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告状态修改
|
||||||
|
*/
|
||||||
|
export const state = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/ad/state',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告状态修改
|
||||||
|
*/
|
||||||
|
export const withdraw = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/cash/withdraw',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
32
api/share/index.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import http from '@/http/http.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已邀请列表
|
||||||
|
*/
|
||||||
|
export const selectInviteByUserIdLists = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/invite/selectInviteByUserIdLists',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取邀请战绩
|
||||||
|
*/
|
||||||
|
export const selectInviteMoney = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/invite/selectInviteMoney',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取海报数据
|
||||||
|
*/
|
||||||
|
export const selectBannerList = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/banner/selectBannerList',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -8,4 +8,15 @@ export const selectUserById = (data) => {
|
|||||||
url: '/user/selectUserById',
|
url: '/user/selectUserById',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户信息
|
||||||
|
*/
|
||||||
|
export const updateUsers = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/user/updateUsers',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ function request(args) {
|
|||||||
result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + "&"
|
result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + "&"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
url = url+'?'+result
|
url = url+'?'+(result.slice(0,result.length-1))
|
||||||
params = null
|
params = null
|
||||||
}
|
}
|
||||||
let headerObject = {}
|
let headerObject = {}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"appid" : "__UNI__E0B05B1",
|
"appid" : "__UNI__E0B05B1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : 100,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
79
pages.json
@@ -28,7 +28,7 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/task/index",
|
"path": "pages/task/index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -42,13 +42,47 @@
|
|||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/watching_history/watching_history"
|
"path": "pages/watching_history/watching_history",
|
||||||
|
"style": {
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/me/index",
|
"path": "pages/me/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/contact",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "联系客服"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/gold_record",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "金币明细",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/feedback",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "意见反馈"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/help_center",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "帮助中心"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/setting",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "设置"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/help_center_detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -61,6 +95,11 @@
|
|||||||
"navigationBarTitleText": "注册",
|
"navigationBarTitleText": "注册",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/login/bind",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "修改手机号"
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/login/registerApp",
|
"path": "pages/login/registerApp",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -73,6 +112,11 @@
|
|||||||
"navigationBarTitleText": "忘记密码",
|
"navigationBarTitleText": "忘记密码",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/login/download",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "下载"
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/me/userInfo",
|
"path": "pages/me/userInfo",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -88,6 +132,37 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "服务协议"
|
"navigationBarTitleText": "服务协议"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/message",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "消息中心"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/withdraw/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "申请提现",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/withdraw/realName",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "实名认证"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/withdraw/alipay",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "提现账号"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/me/withdraw/moneyList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "红包明细"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/share/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "分享"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/index/search/index",
|
"path": "pages/index/search/index",
|
||||||
|
|||||||
@@ -53,12 +53,15 @@ import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
|||||||
async function selectByUserIdAjax() {
|
async function selectByUserIdAjax() {
|
||||||
try {
|
try {
|
||||||
const res1 = await selectByUserId({ page: 1, limit: 6, classify: 3 });
|
const res1 = await selectByUserId({ page: 1, limit: 6, classify: 3 });
|
||||||
const res2 = await selectByUserId({ page: 1, limit: 6, classify: 6 });
|
const res2 = await selectByUserId({ page: 1, limit: 6, classify: 1 });
|
||||||
data.list1 = res1.records;
|
data.list1 = res1.records;
|
||||||
data.list2 = res2.records;
|
data.list2 = res2.records;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
|
|||||||
@@ -1,303 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="containersView">
|
|
||||||
<div style="width: 100%;height: 85%;position: absolute;background: url('../../static/images/appeq_bg.png') no-repeat center bottom / cover;"></div>
|
|
||||||
|
|
||||||
<view style="text-align: center;position: relative;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
|
|
||||||
<image style="width: 124rpx;height: 124rpx;margin-top: -920rpx;border-radius:20upx;" src="../../static/images/appLogo.png"></image>
|
|
||||||
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view>
|
|
||||||
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
|
|
||||||
<button class="confirm-btn" @click="taobaoLogin">{{confirmBtn}}</button>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view id="shareit" v-if="show_share" @tap="closeShare">
|
|
||||||
<image class="arrow" src="https://renwu.xiansqx.com/img/20210813/9aa484db4c60458f86deb2a8ab6fe400.png">
|
|
||||||
</image>
|
|
||||||
<view id="follow">点击右上角按钮,选择浏览器打开下载!</view>
|
|
||||||
</view>
|
|
||||||
<!-- #ifdef H5 -->
|
|
||||||
<div v-if="isWeixin" style="width: 100%;height: 100%;position: absolute;top: 0;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"></div>
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mobile: '',
|
|
||||||
code: '',
|
|
||||||
message: '',
|
|
||||||
show_share: false,
|
|
||||||
openShare: false,
|
|
||||||
openShares: false,
|
|
||||||
relationId: '',
|
|
||||||
sending: false,
|
|
||||||
confirmBtn: '斯耀短剧APP',
|
|
||||||
isWeixin: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
let u = navigator.userAgent;
|
|
||||||
if ( u.indexOf('iPhone') > -1) {
|
|
||||||
// #ifdef H5
|
|
||||||
this.confirmBtn = "跳转网页版首页"
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
|
||||||
this.isWeixin = true
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
closeShare() {
|
|
||||||
this.show_share = false;
|
|
||||||
},
|
|
||||||
taobaoLogin() {
|
|
||||||
|
|
||||||
var u = navigator.userAgent;
|
|
||||||
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
|
||||||
this.$Request.get('/app/common/type/49').then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
if (res.data && res.data.value) {
|
|
||||||
if (this.openShare) {
|
|
||||||
let ua = navigator.userAgent.toLowerCase();
|
|
||||||
if (ua.indexOf('micromessenger') === -1) {
|
|
||||||
this.show_share = false;
|
|
||||||
// #ifndef H5
|
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
|
||||||
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
window.location.href = res.data.value;
|
|
||||||
// #endif
|
|
||||||
} else {
|
|
||||||
this.show_share = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// #ifndef H5
|
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
|
||||||
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
uni.setClipboardData({
|
|
||||||
data: res.data.value,
|
|
||||||
success: r => {
|
|
||||||
// this.$queue.showToast('邀请码复制成功');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
window.location.href = res.data.value;
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
|
|
||||||
this.$Request.get('/app/common/type/50').then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
if (res.data && res.data.value) {
|
|
||||||
if (this.openShares) {
|
|
||||||
let ua = navigator.userAgent.toLowerCase();
|
|
||||||
if (ua.indexOf('micromessenger') === -1) {
|
|
||||||
this.show_share = false;
|
|
||||||
// #ifndef H5
|
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
|
||||||
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
window.location.href = res.data.value;
|
|
||||||
// uni.switchTab({
|
|
||||||
// url: 'pages/index/index'
|
|
||||||
// })
|
|
||||||
// #endif
|
|
||||||
} else {
|
|
||||||
this.show_share = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// #ifndef H5
|
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
|
||||||
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
uni.setClipboardData({
|
|
||||||
data: res.data.value,
|
|
||||||
success: r => {
|
|
||||||
// this.$queue.showToast('邀请码复制成功');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
// window.location.href = res.data.value;
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
uni-page-body{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.containersView {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
#shareit {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
position: fixed;
|
|
||||||
/*width: 100%;*/
|
|
||||||
height: 2000px;
|
|
||||||
background: rgba(0, 0, 0, 0.85);
|
|
||||||
text-align: center;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#shareit img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.arrow {
|
|
||||||
width: 100px;
|
|
||||||
height: 150px;
|
|
||||||
position: absolute;
|
|
||||||
right: 5%;
|
|
||||||
top: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#follow {
|
|
||||||
margin-right: 60px;
|
|
||||||
margin-left: 30px;
|
|
||||||
width: 90%;
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
text-align: left;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 18px;
|
|
||||||
color: white;
|
|
||||||
float: left;
|
|
||||||
margin-top: 160px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
padding-left: 140upx;
|
|
||||||
margin-top: 32upx;
|
|
||||||
font-size: 24upx;
|
|
||||||
color: #666666;
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
page {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.send-msg {
|
|
||||||
border-radius: 30px;
|
|
||||||
color: black;
|
|
||||||
background: white;
|
|
||||||
height: 30px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
top: 0;
|
|
||||||
padding-top: 50px;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
position: relative;
|
|
||||||
z-index: 90;
|
|
||||||
background: #fff;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.right-top-sign {
|
|
||||||
position: absolute;
|
|
||||||
top: 40px;
|
|
||||||
right: -15px;
|
|
||||||
z-index: 95;
|
|
||||||
|
|
||||||
&:before,
|
|
||||||
&:after {
|
|
||||||
display: block;
|
|
||||||
content: '';
|
|
||||||
width: 20px;
|
|
||||||
height: 40px;
|
|
||||||
background: #e10a07;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
transform: rotate(50deg);
|
|
||||||
border-radius: 0 50px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
position: absolute;
|
|
||||||
right: -198px;
|
|
||||||
top: 0;
|
|
||||||
transform: rotate(-50deg);
|
|
||||||
border-radius: 50px 0 0 0;
|
|
||||||
/* background: pink; */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-bottom-sign {
|
|
||||||
position: absolute;
|
|
||||||
left: -270px;
|
|
||||||
bottom: -320px;
|
|
||||||
/*border: 100upx solid #d0d1fd;*/
|
|
||||||
border-radius: 50%;
|
|
||||||
padding: 90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.welcome {
|
|
||||||
position: relative;
|
|
||||||
left: 30px;
|
|
||||||
top: -55px;
|
|
||||||
font-size: 28px;
|
|
||||||
color: #555;
|
|
||||||
text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-content {
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm-btn {
|
|
||||||
width: 416rpx;
|
|
||||||
height: 90rpx;
|
|
||||||
line-height: 90rpx;
|
|
||||||
background: #FD5775;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #FFFFFF;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 70rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,27 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="containerView">
|
<view class="container">
|
||||||
<view class="cu-form-group"
|
<view class="cu-form-group" >
|
||||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
|
||||||
<view class="title">手机号</view>
|
<view class="title">手机号</view>
|
||||||
<input type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
<input type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||||
@input="inputChange" />
|
@input="inputChange" />
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-form-group"
|
<view class="cu-form-group" >
|
||||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
|
||||||
<text class="title">验证码</text>
|
<text class="title">验证码</text>
|
||||||
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
|
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
|
||||||
@confirm="toLogin" />
|
@confirm="toLogin" />
|
||||||
<button class="send-msg" @click="sendMsg" :disabled="sendIng">{{ sendTime }}</button>
|
<button class="send-msg" @click="sendMsg" :disabled="data.sendIng">{{ data.sendTime }}</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<button class="confirm-btn" @click="toLogin" :disabled="loginIng">立即绑定</button>
|
<button class="confirm-btn" @click="toLogin">立即绑定</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import {setSendMsg,forgetPwd} from '@/api/login/login.js';
|
import { setSendMsg, bind} from '@/api/login/login.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
mobile: '',
|
mobile: '',
|
||||||
code: '',
|
code: '',
|
||||||
@@ -30,8 +29,7 @@
|
|||||||
sendTime: '获取验证码',
|
sendTime: '获取验证码',
|
||||||
count: 60,
|
count: 60,
|
||||||
type: '',
|
type: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
if (option.type) {
|
if (option.type) {
|
||||||
data.type = option.type
|
data.type = option.type
|
||||||
@@ -55,140 +53,147 @@
|
|||||||
data.count = count - 1;
|
data.count = count - 1;
|
||||||
data.sendIng = true;
|
data.sendIng = true;
|
||||||
data.sendTime = count - 1 + '秒后重新获取';
|
data.sendTime = count - 1 + '秒后重新获取';
|
||||||
setTimeout(data.countDown.bind(data), 1000);
|
setTimeout(countDown.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMsg() {
|
async function sendMsg() {
|
||||||
const {
|
const { mobile } = data;
|
||||||
mobile
|
if (!data.mobile) {
|
||||||
} = data;
|
uni.showToast({ title: '请输入手机号', icon: 'none', })
|
||||||
if (!mobile) {
|
|
||||||
data.$queue.showToast("请输入手机号");
|
|
||||||
} else if (mobile.length !== 11) {
|
} else if (mobile.length !== 11) {
|
||||||
data.$queue.showToast("请输入正确的手机号");
|
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
|
||||||
} else {
|
} else {
|
||||||
data.$queue.showLoading("正在发送验证码...");
|
uni.showLoading({
|
||||||
http.request({
|
title: '正在发送验证码...'
|
||||||
url: 'app/Login/sendMsg/' + mobile + '/gzg',
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
data.sendIng = true;
|
|
||||||
uni.showToast({ title: '验证码发送成功请注意查收', icon: 'none', })
|
|
||||||
data.countDown();
|
|
||||||
} else {
|
|
||||||
uni.showModal({
|
|
||||||
showCancel: false,
|
|
||||||
title: '短信发送失败',
|
|
||||||
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.hideLoading();
|
|
||||||
})
|
})
|
||||||
|
let res = await setSendMsg(data.mobile,'gzg')
|
||||||
|
uni.hideLoading();
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 0) {
|
||||||
|
data.sendIng = true;
|
||||||
|
uni.showToast({ title: '验证码发送成功请注意查收', icon: 'none', })
|
||||||
|
countDown();
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
showCancel: false,
|
||||||
|
title: '短信发送失败',
|
||||||
|
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toLogin() {
|
async function toLogin() {
|
||||||
const {
|
const {
|
||||||
mobile,
|
mobile,
|
||||||
code
|
code
|
||||||
} = data;
|
} = data;
|
||||||
let userId = this.$queue.getData("userId");
|
if (!data.mobile) {
|
||||||
if (!mobile) {
|
|
||||||
uni.showToast({ title: '请输入手机号', icon: 'none', })
|
uni.showToast({ title: '请输入手机号', icon: 'none', })
|
||||||
} else if (mobile.length !== 11) {
|
} else if (data.mobile.length !== 11) {
|
||||||
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
|
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
|
||||||
} else if (!code) {
|
} else if (!data.code) {
|
||||||
uni.showToast({ title: '请输入验证码', icon: 'none', })
|
uni.showToast({ title: '请输入验证码', icon: 'none', })
|
||||||
} else {
|
} else {
|
||||||
uni.showLoading({ title: '正在绑定中...' })
|
uni.showLoading({ title: '正在绑定中...' })
|
||||||
let openId = this.$queue.getData('openId') ? this.$queue.getData('openId') : '';
|
|
||||||
let openidnickname = this.$queue.getData('openidnickname') ? this.$queue.getData('openidnickname') :
|
|
||||||
'';
|
|
||||||
let openidheadimgurl = this.$queue.getData('openidheadimgurl') ? this.$queue.getData(
|
|
||||||
'openidheadimgurl') : '';
|
|
||||||
let invitation = this.$queue.getData('inviterCode') ? this.$queue.getData('inviterCode') : '';
|
|
||||||
let userId = this.$queue.getData('userId') ? this.$queue.getData('userId') : '';
|
|
||||||
|
|
||||||
http.request({
|
let res = await bind({
|
||||||
url: `app/Login/registerCode`,
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
|
||||||
phone: mobile,
|
phone: mobile,
|
||||||
wxId: openId,
|
// wxId: openId,
|
||||||
userId: userId,
|
// userId: userId,
|
||||||
inviterCode: invitation,
|
// inviterCode: invitation,
|
||||||
avatar: openidheadimgurl,
|
// avatar: openidheadimgurl,
|
||||||
userName: openidnickname,
|
// userName: openidnickname,
|
||||||
msg: code
|
msg: code
|
||||||
}
|
})
|
||||||
}).then(res => {
|
uni.hideLoading();
|
||||||
if (res.code === 0) {
|
|
||||||
this.$queue.setData("token", res.token);
|
uni.setStorageSync('token', res.token)
|
||||||
this.$queue.setData('userId', res.user.userId);
|
uni.setStorageSync('userInfo', res.user)
|
||||||
this.$queue.setData('userName', res.user.userName);
|
uni.showToast({ title: '绑定成功', icon: 'none', })
|
||||||
this.$queue.setData('phone', res.user.phone);
|
setTimeout(function() {
|
||||||
this.$queue.setData('avatar', res.user.avatar ? res.user.avatar :
|
uni.navigateBack()
|
||||||
'../../static/logo.png');
|
}, 1000)
|
||||||
this.$queue.showToast('绑定成功');
|
|
||||||
uni.showToast({ title: '绑定成功', icon: 'none', })
|
|
||||||
setTimeout(function() {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 1000)
|
|
||||||
} else {
|
|
||||||
uni.showModal({
|
|
||||||
showCancel: false,
|
|
||||||
title: '绑定失败',
|
|
||||||
content: res.msg,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss'>
|
<style lang='scss' scoped>
|
||||||
page {
|
page {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.send-msg {
|
.container {
|
||||||
border-radius: 30px;
|
padding-top: 32rpx;
|
||||||
color: white;
|
|
||||||
height: 30px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 30px;
|
|
||||||
background: #557EFD;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containerView {
|
|
||||||
top: 0;
|
|
||||||
padding-top: 32upx;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
.cu-form-group{
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 1rpx 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 80rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 30rpx;
|
||||||
|
border: 2rpx solid whitesmoke;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
border-radius: 60rpx
|
||||||
|
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
text-align: justify;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-input{
|
||||||
|
flex: 1;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #555;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
.send-msg {
|
||||||
|
border-radius: 30px;
|
||||||
|
color: white;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 30px;
|
||||||
|
background: #ff7581;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border: none;
|
||||||
|
&:after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
width: 600upx;
|
width: 300px;
|
||||||
height: 80upx;
|
height: 42px;
|
||||||
line-height: 80upx;
|
line-height: 42px;
|
||||||
border-radius: 60upx;
|
border-radius: 30px;
|
||||||
margin-top: 32upx;
|
margin-top: 70px;
|
||||||
background: #557EFD;
|
background: #ff7581;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 32upx;
|
font-size: 16px;
|
||||||
|
margin: 0 auto;
|
||||||
&:after {
|
&:after {
|
||||||
border-radius: 60px;
|
border: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
149
pages/login/download.vue
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<template>
|
||||||
|
<view class="containers">
|
||||||
|
<div class="bg" style="background: url('/static/download/appeq_bg.png') no-repeat center bottom / cover;"></div>
|
||||||
|
|
||||||
|
<view class="content">
|
||||||
|
<image class="logo" src="/static/download/appLogo.png"></image>
|
||||||
|
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view>
|
||||||
|
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
|
||||||
|
<button class="confirm-btn" @click="download">{{data.confirmBtn}}</button>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<div v-if="data.isWeixin" style="width: 100%;height: 100%;position: absolute;top: 0;background: url('/static/download/open_guide.png') no-repeat center bottom / cover;"></div>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
|
import { commonType } from '@/api/init.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
openShare: false,
|
||||||
|
openShares: false,
|
||||||
|
confirmBtn: '斯耀短剧APP',
|
||||||
|
isWeixin: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
let u = navigator.userAgent;
|
||||||
|
if ( u.indexOf('iPhone') > -1) {
|
||||||
|
// #ifdef H5
|
||||||
|
data.confirmBtn = "跳转网页版首页"
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
||||||
|
data.isWeixin = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function download() {
|
||||||
|
var u = navigator.userAgent;
|
||||||
|
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
||||||
|
commonType(49).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
if (res.data && res.data.value) {
|
||||||
|
// #ifndef H5
|
||||||
|
plus.runtime.openURL(res.data.value, function(res) {
|
||||||
|
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: res.data.value,
|
||||||
|
success: r => {
|
||||||
|
// this.$queue.showToast('邀请码复制成功');
|
||||||
|
uni.showToast({
|
||||||
|
title: '邀请码复制成功',
|
||||||
|
icon: 'none',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.location.href = res.data.value;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
commonType(50).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
if (res.data && res.data.value) {
|
||||||
|
// #ifndef H5
|
||||||
|
plus.runtime.openURL(res.data.value, function(res) {
|
||||||
|
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: res.data.value,
|
||||||
|
success: r => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '邀请码复制成功',
|
||||||
|
icon: 'none',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
// window.location.href = res.data.value;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
uni-page-body{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.containers {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.bg{
|
||||||
|
width: 100%;
|
||||||
|
height: 85%;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.logo{
|
||||||
|
width: 124rpx;
|
||||||
|
height: 124rpx;
|
||||||
|
margin-top: -920rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-btn {
|
||||||
|
width: 416rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
background: #FD5775;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 70rpx;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
|
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||||
<view class="bg" >
|
<view class="bg" >
|
||||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -74,7 +75,7 @@
|
|||||||
title: '验证码发送成功请注意查收',
|
title: '验证码发送成功请注意查收',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
data.countDown();
|
countDown();
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
@@ -98,7 +99,7 @@
|
|||||||
data.count = count - 1;
|
data.count = count - 1;
|
||||||
data.sending = true;
|
data.sending = true;
|
||||||
data.sendTime = count - 1 + '秒后重新获取';
|
data.sendTime = count - 1 + '秒后重新获取';
|
||||||
setTimeout(data.countDown.bind(data), 1000);
|
setTimeout(countDown.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,9 +180,7 @@
|
|||||||
padding-top: 48rpx;
|
padding-top: 48rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.flex{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.footerView {
|
.footerView {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -214,6 +213,8 @@
|
|||||||
color: #EC6F48;
|
color: #EC6F48;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
.send-msg::after{
|
.send-msg::after{
|
||||||
border: none;
|
border: none;
|
||||||
@@ -258,6 +259,9 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
|
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||||
<view class="bg" >
|
<view class="bg" >
|
||||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -18,14 +19,14 @@
|
|||||||
<view class="input flex" style="padding-left: 0;">
|
<view class="input flex" style="padding-left: 0;">
|
||||||
<input class="input" type="password" :value="data.password" placeholder="请输入密码" placeholder-class="input-empty"
|
<input class="input" type="password" :value="data.password" placeholder="请输入密码" placeholder-class="input-empty"
|
||||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
|
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
|
||||||
<text class="send-msg" @click="forget" style="flex-shrink: 0;">忘记密码</text>
|
<text class="send-msg" @click="linkTo('/pages/login/forgetPwd')" style="flex-shrink: 0;">忘记密码</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="confirm-btn" @click="toLogin">登录</button>
|
<button class="confirm-btn" @click="toLogin">登录</button>
|
||||||
<view style="margin-top: 32px;text-align: center">
|
<view style="margin-top: 32px;text-align: center">
|
||||||
<view>
|
<view>
|
||||||
没有账号?
|
没有账号?
|
||||||
<text style="color: #ff7581" @click="register()">立即注册</text>
|
<text style="color: #ff7581" @click="linkTo('/pages/login/register')">立即注册</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -35,9 +36,9 @@
|
|||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
<view>同意</view>
|
<view>同意</view>
|
||||||
<!-- 协议地址 -->
|
<!-- 协议地址 -->
|
||||||
<navigator url="/pages/me/privacy" open-type="navigate">《隐私政策》</navigator>
|
<view @click="linkTo('/pages/me/privacy')">《隐私政策》</view>
|
||||||
和
|
和
|
||||||
<navigator url="/pages/me/agreement" open-type="navigate">《用户服务协议》</navigator>
|
<view @click="linkTo('/pages/me/agreement')">《用户服务协议》</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import { login } from '@/api/login/login.js';
|
import { login } from '@/api/login/login.js';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
mobile: '',
|
mobile: '',
|
||||||
password: '',
|
password: '',
|
||||||
@@ -59,24 +61,6 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册
|
|
||||||
*/
|
|
||||||
function register () {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/login/register'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 忘记密码
|
|
||||||
*/
|
|
||||||
function forget () {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/login/forgetPwd'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取手机号/密码
|
* 获取手机号/密码
|
||||||
*/
|
*/
|
||||||
@@ -130,17 +114,19 @@
|
|||||||
})
|
})
|
||||||
console.log(res)
|
console.log(res)
|
||||||
uni.setStorageSync('token', res.token)
|
uni.setStorageSync('token', res.token)
|
||||||
uni.setStorageSync('userId', res.user.userId)
|
uni.setStorageSync('userInfo', res.user)
|
||||||
uni.setStorageSync('userName', res.user.userName)
|
|
||||||
uni.setStorageSync('avatar', res.user.avatar ? res.user.avatar : '../../static/default/avatar.png')
|
// uni.setStorageSync('userId', res.user.userId)
|
||||||
uni.setStorageSync('phone', res.user.phone)
|
// uni.setStorageSync('userName', res.user.userName)
|
||||||
uni.setStorageSync('invitationCode', res.user.invitationCode)
|
// uni.setStorageSync('avatar', res.user.avatar ? res.user.avatar : '../../static/default/avatar.png')
|
||||||
uni.setStorageSync('sex', res.user.sex)
|
// uni.setStorageSync('phone', res.user.phone)
|
||||||
uni.setStorageSync('userId', res.user.userId)
|
// uni.setStorageSync('invitationCode', res.user.invitationCode)
|
||||||
|
// uni.setStorageSync('sex', res.user.sex)
|
||||||
|
// uni.setStorageSync('userId', res.user.userId)
|
||||||
//设置渠道码
|
//设置渠道码
|
||||||
if (res.user.qdCode) {
|
// if (res.user.qdCode) {
|
||||||
uni.setStorageSync('qdCode', res.user.qdCode)
|
// uni.setStorageSync('qdCode', res.user.qdCode)
|
||||||
}
|
// }
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
|
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||||
<view class="bg" >
|
<view class="bg" >
|
||||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -35,9 +36,10 @@
|
|||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
<view>注册即同意</view>
|
<view>注册即同意</view>
|
||||||
<!-- 协议地址 -->
|
<!-- 协议地址 -->
|
||||||
<navigator url="/pages/me/privacy" open-type="navigate" style="color: #37A6FF;">《隐私政策》</navigator>
|
<view @click="linkTo('/pages/me/privacy')" style="color: #37A6FF;">《隐私政策》</view>
|
||||||
与
|
和
|
||||||
<navigator url="/pages/me/agreement" open-type="navigate" style="color: #37A6FF;">《用户协议》</navigator>
|
<view @click="linkTo('/pages/me/agreement')" style="color: #37A6FF;">《用户服务协议》</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -48,7 +50,7 @@
|
|||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
||||||
import {commonType} from '@/api/init.js';
|
import {commonType} from '@/api/init.js';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
code: '',
|
code: '',
|
||||||
@@ -81,13 +83,11 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入手机号',
|
title: '请输入手机号',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
|
||||||
})
|
})
|
||||||
} else if (data.mobile.length !== 11) {
|
} else if (data.mobile.length !== 11) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入正确的手机号',
|
title: '请输入正确的手机号',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
data.countDown();
|
countDown();
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
data.count = count - 1;
|
data.count = count - 1;
|
||||||
data.sending = true;
|
data.sending = true;
|
||||||
data.sendTime = count - 1 + '秒后重新获取';
|
data.sendTime = count - 1 + '秒后重新获取';
|
||||||
setTimeout(data.countDown.bind(data), 1000);
|
setTimeout(countDown.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,6 +374,9 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import config from '@/commons/config.js';
|
|
||||||
import {selectUserById} from '@/api/user/user.js';
|
|
||||||
import {commonType} from '@/api/init.js';
|
import {commonType} from '@/api/init.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
|
|||||||
74
pages/me/contact.vue
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="card">
|
||||||
|
<view class="title">
|
||||||
|
<view class="t1">添加客服微信咨询</view>
|
||||||
|
<view class="t2">{{ info.wx }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<image class="img" :src="info.qrcode" mode="widthFix" @click="checkQrcode"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import { commonType } from '@/api/me/me.js';
|
||||||
|
|
||||||
|
const info = ref({});
|
||||||
|
async function commonTypeAjax() {
|
||||||
|
try {
|
||||||
|
const res1 = await commonType(205);
|
||||||
|
const res2 = await commonType(207);
|
||||||
|
info.value.wx = res2.value;
|
||||||
|
info.value.qrcode = res1.value;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 预览二维码
|
||||||
|
function checkQrcode() {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [info.value.qrcode]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
commonTypeAjax();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
page {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
padding: 28upx;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
padding: 28upx;
|
||||||
|
border-radius: 20upx;
|
||||||
|
background-color: #fff;
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
.t1 {
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 28upx;
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
124
pages/me/feedback.vue
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="card">
|
||||||
|
<view class="title-wrap">
|
||||||
|
<view class="title">问题和意见</view>
|
||||||
|
<view class="right" @click="showSheet = true">快速键入</view>
|
||||||
|
</view>
|
||||||
|
<view class="ipt-wrap">
|
||||||
|
<up-textarea v-model="form.content" placeholder="请详细描述你的问题和意见..." count></up-textarea>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card">
|
||||||
|
<view class="title-wrap">
|
||||||
|
<view class="title">QQ/邮箱</view>
|
||||||
|
</view>
|
||||||
|
<view class="ipt-wrap">
|
||||||
|
<up-input v-model="form.contact" placeholder="方便我们联系你 " count></up-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn">
|
||||||
|
<up-button color="#ff7581" :loading="loaing" loading-text="提交中..." @click="confirmHandle">提交</up-button>
|
||||||
|
</view>
|
||||||
|
<up-action-sheet
|
||||||
|
:actions="list"
|
||||||
|
:show="showSheet"
|
||||||
|
cancelText="取消"
|
||||||
|
closeOnClickAction
|
||||||
|
closeOnClickOverlay
|
||||||
|
@close="showSheet = false"
|
||||||
|
@select="selectSheet"
|
||||||
|
></up-action-sheet>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { sendMessage } from '@/api/me/me.js';
|
||||||
|
|
||||||
|
const list = ref([
|
||||||
|
{
|
||||||
|
name: '界面显示错乱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '启动缓慢,卡出翔了'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'UI无法直视,丑哭了'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '偶发性崩溃'
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
const showSheet = ref(false);
|
||||||
|
|
||||||
|
const loaing = ref(false);
|
||||||
|
const form = reactive({
|
||||||
|
content: '',
|
||||||
|
contact: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
function selectSheet(e) {
|
||||||
|
if (!form.content.length) {
|
||||||
|
form.content = e.name;
|
||||||
|
} else {
|
||||||
|
form.content += `、${e.name}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
async function confirmHandle() {
|
||||||
|
try {
|
||||||
|
if (!form.content) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入内容',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!form.contact) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入联系方式',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loaing.value = true;
|
||||||
|
await sendMessage({
|
||||||
|
content: JSON.stringify({ score: 5, ...form }),
|
||||||
|
state: 2,
|
||||||
|
title: form.contact
|
||||||
|
});
|
||||||
|
uni.showToast({
|
||||||
|
title: '提交成功',
|
||||||
|
icon: 'none',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack();
|
||||||
|
}, 1000);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
loaing.value = false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
padding: 0 20upx;
|
||||||
|
font-size: 28upx;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
margin-bottom: 28upx;
|
||||||
|
.title-wrap {
|
||||||
|
padding: 28upx 0;
|
||||||
|
color: #999;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
padding: 28upx 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
91
pages/me/gold_record.vue
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="list">
|
||||||
|
<view class="item" v-for="item in listData.list" :key="item.id">
|
||||||
|
<view class="row">类型:{{ item.title }}</view>
|
||||||
|
<view class="row">内容:{{ item.content }}</view>
|
||||||
|
<view class="row">时间:{{ item.createTime }}</view>
|
||||||
|
<view class="btm">+{{ item.money }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<emprty-card v-if="!listData.list.length && listData.status == 'nomore'" />
|
||||||
|
<up-loadmore :status="listData.status" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
|
import { queryUserMoneyDetails } from '@/api/me/me.js';
|
||||||
|
|
||||||
|
const listData = reactive({
|
||||||
|
list: [],
|
||||||
|
page: 1,
|
||||||
|
size: 10,
|
||||||
|
status: 'loading'
|
||||||
|
});
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
try {
|
||||||
|
const res = await queryUserMoneyDetails({
|
||||||
|
page: listData.page,
|
||||||
|
limit: listData.size,
|
||||||
|
moneyType: 2,
|
||||||
|
viewType: 2
|
||||||
|
});
|
||||||
|
if (listData.page == 1) {
|
||||||
|
listData.list = res.records;
|
||||||
|
} else {
|
||||||
|
listData.list.push(...res.records);
|
||||||
|
}
|
||||||
|
if (res.currPage >= res.totalPage) {
|
||||||
|
listData.status = 'nomore';
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 监听下拉结束
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
listData.page = 1;
|
||||||
|
listData.status = 'loading';
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad((e) => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
padding: 28upx;
|
||||||
|
}
|
||||||
|
.list {
|
||||||
|
.item {
|
||||||
|
padding: 28upx;
|
||||||
|
border-radius: 20upx;
|
||||||
|
margin-bottom: 28upx;
|
||||||
|
background: #fff;
|
||||||
|
.row {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
font-size: 28upx;
|
||||||
|
}
|
||||||
|
.btm {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
color: rgb(253, 100, 22);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
88
pages/me/help_center.vue
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<up-collapse accordion>
|
||||||
|
<up-collapse-item :title="item.helpClassifyName" :name="item.helpClassifyId" v-for="item in list" :key="item.helpClassifyId">
|
||||||
|
<view class="row-wrap">
|
||||||
|
<view class="u-collapse-content row" v-for="val in item.helpWordList" :key="val.helpWordId" @click="toHelpDetal(val)">
|
||||||
|
{{ val.helpWordTitle }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-collapse-item>
|
||||||
|
</up-collapse>
|
||||||
|
<view class="footer-wrap">
|
||||||
|
<view class="footer">
|
||||||
|
<view class="item" @click="linkTo('/pages/me/contact')">
|
||||||
|
<up-icon name="email" size="24" />
|
||||||
|
联系客服
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="linkTo('/pages/me/feedback')">
|
||||||
|
<up-icon name="edit-pen" size="24" />
|
||||||
|
意见反馈
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import { selectHelpList } from '@/api/me/me.js';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
|
// 获取帮助中心列表
|
||||||
|
const list = ref([]);
|
||||||
|
async function selectHelpListAjax() {
|
||||||
|
try {
|
||||||
|
const res = await selectHelpList({ types: 1 });
|
||||||
|
list.value = res;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function toHelpDetal(item) {
|
||||||
|
uni.setStorageSync('helpDetail', item);
|
||||||
|
linkTo('/pages/me/help_center_detail');
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
selectHelpListAjax();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.footer-wrap {
|
||||||
|
padding: 28upx;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 99;
|
||||||
|
.footer {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
height: 108upx;
|
||||||
|
display: flex;
|
||||||
|
border-radius: 20upx;
|
||||||
|
.item {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
|
position: relative;
|
||||||
|
&:first-child {
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
height: 20upx;
|
||||||
|
border-right: 1upx solid #999;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -10upx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
27
pages/me/help_center_detail.vue
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<rich-text :nodes="content.helpWordContent"></rich-text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
const content = ref('');
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
content.value = uni.getStorageSync('helpDetail');
|
||||||
|
const regex = new RegExp('img', 'gi');
|
||||||
|
content.value.helpWordContent = content.value.helpWordContent.replace(regex, `img style="width:100%;"`);
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: content.value.helpWordTitle
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
padding: 28upx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,29 +9,31 @@
|
|||||||
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="quick-menu">
|
<view class="quick-menu">
|
||||||
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @click="linkTo('/pages/share/index')"></image>
|
||||||
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" @click="linkTo('/pages/me/message', true)"></image>
|
||||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
<navigator hover-class="none" url="/pages/me/contact">
|
||||||
|
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
||||||
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="top">
|
<view class="top" @click="linkTo('/pages/me/userInfo')">
|
||||||
<image class="avatar" src="/static/default_avatar.png" mode="aspectFill"></image>
|
<image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"></image>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="name">159****3331</view>
|
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btm">
|
<view class="btm">
|
||||||
<view class="item">
|
<navigator class="item" hover-class="none" url="/pages/watching_history/watching_history?type=2">
|
||||||
<view class="title">我的喜欢</view>
|
<view class="title">我的喜欢</view>
|
||||||
<view class="num">0</view>
|
<view class="num">{{ likeData.likeCount }}</view>
|
||||||
</view>
|
</navigator>
|
||||||
<view class="item">
|
<navigator class="item" hover-class="none" url="/pages/watching_history/watching_history?type=1">
|
||||||
<view class="title">我的追剧</view>
|
<view class="title">我的追剧</view>
|
||||||
<view class="num">0</view>
|
<view class="num">{{ likeData.collectCount }}</view>
|
||||||
</view>
|
</navigator>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/me/withdraw/index')">
|
||||||
<view class="title">我的红包</view>
|
<view class="title">我的红包</view>
|
||||||
<view class="num">0</view>
|
<view class="num">{{ amount || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,63 +41,60 @@
|
|||||||
<view class="gold-wrap">
|
<view class="gold-wrap">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
||||||
<view class="num">123133.00</view>
|
<view class="num">{{ gold }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">金币明细</view>
|
<navigator hover-class="none" url="/pages/me/gold_record">
|
||||||
</view>
|
<view class="btn">金币明细</view>
|
||||||
<view class="title-wrap">
|
</navigator>
|
||||||
<view class="t">观看历史</view>
|
|
||||||
<up-icon name="arrow-right"></up-icon>
|
|
||||||
</view>
|
</view>
|
||||||
|
<navigator class="title-wrap" hover-class="none" url="/pages/watching_history/watching_history?type=3">
|
||||||
|
<view class="a">
|
||||||
|
<view class="t">观看历史</view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
|
</navigator>
|
||||||
<view class="history-list">
|
<view class="history-list">
|
||||||
<view class="item">
|
<view class="item" v-for="item in recordThree" :key="item.id">
|
||||||
<image class="cover" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
<image class="cover" :src="item.titleImg" mode="aspectFill"></image>
|
||||||
<view class="name">我在八零年代当后妈</view>
|
<view class="name">{{ item.title }}</view>
|
||||||
<view class="t">看到8集</view>
|
<view class="t">看到{{ item.courseDetailsName }}</view>
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<image class="cover" src="https://img2.baidu.com/it/u=3352094756,2708106394&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1422" mode="aspectFill"></image>
|
|
||||||
<view class="name">姜小姐的反击</view>
|
|
||||||
<view class="t">看到12集</view>
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<image class="cover" src="https://q0.itc.cn/images01/20240806/a14af4ece3354215be6294f3d2c264a4.jpeg" mode="aspectFill"></image>
|
|
||||||
<view class="name">霸道载誉归来</view>
|
|
||||||
<view class="t">看到3集</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="empty" style="padding-bottom: 20px" v-if="!recordThree.length">
|
||||||
|
<emprty-card></emprty-card>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-wrap">
|
<view class="card-wrap">
|
||||||
<view class="menu-list">
|
<view class="menu-list">
|
||||||
<view class="item">
|
<view class="item" @click="toTask">
|
||||||
<image class="icon" src="/static/me/menu_icon1.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon1.png" mode="aspectFit"></image>
|
||||||
<view class="name">任务中心</view>
|
<view class="name">任务中心</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/me/setting')">
|
||||||
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
|
||||||
<view class="name">设置中心</view>
|
<view class="name">设置中心</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/me/feedback', true)">
|
||||||
<image class="icon" src="/static/me/menu_icon3.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon3.png" mode="aspectFit"></image>
|
||||||
<view class="name">意见反馈</view>
|
<view class="name">意见反馈</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/me/help_center')">
|
||||||
<image class="icon" src="/static/me/menu_icon4.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon4.png" mode="aspectFit"></image>
|
||||||
<view class="name">帮助中心</view>
|
<view class="name">帮助中心</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/login/download')">
|
||||||
<image class="icon" src="/static/me/menu_icon5.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon5.png" mode="aspectFit"></image>
|
||||||
<view class="name">检查更新</view>
|
<view class="name">检查更新</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/me/agreement')">
|
||||||
<image class="icon" src="/static/me/menu_icon6.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon6.png" mode="aspectFit"></image>
|
||||||
<view class="name">用户协议</view>
|
<view class="name">用户协议</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<!-- <view class="item">
|
||||||
<image class="icon" src="/static/me/menu_icon7.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon7.png" mode="aspectFit"></image>
|
||||||
<view class="name">关于我们</view>
|
<view class="name">关于我们</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/me/privacy')">
|
||||||
<image class="icon" src="/static/me/menu_icon8.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon8.png" mode="aspectFit"></image>
|
||||||
<view class="name">隐私政策</view>
|
<view class="name">隐私政策</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -105,13 +104,77 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup></script>
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
|
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
|
const userInfo = ref({});
|
||||||
|
|
||||||
|
// 获取最近的三条观看历史
|
||||||
|
const recordThree = ref([]);
|
||||||
|
async function selectByUserIdAjax() {
|
||||||
|
try {
|
||||||
|
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
|
||||||
|
recordThree.value = res.records;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 我的喜欢 我的追剧
|
||||||
|
const likeData = reactive({
|
||||||
|
likeCount: 0,
|
||||||
|
collectCount: 0
|
||||||
|
});
|
||||||
|
async function collectVideoSummaryAjax() {
|
||||||
|
try {
|
||||||
|
const res = await collectVideoSummary();
|
||||||
|
likeData.likeCount = res.likeCount;
|
||||||
|
likeData.collectCount = res.collectCount;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 金币
|
||||||
|
const gold = ref(0);
|
||||||
|
const amount = ref(0);
|
||||||
|
async function selectUserMoneyAjax() {
|
||||||
|
try {
|
||||||
|
const res = await selectUserMoney();
|
||||||
|
gold.value = res.money;
|
||||||
|
amount.value = res.amount;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转任务中心
|
||||||
|
function toTask() {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/task/index'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
selectByUserIdAjax();
|
||||||
|
collectVideoSummaryAjax();
|
||||||
|
selectUserMoneyAjax();
|
||||||
|
});
|
||||||
|
onShow(() => {
|
||||||
|
userInfo.value = uni.getStorageSync('userInfo');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background: #f5f7ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
$bgColor: #f5f7ff;
|
$bgColor: #f5f7ff;
|
||||||
page {
|
|
||||||
background: $bgColor;
|
|
||||||
}
|
|
||||||
.container {
|
.container {
|
||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -173,7 +236,7 @@ page {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-size: 28upx;
|
font-size: 32upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btm {
|
.btm {
|
||||||
@@ -190,6 +253,8 @@ page {
|
|||||||
}
|
}
|
||||||
.num {
|
.num {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,19 +312,23 @@ page {
|
|||||||
}
|
}
|
||||||
.title-wrap {
|
.title-wrap {
|
||||||
padding: 28upx;
|
padding: 28upx;
|
||||||
display: flex;
|
.a {
|
||||||
align-items: center;
|
display: flex;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
.t {
|
justify-content: space-between;
|
||||||
font-size: 28upx;
|
.t {
|
||||||
|
font-size: 28upx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.history-list {
|
.history-list {
|
||||||
padding: 0 28upx 28upx;
|
padding: 0 28upx 28upx;
|
||||||
display: flex;
|
display: grid;
|
||||||
gap: 28upx;
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: 1fr;
|
||||||
|
grid-column-gap: 28upx;
|
||||||
|
grid-row-gap: 28upx;
|
||||||
.item {
|
.item {
|
||||||
flex: 1;
|
|
||||||
.cover {
|
.cover {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 280upx;
|
height: 280upx;
|
||||||
|
|||||||
99
pages/me/message.vue
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<!-- 消息中心 -->
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
|
||||||
|
<view v-if="data.msgList.length" class="list" v-for="(item,index) in data.msgList"
|
||||||
|
:key='index'>
|
||||||
|
<image class="icon" src="@/static/me/message.png" mode="aspectFit"></image>
|
||||||
|
<view class="item-right">
|
||||||
|
<view class="top">
|
||||||
|
<view class="title">{{item.title}}</view>
|
||||||
|
<view class="text-gray">{{item.createAt}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="text-gray">{{item.content}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<emprty-card v-if="!data.msgList.length" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
import { onLoad,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
|
import { selectMessageByUserId } from '@/api/me/message.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
msgList: []
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
getMsg()
|
||||||
|
})
|
||||||
|
async function getMsg() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
})
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
page: data.page,
|
||||||
|
limit: data.limit,
|
||||||
|
state: 5
|
||||||
|
}
|
||||||
|
let res = await selectMessageByUserId(params)
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
if (data.page == 1) {
|
||||||
|
data.msgList = res.list
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
return
|
||||||
|
}
|
||||||
|
data.msgList = [...data.msgList, ...res.list]
|
||||||
|
}
|
||||||
|
onReachBottom(() => {
|
||||||
|
data.page = data.page + 1;
|
||||||
|
getMsg()
|
||||||
|
})
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
data.page = 1;
|
||||||
|
data.msgList = []
|
||||||
|
getMsg()
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.list{
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
border-bottom: 1rpx solid #e4e7ed;
|
||||||
|
.icon{
|
||||||
|
width: 85rpx;
|
||||||
|
height: 85rpx;
|
||||||
|
}
|
||||||
|
.item-right{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
.top{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -11,8 +11,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import config from '@/commons/config.js';
|
|
||||||
import {selectUserById} from '@/api/user/user.js';
|
|
||||||
import {commonType} from '@/api/init.js';
|
import {commonType} from '@/api/init.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
|
|||||||
92
pages/me/setting.vue
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="list">
|
||||||
|
<view class="item" @click="linkTo('/pages/login/bind')">
|
||||||
|
<view class="title">修改手机号</view>
|
||||||
|
<up-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="linkTo('/pages/me/help_center')">
|
||||||
|
<view class="title">帮助中心</view>
|
||||||
|
<up-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="linkTo('/pages/me/feedback')">
|
||||||
|
<view class="title">意见反馈</view>
|
||||||
|
<up-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="linkTo('/pages/me/agreement')">
|
||||||
|
<view class="title">用户协议</view>
|
||||||
|
<up-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="linkTo('/pages/me/privacy')">
|
||||||
|
<view class="title">隐私协议</view>
|
||||||
|
<up-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="logout">
|
||||||
|
<view class="title">退出登录</view>
|
||||||
|
<up-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="version">{{ version }}</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
const version = ref('');
|
||||||
|
|
||||||
|
// 退出登录
|
||||||
|
function logout() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '注意',
|
||||||
|
content: '确定要退出登录吗?',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.clearStorageSync();
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
//#ifdef APP-PLUS
|
||||||
|
version.value = systemInfo.appWgtVersion;
|
||||||
|
//#endif
|
||||||
|
// #ifdef H5
|
||||||
|
version.value = systemInfo.appVersion;
|
||||||
|
// #endif
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
font-size: 28upx;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
.list {
|
||||||
|
padding-bottom: 120upx;
|
||||||
|
.item {
|
||||||
|
padding: 32upx 28upx;
|
||||||
|
border-bottom: 1upx solid #efefef;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.version {
|
||||||
|
width: 100%;
|
||||||
|
height: 120upx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<up-cell-group>
|
<up-cell-group>
|
||||||
<up-cell title="头像">
|
<up-cell title="头像">
|
||||||
<template #value>
|
<template #value>
|
||||||
<image :src="data.userInfo.avatar?data.userInfo.avatar:'../../static/default/avatar.png'" mode="" @click="uploadImg"
|
<image :src="data.userInfo.avatar?data.userInfo.avatar:'../../static/default/avatar.png'" mode="aspectFill" @click="uploadImg"
|
||||||
style="width: 111rpx;height: 111rpx;border-radius: 50%;"></image>
|
style="width: 111rpx;height: 111rpx;border-radius: 50%;"></image>
|
||||||
</template>
|
</template>
|
||||||
</up-cell>
|
</up-cell>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onShow} from '@dcloudio/uni-app'
|
import { onShow} from '@dcloudio/uni-app'
|
||||||
import config from '@/commons/config.js';
|
import config from '@/commons/config.js';
|
||||||
import {selectUserById} from '@/api/user/user.js';
|
import { selectUserById, updateUsers } from '@/api/user/user.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
userInfo: {
|
userInfo: {
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// console.log(1)
|
|
||||||
getUserInfo()
|
getUserInfo()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -46,9 +45,7 @@
|
|||||||
*/
|
*/
|
||||||
async function getUserInfo () {
|
async function getUserInfo () {
|
||||||
let res = await selectUserById()
|
let res = await selectUserById()
|
||||||
if ( res.code == 0 ) {
|
data.userInfo = res
|
||||||
data.userInfo = res.data
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,25 +127,25 @@
|
|||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: '确定保存信息',
|
content: '确定保存信息',
|
||||||
confirmColor: '#ff7581',
|
confirmColor: '#ff7581',
|
||||||
success: e => {
|
success: async e => {
|
||||||
if (e.confirm) {
|
if (e.confirm) {
|
||||||
http.request({
|
let res = await updateUsers({
|
||||||
url:'app/user/updateUsers',
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
|
||||||
userName: data.userInfo.userName,
|
userName: data.userInfo.userName,
|
||||||
avatar: data.userInfo.avatar,
|
avatar: data.userInfo.avatar,
|
||||||
phone: data.userInfo.phone,
|
phone: data.userInfo.phone,
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '保存成功',
|
|
||||||
icon: "none"
|
|
||||||
})
|
})
|
||||||
setTimeout(function() {
|
uni.showToast({
|
||||||
uni.navigateBack()
|
title: '保存成功',
|
||||||
}, 1000)
|
icon: "none"
|
||||||
})
|
})
|
||||||
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
|
userInfo.userName = data.userInfo.userName
|
||||||
|
userInfo.avatar = data.userInfo.avatar
|
||||||
|
userInfo.phone = data.userInfo.phone
|
||||||
|
uni.setStorageSync('userInfo', userInfo);
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
128
pages/me/withdraw/alipay.vue
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
<template>
|
||||||
|
<view class="containerView">
|
||||||
|
<up-cell-group :border="false">
|
||||||
|
<up-cell title="收款人姓名">
|
||||||
|
<template #right-icon> <up-input border="none" v-model="data.zhiFuBaoName" placeholder="请输入支付宝收款人姓名"></up-input> </template>
|
||||||
|
</up-cell>
|
||||||
|
<up-cell title="支付宝账号">
|
||||||
|
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
|
||||||
|
</up-cell>
|
||||||
|
</up-cell-group>
|
||||||
|
<button class="confirm-btn" @click="toLogin"
|
||||||
|
:disabled="data.logining">绑定账户</button>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款,请须知</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, nextTick, ref } from 'vue';
|
||||||
|
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
|
import { updateUser } from '@/api/me/withdraw.js';
|
||||||
|
import { commonType } from '@/api/init.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
zhiFuBao: null,
|
||||||
|
zhiFuBaoName: null,
|
||||||
|
logining: false
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
data.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
|
||||||
|
data.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
|
||||||
|
})
|
||||||
|
|
||||||
|
function inputChange(e) {
|
||||||
|
const key = e.currentTarget.dataset.key;
|
||||||
|
data[key] = e.detail.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toLogin() {
|
||||||
|
|
||||||
|
if (!data.zhiFuBaoName) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请设置收款人姓名',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else if (!data.zhiFuBao) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请设置收款人支付宝账号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
data.logining = true
|
||||||
|
let res = await updateUser({
|
||||||
|
zhiFuBao: data.zhiFuBao,
|
||||||
|
certName: data.zhiFuBaoName,
|
||||||
|
})
|
||||||
|
if( res) {
|
||||||
|
data.logining = false
|
||||||
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
|
userInfo.zhiFuBao = data.zhiFuBao
|
||||||
|
userInfo.zhiFuBaoName = data.zhiFuBaoName
|
||||||
|
uni.setStorageSync('userInfo', userInfo)
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改成功',
|
||||||
|
icon: 'none',
|
||||||
|
complete() {
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack();
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
page {
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.containerView {
|
||||||
|
padding:30rpx;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-btn1 {
|
||||||
|
width: 300px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
border-radius: 30px;
|
||||||
|
margin-top: 70upx;
|
||||||
|
/* background: whitesmoke; */
|
||||||
|
background: #ff7581;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 32rpx;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.confirm-btn {
|
||||||
|
width: 300px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
border-radius: 30px;
|
||||||
|
margin-top: 70upx;
|
||||||
|
background: #ff7581;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border: none;
|
||||||
|
&:after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
551
pages/me/withdraw/index.vue
Normal file
@@ -0,0 +1,551 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- <view class="navs" style="width: 100%;height: 96rpx;"></view> -->
|
||||||
|
<view class="nav">
|
||||||
|
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
|
||||||
|
<view class="navTitle">申请提现</view>
|
||||||
|
<view class="ruleBtn" @click="data.ruleShow = true">规则</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="title">可提现总额</view>
|
||||||
|
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
||||||
|
<view class="val" style="">
|
||||||
|
<view style="display: flex;flex-direction: row;padding: 20upx;">
|
||||||
|
<view style="font-size: 32upx;color: #333333;">提现金额</view>
|
||||||
|
</view>
|
||||||
|
<view class="input" style="">
|
||||||
|
<view style="display: flex;align-items: center;">
|
||||||
|
<view style="font-size: 40upx;color: #333333;">¥</view>
|
||||||
|
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
||||||
|
</view>
|
||||||
|
<view class="allbtn" @click="setAllMoney">
|
||||||
|
全部
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="witBtn" @click="goWithdraw"> {{data.isWithdraw?'立即提现':'观看广告提现'}} </view>
|
||||||
|
|
||||||
|
<view class="tab" style="">
|
||||||
|
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
|
||||||
|
<!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> -->
|
||||||
|
<view @click="linkTo('/pages/me/withdraw/moneyList?moneyType=1&viewType=2')">红包明细</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="moneyList u-p-b-30">
|
||||||
|
<view v-if="data.list.length" v-for="(item, index) in data.list" :key="index" class="item">
|
||||||
|
<view>
|
||||||
|
<view style="margin-bottom: 8upx;text-align: right;">
|
||||||
|
<text style="margin-bottom: 8upx;color: green" v-if="item.state===1"> 提现成功</text>
|
||||||
|
<text style="margin-bottom: 8upx;color: green" v-if="item.state===0||item.state==3">
|
||||||
|
提现中</text>
|
||||||
|
<text style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1||item.state===2">
|
||||||
|
提现失败
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="color: #999999;font-size: 28upx;">
|
||||||
|
<view style="margin-bottom: 8upx"> 收款人账号:{{ item.zhifubao }}</view>
|
||||||
|
<view style="margin-bottom: 8upx"> 收款人姓名:{{ item.zhifubaoName }}</view>
|
||||||
|
<view style="margin-bottom: 8upx"> 发起时间:{{ item.createAt }}</view>
|
||||||
|
<view style="margin-bottom: 8upx" v-if="item.state===1">成功时间 {{ item.outAt }}</view>
|
||||||
|
<view style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1||item.state===2">
|
||||||
|
失败原因:{{ item.refund }}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="margin-bottom: 8upx;text-align: right;">
|
||||||
|
<!-- 提现金额: -->
|
||||||
|
<text style="color: #FD6416;font-size: 32upx;font-weight: 600"> ¥{{ item.money }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<emprty-card v-if="!data.list.length" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title-style="{fontWeight:'700'}" @confirm="data.ruleShow=false" confirm-color="rgb(255, 117, 129)">
|
||||||
|
<view class="u-p-30 u-text-left">
|
||||||
|
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
||||||
|
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.ruleInfo"></rich-text>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</up-modal>
|
||||||
|
|
||||||
|
<view style="width: 0;height: 0;overflow: hidden;">
|
||||||
|
<!-- 激励视频广告 -->
|
||||||
|
<ad-rewarded-video v-if="data.adRewardedShow" ref="adRewarded" adpid="1507000689" :loadnext="true"
|
||||||
|
:url-callback="data.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
|
||||||
|
</ad-rewarded-video>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, nextTick, ref } from 'vue';
|
||||||
|
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
|
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
||||||
|
import { selectUserById } from '@/api/user/user.js';
|
||||||
|
import { commonType } from '@/api/init.js';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
ruleShow: true,
|
||||||
|
ruleInfo: `
|
||||||
|
用户在平台中对奖励提现的,适用以下规则:
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
1,用户的收益达到最低提现金额要求后,可以申请提现,每日只可以提现一笔。
|
||||||
|
<br/>
|
||||||
|
2,用户需要通过支付宝提现,需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息,请确保提供的信息准确无误,以免提现失败。
|
||||||
|
<br/>
|
||||||
|
3,如果用户发现显示「提现失败」,需确认当前填写或绑定的支付宝账号或银行卡账号是否正确,以及支付宝账号是否可用。如果用户发现显示「提现成功」但没到账
|
||||||
|
<br/>
|
||||||
|
(1)如果用户有多个支付宝账号,请检查用户是否提现到了其他支付宝账号。
|
||||||
|
<br/>
|
||||||
|
(2)高峰期提现人数多会导致网络拥堵,显示提现成功之后72小时内属于正常现象,请耐心等候。
|
||||||
|
<br/>
|
||||||
|
4,每日08:00至次日18:00为提现时间,活动的对应奖励可能延迟到账。提现通常会在72小时内到账,如遇双休日、节假日,提现到账时间可能会延长。活动高峰期间,由于网络拥堵,用户可能存在短时间内无法提现的情况。平台将尽最大努力及时恢复提现功能,但无需因此承担任何责任。
|
||||||
|
<br/>`,
|
||||||
|
money: '',
|
||||||
|
mayMoney: '0',
|
||||||
|
list: [],
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
totalCount: 0,
|
||||||
|
cashMoney: 0,
|
||||||
|
urlCallback: {},
|
||||||
|
adRewardedShow: true,
|
||||||
|
adRewardedVideoloadNum: 0,
|
||||||
|
isWithdraw: false,
|
||||||
|
userInfo: null,
|
||||||
|
})
|
||||||
|
|
||||||
|
const adRewarded = ref(null);
|
||||||
|
onLoad(() => {
|
||||||
|
getExtractFei();
|
||||||
|
getMoneyDetail();
|
||||||
|
})
|
||||||
|
onShow(() => {
|
||||||
|
getcashMoney()
|
||||||
|
getUserInfo();
|
||||||
|
})
|
||||||
|
onReady(() => {
|
||||||
|
nextTick(()=>{
|
||||||
|
data.adRewardedVideoloadNum = 0
|
||||||
|
adRewarded.value.load();
|
||||||
|
})
|
||||||
|
getCanCash()
|
||||||
|
})
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (data.page * data.limit < data.totalCount) {
|
||||||
|
data.page = data.page + 1;
|
||||||
|
data.getMoneyDetail();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
data.page = 1;
|
||||||
|
data.list = []
|
||||||
|
data.getMoneyDetail();
|
||||||
|
})
|
||||||
|
function getUserInfo() {
|
||||||
|
selectUserById().then(res=>{
|
||||||
|
data.userInfo = res;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function back() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取看广告状态
|
||||||
|
*/
|
||||||
|
async function getCanCash() {
|
||||||
|
canCash().then(res => {
|
||||||
|
data.isWithdraw = !res;
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 广告数据加载成功回调
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
function onadload(e) {
|
||||||
|
data.adRewardedShow = true;
|
||||||
|
console.log('广告数据加载成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告加载失败回调
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
function onaderror(e) {
|
||||||
|
if ( data.adRewardedVideoloadNum >=3 ) {
|
||||||
|
data.adRewardedShow = false;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
data.adRewardedVideoloadNum++
|
||||||
|
setTimeout(() => {
|
||||||
|
adRewarded.value.load();
|
||||||
|
}, 1000); // 10
|
||||||
|
console.log("广告加载失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告播放成功回调
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
async function onadclose(e) {
|
||||||
|
const detail = e.detail
|
||||||
|
if (detail && detail.isEnded) {
|
||||||
|
// 正常播放结束
|
||||||
|
let res = await state({
|
||||||
|
extraKey: data.urlCallback.extra
|
||||||
|
})
|
||||||
|
getCanCash()
|
||||||
|
} else {
|
||||||
|
// 播放中途退出
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onNavigationBarButtonTap() {
|
||||||
|
console.log(1)
|
||||||
|
data.ruleShow = true
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提现触发
|
||||||
|
*/
|
||||||
|
function goWithdraw() {
|
||||||
|
|
||||||
|
if ( !data.isWithdraw ) {
|
||||||
|
data.urlCallback = {
|
||||||
|
userId: uni.getStorageSync('userInfo').userId,
|
||||||
|
extra: 'cash:'+uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
||||||
|
}
|
||||||
|
adRewarded.value.show();
|
||||||
|
} else {
|
||||||
|
getOut()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function moneyInput(e) {
|
||||||
|
data.money = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全部提现赋值
|
||||||
|
*/
|
||||||
|
function setAllMoney() {
|
||||||
|
data.money = data.mayMoney.toFixed(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取提现记录
|
||||||
|
*/
|
||||||
|
function getMoneyDetail() {
|
||||||
|
selectPayDetails({
|
||||||
|
page: data.page,
|
||||||
|
limit: data.limit
|
||||||
|
}).then(res => {
|
||||||
|
data.totalCount = res.totalCount;
|
||||||
|
if (res.list.length > 0) {
|
||||||
|
data.list = [...data.list, ...res.list];
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最低提现金额
|
||||||
|
*/
|
||||||
|
function getExtractFei() {
|
||||||
|
commonType(112).then(res => {
|
||||||
|
if (res && res.value) {
|
||||||
|
data.cashMoney = res.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可提现金额
|
||||||
|
*/
|
||||||
|
function getcashMoney() {
|
||||||
|
selectUserMoney().then(res => {
|
||||||
|
data.mayMoney = res.amount || 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转
|
||||||
|
* @param {Object} url
|
||||||
|
*/
|
||||||
|
function navTo(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMoney() {
|
||||||
|
let data =
|
||||||
|
uni.showLoading({
|
||||||
|
title: '提现中'
|
||||||
|
});
|
||||||
|
withdraw({
|
||||||
|
amount: data.money
|
||||||
|
}).then(res => {
|
||||||
|
data.money = ''
|
||||||
|
setTimeout(function() {
|
||||||
|
getcashMoney()
|
||||||
|
}, 1500)
|
||||||
|
}).catch(res =>{
|
||||||
|
if (res.code == 9991) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
setTimeout(function() {
|
||||||
|
linkTo('/pages/me/withdraw/alipay')
|
||||||
|
}, 1500)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOut() {
|
||||||
|
|
||||||
|
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!data.userInfo.accountNo) {
|
||||||
|
uni.showToast({ icon: 'none', title: "请先实名认证" });
|
||||||
|
setTimeout(()=>{
|
||||||
|
linkTo('/pages/me/withdraw/realName')
|
||||||
|
},1500)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
|
||||||
|
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提现申请提示",
|
||||||
|
content: '每日只可提现一次',
|
||||||
|
success: (e) => {
|
||||||
|
if (e.confirm) {
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.showModal({
|
||||||
|
title: "提现申请提示",
|
||||||
|
content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName + '\n\n提现金额:' + data
|
||||||
|
.money + '元\n\n收款人账号:' + data.userInfo.accountNo + '',
|
||||||
|
|
||||||
|
success: (e) => {
|
||||||
|
if (e.confirm) {
|
||||||
|
getMoney();
|
||||||
|
getMoneyDetail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},200)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: "提现金额必须大于或等于" + data.cashMoney + "元才可提现"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: "您的余额不足"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
text-align: center;
|
||||||
|
background: white;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
.nav{
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
background-color: #ff7581;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 100rpx 30rpx 15rpx 30rpx;
|
||||||
|
.navTitle{
|
||||||
|
color: #fff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.ruleBtn{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
background-color: #ff7581;
|
||||||
|
height: 500rpx;
|
||||||
|
border-bottom-right-radius: 40rpx;
|
||||||
|
border-bottom-left-radius: 40rpx;
|
||||||
|
.title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
padding-top: 230rpx;
|
||||||
|
}
|
||||||
|
.mayMoney{
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
.val{
|
||||||
|
width: 90%;
|
||||||
|
height: max-content
|
||||||
|
;margin-left: 40rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
.input{
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.allbtn{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
background: #ff7581;
|
||||||
|
color: white;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 7rpx 15rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.witBtn{
|
||||||
|
margin: 32rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
background: #ff7581;
|
||||||
|
color: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
}
|
||||||
|
.tab{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-around;
|
||||||
|
>view{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
padding-bottom: 60rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.moneyList{
|
||||||
|
text-align: left
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cash-top {
|
||||||
|
padding: 32upx 32upx 50upx 32upx;
|
||||||
|
/* border-bottom: 1px solid gainsboro; */
|
||||||
|
background: #5074FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leiji {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rule-btn {
|
||||||
|
font-size: 16px;
|
||||||
|
// padding: 2rpx 10rpx;
|
||||||
|
// border: 1px solid rgba(255, 255, 255, .8);
|
||||||
|
// border-radius: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view2-view-text {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #000000;
|
||||||
|
margin-left: 20upx;
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view2-view-image-right {
|
||||||
|
width: 18upx;
|
||||||
|
height: 30upx;
|
||||||
|
margin-left: 50upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyList {
|
||||||
|
.item {
|
||||||
|
background: white;
|
||||||
|
padding: 32rpx;
|
||||||
|
margin: 32rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.centre {
|
||||||
|
text-align: center;
|
||||||
|
padding: 200rpx 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 360rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
// margin-bottom: 20rpx;
|
||||||
|
margin: 0 auto 20rpx;
|
||||||
|
// border: 1px dotted #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #999999;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin: 80rpx auto;
|
||||||
|
width: 600rpx;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
background: #ff7581;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
124
pages/me/withdraw/moneyList.vue
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view v-if="data.list.length" v-for="(item, index) in data.list" :key="index" class="item">
|
||||||
|
<view>
|
||||||
|
|
||||||
|
<view style="color: #000000;font-size: 28upx;">
|
||||||
|
<view style="margin-bottom: 8upx;"> 类型: {{item.title}}</view>
|
||||||
|
<view style="margin-bottom: 8upx"> 内容: {{item.content}}</view>
|
||||||
|
<view style="margin-bottom: 8upx"> 时间: {{item.createTime}}</view>
|
||||||
|
<view style="margin-bottom: 8upx;text-align: right;">
|
||||||
|
<!-- 提现金额: -->
|
||||||
|
<text v-if="item.type===2" style="color: #666;font-size: 32upx;font-weight: 600"> - ¥{{item.money}}</text>
|
||||||
|
<text v-if="item.type===1" style="color: #FD6416;font-size: 32upx;font-weight: 600">+ ¥{{item.money}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<emprty-card v-if="!data.list.length" />
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from 'vue';
|
||||||
|
import { onLoad,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
|
import { queryUserMoneyDetails } from '@/api/me/withdraw.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
list: [],
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
totalCount: 0,
|
||||||
|
moneyType: null,
|
||||||
|
viewType: null,
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
if (options.moneyType) {
|
||||||
|
data.moneyType = options.moneyType
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: options.moneyType == 1 ? '红包明细' : '金币明细'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (options.viewType) {
|
||||||
|
data.viewType = options.viewType
|
||||||
|
}
|
||||||
|
getMoney();
|
||||||
|
})
|
||||||
|
|
||||||
|
function getMoney() {
|
||||||
|
queryUserMoneyDetails({
|
||||||
|
page : data.page,
|
||||||
|
limit : data.limit,
|
||||||
|
moneyType : data.moneyType,
|
||||||
|
viewType: data.viewType,
|
||||||
|
}).then(res => {
|
||||||
|
data.totalCount = res.total;
|
||||||
|
if ( res.records.length > 0) {
|
||||||
|
data.list = [...data.list,...res.records];
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (data.page*data.limit < data.totalCount) {
|
||||||
|
data.page = data.page + 1;
|
||||||
|
getMoney();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
data.page = 1;
|
||||||
|
data.list = []
|
||||||
|
data.getMoney();
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
/* @import "../../static/css/index.css"; */
|
||||||
|
|
||||||
|
page {
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
background: white;
|
||||||
|
padding: 32rpx;
|
||||||
|
margin: 32rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.centre {
|
||||||
|
text-align: center;
|
||||||
|
padding: 200rpx 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
image {
|
||||||
|
width: 360rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
// margin-bottom: 20rpx;
|
||||||
|
margin: 0 auto 20rpx;
|
||||||
|
// border: 1px dotted #000000;
|
||||||
|
}
|
||||||
|
.tips {
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #999999;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
margin: 80rpx auto;
|
||||||
|
width: 600rpx;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
background: #5074FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
168
pages/me/withdraw/realName.vue
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
<template>
|
||||||
|
<view class="containerView">
|
||||||
|
<up-cell-group label-width="80" :border="false">
|
||||||
|
<up-cell :label-style="{ width: '100rpx' }" title="姓名">
|
||||||
|
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
|
||||||
|
</up-cell>
|
||||||
|
<up-cell title="身份证号码">
|
||||||
|
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
|
||||||
|
</up-cell>
|
||||||
|
<up-cell title="银行卡号码">
|
||||||
|
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
|
||||||
|
</up-cell>
|
||||||
|
<up-cell title="手机号">
|
||||||
|
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
|
||||||
|
</up-cell>
|
||||||
|
</up-cell-group>
|
||||||
|
<button v-if="!data.isAccountNo" class="confirm-btn" @click="toLogin" :disabled="data.logining">认证</button>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的银行卡号和真实的收款人姓名</view>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">手机号需是银行卡银行卡预留手机号</view>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
|
||||||
|
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款,请须知</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, nextTick, ref } from 'vue';
|
||||||
|
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
|
import { updateUser } from '@/api/me/withdraw.js';
|
||||||
|
import { selectUserById } from '@/api/user/user.js';
|
||||||
|
import { commonType } from '@/api/init.js';
|
||||||
|
|
||||||
|
let data = reactive({
|
||||||
|
certName: null,
|
||||||
|
mobile: null,
|
||||||
|
certNum: null,
|
||||||
|
accountNo: null,
|
||||||
|
isAccountNo: null,
|
||||||
|
logining: false
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
getUserInfo()
|
||||||
|
})
|
||||||
|
|
||||||
|
function getUserInfo () {
|
||||||
|
selectUserById().then(res=>{
|
||||||
|
if(res){
|
||||||
|
data.certName = res.certName;
|
||||||
|
data.mobile = res.mobile;
|
||||||
|
if ( res.accountNo ) {
|
||||||
|
data.accountNo = res.accountNo;
|
||||||
|
data.certNum = res.certNo;
|
||||||
|
}
|
||||||
|
data.isAccountNo = res.accountNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function inputChange(e) {
|
||||||
|
const key = e.currentTarget.dataset.key;
|
||||||
|
data[key] = e.detail.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toLogin() {
|
||||||
|
|
||||||
|
if (!data.certName) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请设置收款人姓名',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else if (!data.mobile) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请设置收款人支付宝账号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else if (!data.certNum) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请设置收款人支付宝账号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else if (!data.accountNo) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请设置收款人支付宝账号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
data.logining = true
|
||||||
|
let res = await updateUser({
|
||||||
|
certName: data.certName,
|
||||||
|
mobile: data.mobile,
|
||||||
|
certNum: data.certNum,
|
||||||
|
accountNo: data.accountNo.replace(/\s+/g, ''),
|
||||||
|
})
|
||||||
|
if( res) {
|
||||||
|
data.logining = false
|
||||||
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
|
userInfo.mobile = data.mobile
|
||||||
|
userInfo.mobile = data.mobile
|
||||||
|
userInfo.certNo = data.certNum
|
||||||
|
userInfo.accountNo = data.accountNo
|
||||||
|
uni.setStorageSync('userInfo', userInfo)
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改成功',
|
||||||
|
icon: 'none',
|
||||||
|
complete() {
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack();
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
page {
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.containerView {
|
||||||
|
padding:30rpx;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-btn1 {
|
||||||
|
width: 300px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
border-radius: 30px;
|
||||||
|
margin-top: 70upx;
|
||||||
|
/* background: whitesmoke; */
|
||||||
|
background: #ff7581;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 32rpx;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.confirm-btn {
|
||||||
|
width: 300px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
border-radius: 30px;
|
||||||
|
margin-top: 70upx;
|
||||||
|
background: #ff7581;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border: none;
|
||||||
|
&:after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
443
pages/share/index.vue
Normal file
@@ -0,0 +1,443 @@
|
|||||||
|
<!-- 我的邀请 -->
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="head">
|
||||||
|
<up-image src="/static/share/share-bg.png" alt="" width="100%" mode="widthFix"></up-image>
|
||||||
|
<view class="top-title">
|
||||||
|
<view>
|
||||||
|
<up-image src="/static/share/title.png" alt="" width="550rpx" height="92rpx" mode="widthFix"></up-image>
|
||||||
|
</view>
|
||||||
|
<view style="padding-right:70rpx;justify-content: flex-end">
|
||||||
|
<up-image src="/static/share/rule.png" alt="" width="430rpx" height="92rpx" mode="widthFix"></up-image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="inviteBox">
|
||||||
|
<view class="top">
|
||||||
|
<u-image src="/static/share/bg1.png" alt="" width="422rpx" height="76rpx"></u-image>
|
||||||
|
<view class="u-absolute">
|
||||||
|
<text>邀请详情</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="codeTitle">
|
||||||
|
您的邀请码
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="code" style="">
|
||||||
|
{{data.invitationCode}}
|
||||||
|
</view>
|
||||||
|
<view class="u-flex u-row-between" style="padding: 0 88rpx;">
|
||||||
|
<u-button @tap="sharurl" :custom-style="data.customStyle" :hair-line="false"
|
||||||
|
:ripple="true">一键分享</u-button>
|
||||||
|
<u-button style="margin-left: 50rpx;" @click.stop="createPoster()" :custom-style="data.customStyle"
|
||||||
|
:hair-line="false" :ripple="true">保存海报</u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="gap u-m-t-32"></view>
|
||||||
|
<view class="u-m-t-32">
|
||||||
|
<view style="font-size: 32rpx;font-weight:bold;color: #000;text-align: center;">我的邀请战绩</view>
|
||||||
|
<view class="u-m-t-32" style="line-height: 46rpx;font-weight: bold;text-align: center;display: flex;justify-content: space-around;">
|
||||||
|
<view>
|
||||||
|
<view class="">已邀请</view>
|
||||||
|
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{data.inviteCount}}</text>人</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="">签到</view>
|
||||||
|
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{data.inviteSignCount}}</text>人</view>
|
||||||
|
</view>
|
||||||
|
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=2&viewType=1')">
|
||||||
|
<view class="">金币收益</view>
|
||||||
|
<!-- <view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteGoldMoney||0}}</text></view> -->
|
||||||
|
</view>
|
||||||
|
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=1&viewType=1')">
|
||||||
|
<view class="">红包收益</view>
|
||||||
|
<!-- <view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteMoney||0}}</text></view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-16 u-p-b-32" style="text-align: center;color: #999;">好友签到成功可额外获得1元现金红包</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-40 u-m-b-32" style="background-color: #fff;padding: 32rpx;border-radius: 16rpx;margin: 32rpx;">
|
||||||
|
<view class="u-font-32 " style="text-align: center;color: #333;font-weight: bold;">已邀请列表</view>
|
||||||
|
<view v-if="data.inviterList.length" class="u-m-t-20">
|
||||||
|
<view class="u-m-b-20" style="line-height: 80rpx;display: flex;justify-content: space-between;" v-for="(item, index) in data.inviterList"
|
||||||
|
:key='index'>
|
||||||
|
<view style="display: flex;">
|
||||||
|
<image src="/static/share/5.png" style="width: 80rpx;" mode="widthFix"></image>
|
||||||
|
<text class="margin-left-sm">{{item.userName}}</text>
|
||||||
|
</view>
|
||||||
|
<view style="width: 160rpx;" class="u-flex u-row-right font-bold">
|
||||||
|
<text class="text-red" v-if="item.recordNum>0">已签到</text>
|
||||||
|
<text class="color-999" v-else>未签到</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="u-p-t-30 u-p-b-30" v-if="!data.inviterList.length">
|
||||||
|
<up-divider text="没有更多了"></up-divider>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="width: 0;height: 0;overflow: hidden;">
|
||||||
|
<up-qrcode :size="200" :val="data.erweima" @result="qrR"></up-qrcode>
|
||||||
|
<canvas id="canvas" canvas-id="poster" :style="{width: data.canvasW+'px', height: data.canvasH+'px'}"></canvas>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, nextTick, ref } from 'vue';
|
||||||
|
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
|
import { updateUser } from '@/api/me/withdraw.js';
|
||||||
|
import { selectInviteMoney, selectInviteByUserIdLists, selectBannerList } from '@/api/share/index.js';
|
||||||
|
import { commonType } from '@/api/init.js';
|
||||||
|
import config from '@/commons/config.js';
|
||||||
|
let data = reactive({
|
||||||
|
loading:false,
|
||||||
|
qrcode: false,
|
||||||
|
earning: {
|
||||||
|
inviteMoney: 0,
|
||||||
|
inviteGoldMoney: 0,
|
||||||
|
},
|
||||||
|
erweimapath: '',
|
||||||
|
haibaoImg: null,
|
||||||
|
customStyle: {
|
||||||
|
background: '#DDDCFF',
|
||||||
|
border: '8rpx',
|
||||||
|
color: '#4544FF',
|
||||||
|
fontSize: '28rpx',
|
||||||
|
fontWeight: '700',
|
||||||
|
padding: '10rpx 32rpx',
|
||||||
|
},
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
isEnd:false,
|
||||||
|
inviteCount: '', //邀请人数
|
||||||
|
inviterList: [], //邀请列表
|
||||||
|
erweima: '',
|
||||||
|
bgImg: '',
|
||||||
|
tuiguang: '',
|
||||||
|
invitationCode: uni.getStorageSync('userInfo').invitationCode,
|
||||||
|
h5SaveImg: '',
|
||||||
|
haibaoImgH5: '',
|
||||||
|
inviteSignCount:0,
|
||||||
|
canvasW: 350,
|
||||||
|
canvasH: 667,
|
||||||
|
})
|
||||||
|
let settingWritePhotosAlbum = false;
|
||||||
|
onLoad(() => {
|
||||||
|
getInviter()
|
||||||
|
queryInviter()
|
||||||
|
getBgImg()
|
||||||
|
data.erweima = config.baseUrl + `/pages/login/register/?invitation=${data.invitationCode}&qdCode=${uni.getStorageSync('userInfo').qdCode}`
|
||||||
|
console.log(data.erweima)
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取邀请战绩
|
||||||
|
*/
|
||||||
|
function queryInviter() {
|
||||||
|
selectInviteMoney().then(res => {
|
||||||
|
data.inviteCount = res.inviteCount //邀请人数
|
||||||
|
data.inviteSignCount = res.inviteSignCount
|
||||||
|
data.earning.inviteGoldMoney = res.earning.inviteGoldMoney||0
|
||||||
|
data.earning.inviteMoney = res.earning.inviteMoney||0
|
||||||
|
console.log(data.earning)
|
||||||
|
// Object.assign(data.earning,res.earning)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已邀请列表
|
||||||
|
*/
|
||||||
|
function getInviter() {
|
||||||
|
data.loading=true;
|
||||||
|
selectInviteByUserIdLists({
|
||||||
|
page: data.page,
|
||||||
|
limit: data.limit
|
||||||
|
}).then(res => {
|
||||||
|
data.loading=false;
|
||||||
|
data.inviterList =data.inviterList.concat(res.list)
|
||||||
|
data.isEnd=data.page>=res.totalPage?true:false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转收益列表
|
||||||
|
* @param {Object} url
|
||||||
|
*/
|
||||||
|
function goNav ( url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一键分享
|
||||||
|
*/
|
||||||
|
function sharurl() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '链接推广',
|
||||||
|
content: data.tuiguang + data.erweima,
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '关闭',
|
||||||
|
confirmText: '一键复制',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: data.tuiguang + data.erweima,
|
||||||
|
success: function() {
|
||||||
|
console.log('success');
|
||||||
|
uni.showToast({
|
||||||
|
title: '复制成功',
|
||||||
|
duration: 1000,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function posterSuccess(haibaoImg) {
|
||||||
|
data.haibaoImg = haibaoImg;
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
function successH5(haibaoImg) {
|
||||||
|
if ( haibaoImg ) {
|
||||||
|
data.haibaoImgH5 = haibaoImg
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [haibaoImg],
|
||||||
|
current: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function qrR(path) {
|
||||||
|
data.erweimapath = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取海报图
|
||||||
|
*/
|
||||||
|
function getBgImg() {
|
||||||
|
selectBannerList({
|
||||||
|
classify: 5
|
||||||
|
}).then(res => {
|
||||||
|
data.bgImg = res[0].imageUrl
|
||||||
|
data.tuiguang = res[0].describes
|
||||||
|
// data.bgImg = "https://jiaoyu.xianmxkj.com/img/20230822/27d37f847db9481bb3dc54cd12258147.jpg"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function createdCanvas(imageInfos){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
//绘图上下文
|
||||||
|
const ctx = uni.createCanvasContext('poster');
|
||||||
|
uni.createSelectorQuery()
|
||||||
|
.in(this)
|
||||||
|
.select('#canvas')
|
||||||
|
.boundingClientRect(rect => {
|
||||||
|
if(!rect) return
|
||||||
|
|
||||||
|
// 背景图
|
||||||
|
ctx.drawImage( data.bgImg, 0, 0, data.canvasW, data.canvasH );
|
||||||
|
console.log(data.canvasW)
|
||||||
|
|
||||||
|
// 二维码图片
|
||||||
|
ctx.drawImage( data.erweimapath, data.canvasW - 174, data.canvasH - 134, 64, 64 );
|
||||||
|
ctx.draw();
|
||||||
|
}).exec()
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成海报
|
||||||
|
*/
|
||||||
|
async function createPoster() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '海报生成中'
|
||||||
|
});
|
||||||
|
const Images = [data.bgImg, data.erweimapath];
|
||||||
|
Promise.all(Images.map(img => uni.getImageInfo({ src: img }))).then(
|
||||||
|
imageInfos => {
|
||||||
|
console.log('Images then>>>>>>', imageInfos);
|
||||||
|
data.bgImg = imageInfos[0].path;
|
||||||
|
data.erweimapath = imageInfos[1].path;
|
||||||
|
|
||||||
|
//根据参数开始绘图
|
||||||
|
createdCanvas(imageInfos[0]).then(()=>{
|
||||||
|
// 绘制需要延迟,不然第一次加载为空白
|
||||||
|
setTimeout(() => {
|
||||||
|
// 将生成的canvas图片,转为真实图片-地址
|
||||||
|
uni.canvasToTempFilePath({
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
canvasId: "poster",
|
||||||
|
success: res => {
|
||||||
|
data.haibaoImg = res.tempFilePath;
|
||||||
|
// #ifdef H5
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [data.haibaoImg],
|
||||||
|
current: 1,
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [data.haibaoImg],
|
||||||
|
current: 1,
|
||||||
|
})
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: data.haibaoImg,
|
||||||
|
success: function() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '海报已保存相册',
|
||||||
|
icon: 'none',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
console.log('真实图片>>>>>>', res);
|
||||||
|
uni.hideLoading();
|
||||||
|
},
|
||||||
|
fail: (err) => { console.log('error', err) }
|
||||||
|
},this);
|
||||||
|
}, 500);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
onReachBottom(() => {
|
||||||
|
if(data.isEnd||data.loading){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
data.page+=1
|
||||||
|
getInviter()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$color1: #5857FF;
|
||||||
|
page {
|
||||||
|
background: #F3F4F8;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
background: #F3F4F8;
|
||||||
|
min-height: 100vh;
|
||||||
|
.head{
|
||||||
|
position: relative;
|
||||||
|
.top-title {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 192rpx;
|
||||||
|
>view{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.inviteBox {
|
||||||
|
position: relative;
|
||||||
|
margin-top: -240rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||||
|
margin-left: 28rpx;
|
||||||
|
margin-right: 28rpx;
|
||||||
|
.top {
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
left: 134rpx;
|
||||||
|
right: 134rpx;
|
||||||
|
top: -24rpx;
|
||||||
|
|
||||||
|
.u-absolute {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.codeTitle{
|
||||||
|
padding-top: 84rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
.code{
|
||||||
|
font-size: 44rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
color: #5857FF;
|
||||||
|
margin: 32rpx auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.cu-dialog {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-red {
|
||||||
|
color: $color1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gap {
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
position: relative;
|
||||||
|
border-bottom: 1px dashed #eee;
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&::after {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 34rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
background: #F3F4F8;
|
||||||
|
border-radius: 50%;
|
||||||
|
z-index: 2;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-size: 100% 18px;
|
||||||
|
background-repeat: repeat-x
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
left: -16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
right: -16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-img {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
import { selectByUserId } from '@/api/me/me.js';
|
import { selectByUserId } from '@/api/me/me.js';
|
||||||
|
|
||||||
@@ -36,6 +36,10 @@ const typeList = ref([
|
|||||||
type: 1,
|
type: 1,
|
||||||
label: '我的追剧'
|
label: '我的追剧'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 2,
|
||||||
|
label: '我的喜欢'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 3,
|
type: 3,
|
||||||
label: '最近观看'
|
label: '最近观看'
|
||||||
@@ -57,15 +61,29 @@ async function selectByUserIdAjax() {
|
|||||||
limit: listData.size,
|
limit: listData.size,
|
||||||
classify: type.value
|
classify: type.value
|
||||||
});
|
});
|
||||||
listData.list = res.records;
|
if (listData.page == 1) {
|
||||||
|
listData.list = res.records;
|
||||||
|
} else {
|
||||||
|
listData.list.push(...res.records);
|
||||||
|
}
|
||||||
if (res.currPage >= res.totalPage) {
|
if (res.currPage >= res.totalPage) {
|
||||||
listData.status = 'nomore';
|
listData.status = 'nomore';
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 监听下拉结束
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
listData.page = 1;
|
||||||
|
listData.status = 'loading';
|
||||||
|
selectByUserIdAjax();
|
||||||
|
});
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
listData.page++;
|
listData.page++;
|
||||||
selectByUserIdAjax();
|
selectByUserIdAjax();
|
||||||
|
|||||||
BIN
static/download/appLogo.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
static/download/appeq_bg.png
Normal file
|
After Width: | Height: | Size: 676 KiB |
BIN
static/download/open_guide.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
static/me/jifen.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
static/me/message.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
static/share/5.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
static/share/bg1.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/share/rule.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
static/share/share-bg.png
Normal file
|
After Width: | Height: | Size: 385 KiB |
BIN
static/share/title.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
50
utils/app.js
@@ -1,31 +1,31 @@
|
|||||||
export function openApp(url){
|
export function openApp(url) {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
window.location.href='com.hnsiyao.duanju://'
|
window.location.href = 'com.hnsiyao.duanju://'
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
export function isAndroid(){
|
export function isAndroid() {
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
const isA=systemInfo.platform === 'android'
|
const isA = systemInfo.platform === 'android'
|
||||||
// isAndroid=()=>{
|
// isAndroid=()=>{
|
||||||
// return isA
|
// return isA
|
||||||
// }
|
// }
|
||||||
return isA
|
return isA
|
||||||
}
|
}
|
||||||
export function isIos(){
|
export function isIos() {
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
const isIOS = /iOS/.test(systemInfo.platform);
|
const isIOS = /iOS/.test(systemInfo.platform);
|
||||||
isIos=()=>{
|
isIos = () => {
|
||||||
return isIOS
|
return isIOS
|
||||||
}
|
}
|
||||||
return isIOS
|
return isIOS
|
||||||
}
|
}
|
||||||
export function isH5Android(){
|
export function isH5Android() {
|
||||||
const token=uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(isAndroid());
|
console.log(isAndroid());
|
||||||
if(isAndroid()&&token){
|
if (isAndroid() && token) {
|
||||||
uni.removeStorageSync('token')
|
uni.removeStorageSync('token')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/login/appEq'
|
url: '/pages/login/appEq'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,3 +40,33 @@ export function returnIsSafari() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由跳转
|
||||||
|
*/
|
||||||
|
export function linkTo(path, isLogin = false) {
|
||||||
|
if (isLogin) {
|
||||||
|
let token = uni.getStorageSync('token')
|
||||||
|
if (!token) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '注意',
|
||||||
|
content: '您还未登录,请登录后使用!',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: path
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: path
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||