添加新文件
@@ -0,0 +1,68 @@
|
||||
import request from '@/utils/request.js';
|
||||
import qs from "qs";
|
||||
// import { APPID } from '@/utils/config.js';
|
||||
|
||||
/**
|
||||
* 登录(SMS)
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function loginbysms(params) {
|
||||
// params.appId = APPID;
|
||||
return request({
|
||||
url: "/auth/loginbysms",
|
||||
method: "post",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function register(params) {
|
||||
// params.appId = APPID;
|
||||
return request({
|
||||
url: "/auth/register",
|
||||
method: "post",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码登录
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function loginbypw(params) {
|
||||
// params.appId = APPID;
|
||||
return request({
|
||||
url: "/auth/loginbypw",
|
||||
method: "post",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询等级
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getUserInfo(params) {
|
||||
return request({
|
||||
url: "/user/getUserInfo",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 实名认证
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function realNameAuthentication(params) {
|
||||
// params.appId = APPID;
|
||||
return request({
|
||||
url: "/user/realName",
|
||||
method: "post",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import request from '@/utils/request.js'; // 引入封装的方法
|
||||
|
||||
// 查询绑定的银行卡
|
||||
export function getBankList(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/bankcard/getList",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 绑定银行卡
|
||||
export function bindBank(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/bankcard/bind",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 解绑银行卡
|
||||
export function unbind(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/bankcard/unbind",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request.js'; // 引入封装的方法
|
||||
|
||||
/**
|
||||
* 查询流水 【是否有用?】
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getBalanceAcctFlow(params) {
|
||||
return request({
|
||||
url: "/finance/getBalanceAcctFlow",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户余额
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getAcctBalance(params) {
|
||||
return request({
|
||||
url: "/finance/getAcctBalance",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询提现规则
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getWithdrawalRule(params) {
|
||||
return request({
|
||||
url: "/finance/getWithdrawalRule",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 提前申请
|
||||
export function withdrawal(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/finance/withdrawal",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户流水
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getAcctFlow(params) {
|
||||
return request({
|
||||
url: "/finance/getAcctFlow",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户流水
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getWithdrawalList(params) {
|
||||
return request({
|
||||
url: "/finance/getWithdrawalList",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询兑换规则
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getExchangeRule(params) {
|
||||
return request({
|
||||
url: "/finance/getExchangeRule",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
// 兑换
|
||||
export function exchange(data) {
|
||||
return request({
|
||||
url: "/finance/exchange",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 充值
|
||||
export function recharge(data) {
|
||||
return request({
|
||||
url: "/finance/recharge",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询充值支付方式
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getRechargeSupportPay(params) {
|
||||
return request({
|
||||
url: "/finance/getRechargeSupportPay",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import request from '@/utils/request.js'; // 引入封装的方法
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getOrderList(params) {
|
||||
return request({
|
||||
url: "/order/getList",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单详情
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getDetail(params) {
|
||||
return request({
|
||||
url: "/order/getDetail",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
// 支付订单
|
||||
export function payment(data) {
|
||||
// data.appId = APPID;
|
||||
return request({
|
||||
url: "/order/payment",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询订单统计
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getStatistics(params) {
|
||||
return request({
|
||||
url: "/order/getStatistics",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付方式
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function getSupportPay(params) {
|
||||
return request({
|
||||
url: "/cart/getSupportPay",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
// 确认收货
|
||||
export function confirmReceipt(data) {
|
||||
// data.appId = APPID;
|
||||
return request({
|
||||
url: "/order/confirmReceipt",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request.js';
|
||||
|
||||
/**
|
||||
* 支付反馈
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function feedback(params) {
|
||||
return request({
|
||||
url: "/payment/feedback",
|
||||
method: "post",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付结果
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function queryResult(params) {
|
||||
return request({
|
||||
url: "/payment/queryResult",
|
||||
method: "get",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request.js'; // 引入封装的方法
|
||||
|
||||
|
||||
// 查询抽奖活动
|
||||
export function getActivityList(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/raffle/getActivityList",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function raffleExecute(params) {
|
||||
return request({
|
||||
url: "/raffle/execute",
|
||||
method: "post",
|
||||
data:params,
|
||||
isShowLoading:false,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询中奖记录
|
||||
export function getWinningList(data) {
|
||||
return request({
|
||||
url: "/raffle/getWinningList",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 领取实物奖品
|
||||
* @param {Object} params
|
||||
*/
|
||||
export function takeGoods(params) {
|
||||
return request({
|
||||
url: "/raffle/takeGoods",
|
||||
method: "post",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询抽奖加速次数
|
||||
export function getQuickenTimes(data) {
|
||||
return request({
|
||||
url: "/raffle/getQuickenTimes",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request.js'; // 引入封装的方法
|
||||
|
||||
|
||||
// 查询团队业绩
|
||||
export function getPerformance(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/teamsumm/getPerformance",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询团队概况
|
||||
export function getJuniorSummary(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/teamsumm/getJuniorSummary",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询团队概况
|
||||
export function getCascadeJunior(data) {
|
||||
// return request.post('/common/getSmsCode',qs.stringify(params));
|
||||
return request({
|
||||
url: "/teamsumm/getCascadeJunior",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询账户类型
|
||||
export function getAcctCategory(data) {
|
||||
return request({
|
||||
url: "/teamsumm/getAcctCategory",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询提成概况
|
||||
export function getRewardSummary(data) {
|
||||
return request({
|
||||
url: "/teamsumm/getRewardSummary",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询提成记录
|
||||
export function getRewardSummaryRecord(data) {
|
||||
return request({
|
||||
url: "/teamsumm/getRewardSummaryRecord",
|
||||
method: "get",
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<view class="turntable-container" :style="{ backgroundColor: bgColor }">
|
||||
<view class="turntable" :style="turntableStyle" @click="startRotate">
|
||||
<!-- 奖项区域 -->
|
||||
<view
|
||||
v-for="(item, index) in prizes"
|
||||
:key="index"
|
||||
class="prize-sector"
|
||||
:style="getPrizeStyle(index)"
|
||||
>
|
||||
<view class="prize-text">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 装饰点 -->
|
||||
<view
|
||||
v-for="(item, index) in prizes"
|
||||
:key="'dot'+index"
|
||||
class="decorative-dot"
|
||||
:style="getDotStyle(index)"
|
||||
/>
|
||||
|
||||
<!-- 中心指针 -->
|
||||
<view class="center-pointer" />
|
||||
</view>
|
||||
|
||||
<button @click="startRotate">开始抽奖</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
prizes: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
{ name: "一等奖", color: "#FF4444" },
|
||||
{ name: "二等奖", color: "#66CC33" },
|
||||
{ name: "三等奖", color: "#44AAFF" },
|
||||
{ name: "谢谢参与", color: "#CCCCCC" }
|
||||
]
|
||||
},
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: "#F0F0F0"
|
||||
},
|
||||
turntableColor: {
|
||||
type: String,
|
||||
default: "#FFFFFF"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isRotating: false,
|
||||
currentRotation: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
turntableStyle() {
|
||||
return {
|
||||
transform: `rotate(${this.currentRotation}deg)`,
|
||||
backgroundColor: this.turntableColor
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getPrizeStyle(index) {
|
||||
const total = this.prizes.length
|
||||
const angle = 360 / total
|
||||
return {
|
||||
clipPath: `polygon(50% 0%, 100% 0, 100% ${100 * (index + 1) / total}%, 50% 100%, 0 ${100 * index / total}%, 0 0)`,
|
||||
backgroundColor: this.prizes[index].color
|
||||
}
|
||||
},
|
||||
getDotStyle(index) {
|
||||
const total = this.prizes.length
|
||||
const angle = (360 / total) * index
|
||||
return {
|
||||
transform: `rotate(${angle}deg) translateX(70%)`,
|
||||
backgroundColor: this.prizes[index].color
|
||||
}
|
||||
},
|
||||
async startRotate() {
|
||||
if (this.isRotating) return
|
||||
|
||||
this.isRotating = true
|
||||
const targetIndex = Math.floor(Math.random() * this.prizes.length)
|
||||
const targetRotation = this.currentRotation + 360 * 5 + (360 / this.prizes.length) * targetIndex
|
||||
|
||||
await this.$nextTick()
|
||||
this.currentRotation = targetRotation
|
||||
|
||||
setTimeout(() => {
|
||||
this.isRotating = false
|
||||
this.$emit('result', this.prizes[targetIndex])
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.turntable-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.turntable {
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
border-radius: 50%;
|
||||
transition: transform 3s ease-out;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.prize-sector {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
left: 50%;
|
||||
top: 0;
|
||||
transform-origin: left bottom;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.prize-text {
|
||||
transform: rotate(45deg);
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.decorative-dot {
|
||||
position: absolute;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
top: 10%;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.center-pointer {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 20px solid transparent;
|
||||
border-right: 20px solid transparent;
|
||||
border-top: 40px solid #333;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 20px;
|
||||
padding: 10px 20px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
background-color: #44AAFF;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #3399FF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<view class="data_common_warp">
|
||||
<view class="ID_card_title">上传证件照</view>
|
||||
<view class="ID_card_msg">(请务必上传本人证件照,生活照、艺术照将会被驳回)</view>
|
||||
<view class="ID_card_upload">
|
||||
<view class="upload_item" @click="phoneFun('Z')">
|
||||
<up-image :src="fileListZ && Object.keys(fileListZ).length !==0 ? fileListZ.accessUrl : '/static/common/ID_rx.png'" width="100%" height="90" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="upload_msg">点击上传身份证人像面</view>
|
||||
</view>
|
||||
<view class="upload_item" @click="phoneFun('F')">
|
||||
<up-image :src="fileListF && Object.keys(fileListF).length !==0 ? fileListF.accessUrl : '/static/common/ID_gq.png'" width="100%" height="90" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="upload_msg">点击上传身份国旗面</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ID_card_upload_templ">
|
||||
<view class="templ_title">上传标准</view>
|
||||
<view class="templ_img_list">
|
||||
<view class="templ_img_item" v-for="item in uploadTemplList" :key="item.id">
|
||||
<up-image :src="item.url" width="100%" height="50" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="templ_img_item_msg">
|
||||
<up-image :src="item.isOk ? '/static/common/ID_ok_1.png' :'/static/common/ID_error.png'" width="10" height="10" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="templ_img_item_msg_title">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { uploadImage,uploadImg } from '@/api/common.js';
|
||||
import { IMG_TYPE } from '@/utils/enumUtils.js';
|
||||
import { BASE_URL,Authorization } from '@/utils/config.js';
|
||||
import {getStorageFun,TOKEN_NAME} from '@/utils/auth.js';
|
||||
|
||||
export default {
|
||||
name:"common_card",
|
||||
data() {
|
||||
return {
|
||||
uploadTemplList:[
|
||||
{
|
||||
id:1,
|
||||
title:"标准",
|
||||
isOk:true,
|
||||
url:"/static/common/ID_ok.png",
|
||||
},{
|
||||
id:2,
|
||||
title:"边框缺失",
|
||||
isOk:false,
|
||||
url:"/static/common/ID_error_1.png",
|
||||
},{
|
||||
id:3,
|
||||
title:"照片模糊",
|
||||
isOk:false,
|
||||
url:"/static/common/ID_error_2.png",
|
||||
},{
|
||||
id:4,
|
||||
title:"闪光强烈",
|
||||
isOk:false,
|
||||
url:"/static/common/ID_error_3.png",
|
||||
}
|
||||
],
|
||||
fileListZ:{},// 身份正面照
|
||||
fileListF:{},// 身份反面照片
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
deletePic(event){
|
||||
this.fileListZ.splice(event.index, 1);
|
||||
},
|
||||
phoneFun(type){
|
||||
let that = this;
|
||||
/*#ifdef MP*/
|
||||
uni.chooseMedia({
|
||||
count: 1, // 默认为1,摄像头拍照为1,录像为10,录音为1
|
||||
mediaType: ['image'], // 可以指定是摄像头还是录像,这里两者都支持
|
||||
sourceType: ['camera'], // 可以指定来源是相册还是相机,这里只选相机
|
||||
camera: 'back', // 可以指定使用前置还是后置摄像头,默认后置
|
||||
success: (imgRes) => {
|
||||
// 成功则返回文件的本地临时文件路径
|
||||
const filePath = imgRes.tempFiles[0].tempFilePath; // 获取文件路径
|
||||
that.uploadFile(filePath,type);
|
||||
},
|
||||
fail: (err) => {
|
||||
// 处理错误
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
/*#endif*/
|
||||
/*#ifdef APP-PLUS*/
|
||||
uni.chooseImage({
|
||||
count: 1, // 默认9,设置图片的数量
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success: function (res) {
|
||||
// 成功选择图片后
|
||||
const filePath = res.tempFilePaths[0]; // 获取文件路径
|
||||
that.uploadFile(filePath,type);
|
||||
}
|
||||
});
|
||||
/*#endif*/
|
||||
|
||||
},
|
||||
uploadFile(url,type){
|
||||
uni.showLoading({
|
||||
title: '图片上传中...',
|
||||
})
|
||||
const that = this;
|
||||
const token = getStorageFun(TOKEN_NAME); // 获取token, 根据实际情况调整获取方式
|
||||
// 成功则返回文件的本地临时文件路径
|
||||
uni.uploadFile({
|
||||
url: BASE_URL+uploadImg, // 替换为你的上传接口URL
|
||||
filePath:url,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'type': IMG_TYPE.COMMON,
|
||||
},
|
||||
header:{
|
||||
"Authorization":Authorization,
|
||||
'HSM-AUTH': token ? token : '',
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
const data = JSON.parse(uploadFileRes.data);
|
||||
if(data.bizcode === 100){
|
||||
if(type === "Z"){
|
||||
that.fileListZ =data.data;
|
||||
this.$emit("valueFunc", "Z", data.data.dbUrl);
|
||||
}else if(type === "F"){
|
||||
that.fileListF=data.data;
|
||||
this.$emit("valueFunc", "F", data.data.dbUrl);
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '图片上传失败',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration:3000,
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (uploadFileErr) => {
|
||||
uni.showToast({
|
||||
title: '图片上传失败',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration:3000,
|
||||
})
|
||||
},
|
||||
complete: (res) => {
|
||||
// 请求完成以后做一些事情
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view class="custom-tab-bar">
|
||||
<view v-for="(item, index) in tabs" :key="index" class="tab-item" @click="switchTab(index)">
|
||||
<image :src="tabIndex === index ? item.selectedIconPath:item.iconPath" class="tab-icon"></image>
|
||||
<text :class="tabIndex === index ? 'tab-text tab-text-sel':'tab-text'">{{ item.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"custom-tab-bar",
|
||||
props: {
|
||||
tabIndex: { //当前选中的tab项
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabs: [
|
||||
{
|
||||
"pagePath": "/pages/home/home",
|
||||
"text": "首页",
|
||||
"iconPath": "/static/column/home.png",
|
||||
"selectedIconPath": "/static/column/home_sel.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/sort/sort",
|
||||
"text": "分类",
|
||||
"iconPath": "/static/column/sort.png",
|
||||
"selectedIconPath": "/static/column/sort_sel.png"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "/pages/hash_union/hash_union",
|
||||
// "text": "哈希联盟",
|
||||
// "iconPath": "/static/column/hx.png",
|
||||
// "selectedIconPath": "/static/column/hx_sel.png"
|
||||
// },
|
||||
{
|
||||
"pagePath": "/pages/shopping_cart/shopping_cart",
|
||||
"text": "购物车",
|
||||
"iconPath": "/static/column/shopping.png",
|
||||
"selectedIconPath": "/static/column/shopping_sel.png"
|
||||
}, {
|
||||
"pagePath": "/pages/mine/mine",
|
||||
"text": "我的",
|
||||
"iconPath": "/static/column/mine.png",
|
||||
"selectedIconPath": "/static/column/mine_sel.png"
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
switchTab(index) {
|
||||
const pagePath = this.tabs[index].pagePath;
|
||||
uni.switchTab({ url: pagePath });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.custom-tab-bar {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 140rpx; /* 根据需要调整 */
|
||||
background-color: #fff; /* 背景颜色 */
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.tab-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-icon {
|
||||
width: 24px; /* 图标大小 */
|
||||
height: 24px; /* 图标大小 */
|
||||
}
|
||||
.tab-text {
|
||||
font-size: 12px; /* 文字大小 */
|
||||
}
|
||||
.tab-text-sel {
|
||||
color: $app-bt-bj;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<!-- 导航栏 -->
|
||||
<view class="header_" >
|
||||
<view style="margin-top: 10rpx;" @click="leftJump">
|
||||
<up-image src="/static/common/left.png" width="18" height="20" bgColor="#f1f6ff00" @click="jumpMine"/>
|
||||
</view>
|
||||
<view class="title_">{{leftTitle}}</view>
|
||||
<view @click="rightJump">{{rightTitle}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"header",
|
||||
props: {
|
||||
leftTitle:{
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
leftPath:{
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
leftPathType:{
|
||||
type: String,
|
||||
default: "navigateTo"
|
||||
},
|
||||
rightTitle:{
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
rightPath:{
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
rightPathType:{
|
||||
type: String,
|
||||
default: "navigateTo"
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
leftJump() {
|
||||
const leftPath = this.leftPath;
|
||||
if(!leftPath){
|
||||
return;
|
||||
}
|
||||
const leftPathType = this.leftPathType;
|
||||
if(leftPathType === "navigateTo"){
|
||||
uni.navigateTo({
|
||||
url:leftPath,
|
||||
})
|
||||
}else if(leftPathType === "switchTab"){
|
||||
uni.switchTab({
|
||||
url: leftPath,
|
||||
});
|
||||
}
|
||||
},
|
||||
rightJump() {
|
||||
const rightPath = this.rightPath;
|
||||
if(!rightPath){
|
||||
return;
|
||||
}
|
||||
const rightPathType = this.rightPathType;
|
||||
if(rightPathType === "navigateTo"){
|
||||
uni.navigateTo({
|
||||
url:rightPath,
|
||||
})
|
||||
}else if(rightPathType === "switchTab"){
|
||||
uni.switchTab({
|
||||
url: rightPath,
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header_{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 74rpx 20rpx 20rpx;
|
||||
.title_{
|
||||
// font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<!-- <up-loading-page :loading="listLoading"></up-loading-page> -->
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{'height': heightRef}">
|
||||
<view class="prize_draw_item" v-for="item in prizeDrawList" :key="item.id" v-if="prizeDrawList && prizeDrawList.length!==0">
|
||||
<view class="prize_draw_left_warp">
|
||||
<up-image :src="item.iconUrl ? item.iconUrl :'/static/mine/zj_f.jpg'" width="60" height="60" bgColor="#f1f6ff00"></up-image>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view class="title_">{{item.prizeName}}</view>
|
||||
<view class="time_">{{formatDate(item.ctdate)}}</view>
|
||||
<view
|
||||
class="delivery_"
|
||||
v-if="[DELIVER_STATUS.AWAIT_DELIVERY_REQUIRED,DELIVER_STATUS.YES_DELIVERY_REQUIRED,DELIVER_STATUS.RECEIVED].includes(item.deliveryStatus)"
|
||||
>
|
||||
<view class="delivery_status">{{getValue(DELIVER_STATUS_,item.deliveryStatus)}}</view>
|
||||
<view class="delivery_num" v-if="item.deliveryNum">
|
||||
<text style="margin-right: 10rpx;">运单号:{{ item.deliveryNum}}</text>
|
||||
<up-image src="/static/common/copy.png" width="10" height="10" bgColor="#f1f6ff00" @click="copyData(item.deliveryNum)"></up-image>
|
||||
</view>
|
||||
<view class="delivery_num" v-else>运单号:暂无</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="prize_draw_right_warp" v-if="item.type === 4" v-show="item.status === 1" @click="jumpGetFun(item)">去领取</view>
|
||||
<view class="prize_draw_right_warp yes_" v-if="item.type === 4" v-show="item.status === 2">已领取</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">还未中奖哦~</view>
|
||||
</view>
|
||||
<view v-if="loading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWinningList } from '@/api/raffle.js';
|
||||
import { formatDate,copyData } from '@/utils/index.js';
|
||||
import { DELIVER_STATUS,DELIVER_STATUS_,getValue } from '@/utils/enumUtils.js'
|
||||
|
||||
export default {
|
||||
name:"winning_record",
|
||||
props: {
|
||||
heightRef: { //当前选中的tab项
|
||||
type: Number,
|
||||
default: 'calc(100vh - 100rpx)'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
DELIVER_STATUS() {
|
||||
return DELIVER_STATUS;
|
||||
},
|
||||
DELIVER_STATUS_(){
|
||||
return DELIVER_STATUS_;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
prizeDrawList:[],// 抽奖列表
|
||||
form:{
|
||||
status:'',
|
||||
page:1,
|
||||
pageSize:20,
|
||||
},
|
||||
loading: false, // 加载状态标志
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
// this.jumpMine();
|
||||
this.loadData(); // 页面加载时加载数据
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
copyData,
|
||||
getValue,
|
||||
jumpGetFun(item){
|
||||
uni.navigateTo({
|
||||
url:'/pages/get_prize/get_prize?id='+item.id,
|
||||
})
|
||||
},
|
||||
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||
this.loading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData(this.form.page, this.form.pageSize);
|
||||
if(newData.entitys && newData.entitys.length !==0){
|
||||
this.prizeDrawList = [...this.prizeDrawList, ...newData.entitys]; // 将新数据添加到列表中
|
||||
this.form.page++; // 页码加1
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.loading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData(page, pageSize) {
|
||||
const params = {
|
||||
page,
|
||||
pageSize,
|
||||
}
|
||||
const data = await getWinningList(params);
|
||||
if(data && data.bizcode === 100){
|
||||
return data.data
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData(); // 加载更多数据
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.prize_draw_warp{
|
||||
}
|
||||
.prize_draw_item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #EEEEEE;
|
||||
}
|
||||
.prize_draw_left_warp{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.title_{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.time_{
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.delivery_{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 20rpx;
|
||||
margin-top: 10rpx;
|
||||
.delivery_status{
|
||||
padding: 6rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
color: $app-bt-bj;
|
||||
border: 1rpx solid $app-bt-bj;
|
||||
}
|
||||
.delivery_num{
|
||||
margin-left: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.prize_draw_right_warp{
|
||||
background: $app-bt-bj;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
padding: 10rpx 28rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.yes_{
|
||||
background: #F5F5F5;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="lottery">
|
||||
<dengbo-lotteryWheel :prizes="prizes" :size="626" :duration="5000" @run="Click"
|
||||
@done="Done" ref="luckyWheel" :lightImgs="lightImages" customStyle="borderRadius: 50%;">
|
||||
<template v-slot:bg>
|
||||
<image src="/static/turntable/turntable.png" style="width: 100%; height: 100%" />
|
||||
</template>
|
||||
<template v-slot:pointer>
|
||||
<up-image src="/static/turntable/zz.png" width="40" height="40" mode="widthFix" @click="startWheel"></up-image>
|
||||
</template>
|
||||
</dengbo-lotteryWheel>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lightImages: ['/static/turntable/zz.png', '/static/turntable/turntable.png'],
|
||||
prizes: [{
|
||||
name: '积分',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '50积分',
|
||||
},
|
||||
{
|
||||
name: '积分',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '100积分',
|
||||
},
|
||||
{
|
||||
name: '优惠券',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '15元优惠券',
|
||||
},
|
||||
{
|
||||
name: '家用电器',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '微波炉',
|
||||
},
|
||||
{
|
||||
name: '谢谢参与',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '15元优惠券',
|
||||
},
|
||||
{
|
||||
name: '办公用品',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '机械键盘',
|
||||
},
|
||||
{
|
||||
name: '生活用品',
|
||||
image: '/static/turntable/record.png',
|
||||
pro: '化妆刷',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
startWheel() {
|
||||
this.$refs.luckyWheel.run(2);
|
||||
},
|
||||
Click() {
|
||||
console.log('用户点击了转盘');
|
||||
this.$refs.luckyWheel.run(2);
|
||||
},
|
||||
Done(prize) {
|
||||
console.log('抽奖结束,中奖奖品:', prize);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.lottery {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 626rpx;
|
||||
height: 626rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<view>
|
||||
品牌入驻
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<view class="get_prize_warp">
|
||||
<view class="address_add_warp">
|
||||
<view class="address_form">
|
||||
<view class="add_form_item add_form_item_but">
|
||||
<view class="add_form_title">收货人</view>
|
||||
<up-input
|
||||
placeholder="收货人"
|
||||
border="surround"
|
||||
v-model="form.name"
|
||||
:customStyle="{
|
||||
'border':'0rpx',
|
||||
}"
|
||||
></up-input>
|
||||
</view>
|
||||
<view class="add_form_item add_form_item_but">
|
||||
<view class="add_form_title">手机号码</view>
|
||||
<up-input
|
||||
placeholder="请填写收货人手机号"
|
||||
border="surround"
|
||||
v-model="form.mobile"
|
||||
:customStyle="{
|
||||
'border':'0rpx',
|
||||
}"
|
||||
type="number"
|
||||
></up-input>
|
||||
</view>
|
||||
<view class="add_form_item add_form_item_but" >
|
||||
<view class="add_form_title">所在地区</view>
|
||||
<view class="region_warp" @click="regionShowCheck(true)">
|
||||
<view style="color: #808080;margin-left: 22rpx;font-size: 28rpx;">{{(form.regionStr && form.regionStr.join("/")) || "所在地区"}}</view>
|
||||
<up-image src="/static/common/right_soild.png" width="14" height="14" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add_form_item">
|
||||
<view class="add_form_title">详细地址</view>
|
||||
<up-input
|
||||
placeholder="门牌号、小区、楼栋号、单元室等"
|
||||
border="surround"
|
||||
v-model="form.address"
|
||||
:customStyle="{
|
||||
'border':'0rpx',
|
||||
'height':'100rpx',
|
||||
}"
|
||||
></up-input>
|
||||
</view>
|
||||
<view class="add_form_item">
|
||||
<view class="add_form_title">备注</view>
|
||||
<up-textarea v-model="prizeForm.remark" placeholder="请输入内容" ></up-textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address_select">
|
||||
<view class="msg_">注:此收货地址会默认添加到地址列表</view>
|
||||
<view class="address_" @click="addressShow=true">使用收货地址</view>
|
||||
</view>
|
||||
|
||||
<view class="add_but" @click="addAddress">
|
||||
确认领取
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
<up-picker
|
||||
:show="regionShow"
|
||||
ref="uPickerRef"
|
||||
:columns="regionColumns"
|
||||
@confirm="regionConfirm"
|
||||
:loading="regionLoading"
|
||||
@change="regionChange"
|
||||
keyName="label"
|
||||
itemHeight="34"
|
||||
@cancel="regionShow=false"
|
||||
@close="regionShow=false"
|
||||
></up-picker>
|
||||
</view>
|
||||
<!-- 选择地址 -->
|
||||
<up-popup
|
||||
v-model:show="addressShow"
|
||||
:round="10"
|
||||
:closeOnClickOverlay="false"
|
||||
:closeable="true"
|
||||
:safeAreaInsetBottom="false"
|
||||
@close="checkAddressShow(false)"
|
||||
>
|
||||
<view class="address_popup_warp">
|
||||
<view class="address_popup_title">收件地址</view>
|
||||
<view class="address_popup_content">
|
||||
<Address @valueFunc="getAddressValueFunc"/>
|
||||
</view>
|
||||
<view class="popup_but" @click="addressOk">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { takeGoods } from '@/api/raffle.js';
|
||||
import { editAddress } from '@/api/address.js'
|
||||
import { getCascadeRegion } from '@/api/common.js';
|
||||
import Address from '@/components/address.vue';
|
||||
import { assembleAddress } from '@/utils/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Address,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
id:0,
|
||||
name:null,// 收货人
|
||||
mobile:null,// 手机号码
|
||||
regionStr:null,// 所属地区
|
||||
countryId:null,// 国家ID
|
||||
provinceId:null,// 省份ID
|
||||
cityId:null,// 城市ID
|
||||
areaId:null,// 区域ID
|
||||
address:null,// 详细地址
|
||||
},
|
||||
regionShow:false,
|
||||
regionColumns:[],
|
||||
regionLoading:false,
|
||||
addressShow:false,// 收件地址选择
|
||||
selectAddress:{},// 选中的地址
|
||||
prizeForm:{
|
||||
id:0,
|
||||
addressId:0,//
|
||||
remark:'',// 备注
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const id = option.id;
|
||||
if(id && id !==0){
|
||||
this.prizeForm.id = id;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选择地址的弹框
|
||||
async regionShowCheck(status){
|
||||
if(status){
|
||||
const nation = await this.getRegion(0);
|
||||
const province = nation && nation.length !==0 ? await this.getRegion(nation[0].id):[];
|
||||
const city = province && province.length !==0 ? await this.getRegion(province[0].id):[];
|
||||
const area = city && city.length !==0 ? await this.getRegion(city[0].id):[];
|
||||
this.regionColumns = [nation,province,city,area];
|
||||
}else{
|
||||
this.regionColumns = [[],[],[],[]];
|
||||
}
|
||||
this.regionShow = status;
|
||||
},
|
||||
// 数据交互
|
||||
async getRegion(pId){
|
||||
this.regionLoading = true
|
||||
const params={
|
||||
parentId:pId,
|
||||
}
|
||||
const resp = await getCascadeRegion(params);
|
||||
const arrOption=[];
|
||||
if(resp.bizcode === 100){
|
||||
const data = resp.data;
|
||||
if(data && data.length !==0){
|
||||
data.map(item=>{
|
||||
arrOption.push({
|
||||
id:item.id,
|
||||
label:item.name,
|
||||
pId:pId,
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
this.regionLoading = false;
|
||||
return arrOption
|
||||
},
|
||||
// 地区改变
|
||||
async regionChange(e){
|
||||
const {
|
||||
columnIndex,
|
||||
index,
|
||||
picker
|
||||
} = e;
|
||||
const selectData = this.regionColumns[columnIndex][index];
|
||||
const resultData = await this.getRegion(selectData.id);
|
||||
if(resultData && resultData.length !==0){
|
||||
const index = columnIndex+1;
|
||||
this.regionColumns[index] = resultData;
|
||||
}
|
||||
},
|
||||
|
||||
// 提交地址
|
||||
regionConfirm(e){
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
} = e;
|
||||
const regionStr = [];
|
||||
const regionId = [];
|
||||
value.map(item=>{
|
||||
if(item){
|
||||
regionStr.push(item.label);
|
||||
regionId.push(item.id);
|
||||
}
|
||||
})
|
||||
this.form.regionStr = regionStr;
|
||||
if(regionId && regionId.length !==0){
|
||||
this.form.countryId = regionId[0] ? regionId[0] : null;
|
||||
this.form.provinceId = regionId[1] ? regionId[1] : null;
|
||||
this.form.cityId = regionId[2] ? regionId[2] : null;
|
||||
this.form.areaId = regionId[3] ? regionId[3] : null;
|
||||
}
|
||||
this.regionShowCheck(false);
|
||||
},
|
||||
|
||||
// 添加地址
|
||||
async addAddress(){
|
||||
const params = {
|
||||
...this.form,
|
||||
}
|
||||
if(!params.name){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入收货人",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!params.mobile){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入收货人手机号",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!params.regionStr){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请选择所在地区",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!params.address){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入详细地址",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const selectAddress = this.selectAddress;
|
||||
if(selectAddress && selectAddress.id !== 0){
|
||||
params.id = selectAddress.id;
|
||||
}else{
|
||||
delete params.id;
|
||||
}
|
||||
if(!params.areaId || params.areaId === 0){
|
||||
delete params.areaId;
|
||||
}
|
||||
delete params.regionStr;
|
||||
const res = await editAddress(params);
|
||||
if(res && res.bizcode === 100){
|
||||
const goodsParams={
|
||||
...this.prizeForm,
|
||||
addressId:res.data,
|
||||
}
|
||||
const goodsRes = await takeGoods(goodsParams);
|
||||
if(goodsRes && goodsRes.bizcode === 100){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message:"领取成功",
|
||||
});
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine_winning_record/mine_winning_record'
|
||||
})
|
||||
},1500)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 地址类型
|
||||
checkAddressShow(status,type,addIndex,index){
|
||||
this.addressShow = status;
|
||||
},
|
||||
// 地址选中
|
||||
getAddressValueFunc(item){
|
||||
this.selectAddress = item;
|
||||
},
|
||||
// 地址选中OK
|
||||
addressOk(){
|
||||
const item = this.selectAddress;
|
||||
console.log("item",item);
|
||||
this.form.name=item.name;
|
||||
this.form.mobile=item.phone;
|
||||
this.form.countryId=item.countryId;
|
||||
this.form.provinceId=item.provinceId;
|
||||
this.form.cityId=item.cityId;
|
||||
this.form.areaId=item.areaId;
|
||||
this.form.address=item.address;
|
||||
const regionStr = [];
|
||||
if(item.countryName){
|
||||
regionStr.push(item.countryName);
|
||||
}
|
||||
if(item.provinceName){
|
||||
regionStr.push(item.provinceName);
|
||||
}
|
||||
if(item.cityName){
|
||||
regionStr.push(item.cityName);
|
||||
}
|
||||
if(item.areaName){
|
||||
regionStr.push(item.areaName);
|
||||
}
|
||||
this.form.regionStr = regionStr;
|
||||
this.addressShow = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.get_prize_warp{
|
||||
height: 100vh;
|
||||
background-color: $app-bj;
|
||||
}
|
||||
.address_select{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
.msg_{
|
||||
color: #BDBDBD;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.address_{
|
||||
color: #03A9F4;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,246 @@
|
||||
<template>
|
||||
<view class="mine_about_us">
|
||||
<view class="about_us_image">
|
||||
<up-image src="/static/logo.png" width="100" height="100" bgColor="#f1f6ff00" shape="square" radius="10"></up-image>
|
||||
<view class="msg_">德商汇优品</view>
|
||||
</view>
|
||||
<view class="content_">
|
||||
德商汇优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。
|
||||
</view>
|
||||
<view class="version_">
|
||||
<view class="version_fg"></view>
|
||||
<view class="version_item_" @click="getNewVersion">
|
||||
<view class="title_">检查版本</view>
|
||||
<view class="value_ check_version">
|
||||
<view v-if="isNewVersion" class="check_version_msg">发现新版本</view>
|
||||
<view style="margin-top: 14rpx;">
|
||||
<up-image src="/static/common/right.png" width="16" height="16" bgColor="#f1f6ff00" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="version_fg"></view>
|
||||
<view class="version_item_">
|
||||
<view class="title_">当前版本</view>
|
||||
<view class="value_">v{{localAppVersonName}}.{{localAppVerson}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<up-overlay :show="bannerShow" >
|
||||
<view class="up_content" @tap.stop>
|
||||
<view class="uni-banner">
|
||||
<view class="banner_box">
|
||||
<view class="title_">发现新版本</view>
|
||||
<view class="version_">
|
||||
<view class="version_item">V{{updateApkObj.versionCode}}</view>
|
||||
</view>
|
||||
<view class="conter">{{updateApkObj.content}}</view>
|
||||
<view class="banner_foot" v-if="!bannerPercentageShow">
|
||||
<button @click="goUpdate(updateApkObj,platformType)" class="banner_foot_button">立即更新</button>
|
||||
<view @click="bannerShow = false;" class="banner_foot_button_no" v-if="!updateApkObj.isForce">暂不更新</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<up-line-progress :percentage="bannerPercentage" activeColor="#009A4F"></up-line-progress>
|
||||
<view class="banner_loading_msg">
|
||||
更新中{{bannerPercentage}}%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-overlay>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { comparisonVersionHandler } from '@/utils/index.js';
|
||||
import { checkAppVersion } from '@/api/common.js';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
localAppVersonName:null,
|
||||
localAppVerson:null,
|
||||
isNewVersion:false,// 是否需要跟新
|
||||
platformType:null,// 当前版本号
|
||||
updateApkObj: {} ,// 后台数据
|
||||
bannerShow:false,
|
||||
bannerPercentageShow:false,// 是否显示进度条
|
||||
bannerPercentage:0,// 进度条
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const localAppVersonName = uni.getStorageSync('version');
|
||||
if(localAppVersonName){
|
||||
this.localAppVersonName = localAppVersonName;
|
||||
}
|
||||
const localAppVerson = uni.getStorageSync('versionCode');
|
||||
if(localAppVerson){
|
||||
this.localAppVerson = localAppVerson;
|
||||
}
|
||||
// 获取设备是安卓还是ios
|
||||
const appUpdate = uni.getStorageSync('platform');
|
||||
// #ifdef APP-PLUS
|
||||
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
|
||||
this.checkVersion(); // 判断是否需要更新
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 检查最新的版本
|
||||
*/
|
||||
async checkVersion(){
|
||||
const params={
|
||||
terminal: this.platformType,
|
||||
versionCode:this.localAppVerson,
|
||||
}
|
||||
const res = await checkAppVersion(params)
|
||||
if(res && res.bizcode === 100){
|
||||
const data = res.data || {};
|
||||
if(data && Object.keys(data).length!==0 && comparisonVersionHandler(this.localAppVerson,data.versionCode)){
|
||||
this.isNewVersion = true;
|
||||
}
|
||||
this.updateApkObj = data;
|
||||
}
|
||||
},
|
||||
|
||||
async getNewVersion(){
|
||||
const params={
|
||||
terminal: this.platformType,
|
||||
versionCode:this.localAppVerson,
|
||||
}
|
||||
const res = await checkAppVersion(params)
|
||||
if(res && res.bizcode === 100){
|
||||
const data = res.data || {};
|
||||
if(data && Object.keys(data).length!==0 && comparisonVersionHandler(this.localAppVerson,data.versionCode)){
|
||||
this.updateApkObj = data;
|
||||
this.isNewVersion = true;
|
||||
this.bannerShow = true; // 显示弹窗
|
||||
}else{
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'sesses',
|
||||
message: "当前已为最新版本~",
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 安装
|
||||
goUpdate(updateApkObj,platformType) {
|
||||
const self = this;
|
||||
if (platformType === 'ANDROID') {
|
||||
// 弹出系统等待对话框
|
||||
var dtask = plus.downloader.createDownload(updateApkObj.downloadUrl, {}, function(d, status) {
|
||||
// 下载完成
|
||||
if (status == 200) {
|
||||
plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), {force: true}, function(resp){
|
||||
uni.setStorageSync('versionUpdateTime', dayjs().valueOf()); // 记录升级的时间
|
||||
// 直接重启APP
|
||||
plus.runtime.restart();
|
||||
}, function(error) {
|
||||
console.log("error",error);
|
||||
uni.showToast({
|
||||
title: error.message,
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '更新失败',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
});
|
||||
try {
|
||||
dtask.start(); // 开启下载的任务
|
||||
let prg = 0;
|
||||
self.bannerPercentageShow = true;
|
||||
dtask.addEventListener('statechanged', function(task, status) {
|
||||
// 给下载任务设置一个监听 并根据状态 做操作
|
||||
switch (task.state) {
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
prg = parseInt((parseFloat(task.downloadedSize) / parseFloat(task.totalSize)) * 100);
|
||||
console.log("prg",+prg);
|
||||
self.bannerPercentage = prg;
|
||||
break;
|
||||
case 4:
|
||||
plus.nativeUI.closeWaiting();
|
||||
self.bannerShow = false; // 显示弹窗
|
||||
//下载完成
|
||||
break;
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.log("更新失败-03err",err);
|
||||
plus.nativeUI.closeWaiting();
|
||||
uni.showToast({
|
||||
title: '更新失败-03',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
} else if (platformType === 'IOS') { // ios跳转到app store
|
||||
plus.runtime.openURL(updateApkObj.downloadUrl);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mine_about_us{
|
||||
background-color: $app-bj;
|
||||
padding: 30rpx;
|
||||
height: calc(100% - 60rpx);
|
||||
overflow: auto;
|
||||
.about_us_image{
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
margin-top: 100rpx;
|
||||
.msg_{
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
font-size: 31rpx;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
}
|
||||
.content_{
|
||||
// padding: 30rpx;
|
||||
// margin-top: 20rpx;
|
||||
padding: 60rpx 0;
|
||||
}
|
||||
.version_{
|
||||
margin-top: 20rpx;
|
||||
.version_fg{
|
||||
width: 100%;
|
||||
// height: 1rpx;
|
||||
border-bottom: 1rpx solid rgba(0,0,0,0.16);
|
||||
}
|
||||
.version_item_{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.title_{
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.value_{
|
||||
color: rgba(0,0,0,0.26);
|
||||
}
|
||||
.check_version{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.check_version_msg{
|
||||
color:$app-zt-color
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,521 @@
|
||||
<template>
|
||||
<view class="my_team_warp">
|
||||
<!-- 导航栏 -->
|
||||
<view class="header_">
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image src="/static/common/left_b.png" width="18" height="20" bgColor="#f1f6ff00" @click="jumpMine"/>
|
||||
</view>
|
||||
<view class="title_">我的团队</view>
|
||||
</view>
|
||||
<!-- 我的信息 -->
|
||||
<view class="my_info">
|
||||
<view class="left_">
|
||||
<up-image src="/static/logo_y.png" width="50" height="50" bgColor="#f1f6ff00" shape="circle"/>
|
||||
<view class="left_msg">
|
||||
<view>{{userData.name || '三荣优品用户'}}</view>
|
||||
<view class="left_msg_title">{{userData.gradeName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right_" v-if="performanceData && performanceData.seniorId">
|
||||
我的上级ID:{{performanceData.seniorId || 0}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的团队 -->
|
||||
<view class="card_comm my_team" @click="jumpMyTeam">
|
||||
<view class="card_title_comm">
|
||||
我的团队
|
||||
</view>
|
||||
<view class="my_team_count">
|
||||
<view style="margin-right: 10rpx;">{{(performanceData && performanceData.teamCount) || 0}}人</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image src="/static/common/right.png" width="16" height="16" bgColor="#f1f6ff00" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 团队业绩 -->
|
||||
<view class="card_comm">
|
||||
<view class="card_title_comm card_title_comm2" >
|
||||
<view>团队业绩</view>
|
||||
<up-image src="/static/common/tips.png" width="16" height="16" bgColor="#f1f6ff00" @click="openTeamShow=true;"/>
|
||||
</view>
|
||||
<view class="performance">
|
||||
<view class="performance_item">
|
||||
<view class="title_comm">{{performanceData && performanceData.teamAmount || 0}}</view>
|
||||
<view class="data_comm">订单金额</view>
|
||||
</view>
|
||||
<view class="fg_comm"></view>
|
||||
<view class="performance_item">
|
||||
<view class="title_comm">{{performanceData && performanceData.teamNum || 0}}</view>
|
||||
<view class="data_comm">订单数量</view>
|
||||
</view>
|
||||
<view class="fg_comm"></view>
|
||||
<view class="performance_item">
|
||||
<view class="title_comm">{{performanceData && performanceData.myAmount || 0}}</view>
|
||||
<view class="data_comm">直购订单金额</view>
|
||||
</view>
|
||||
<view class="fg_comm"></view>
|
||||
<view class="performance_item">
|
||||
<view class="title_comm">{{performanceData && performanceData.myNum || 0}}</view>
|
||||
<view class="data_comm">直购订单数</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提成统计-->
|
||||
<view class="royalty_warp">
|
||||
<!-- 提成货币 -->
|
||||
<view class="card_item_comm" @click="currencyShowCheck(true)" style="padding: 30rpx 30rpx 0;">
|
||||
<view class="card_title_comm">
|
||||
提成货币
|
||||
</view>
|
||||
<view class="commission_count">
|
||||
<view style="margin-right: 10rpx;">
|
||||
{{selAcctCategory && Object.keys(selAcctCategory).length !==0 ? selAcctCategory.value : '请选择'}}
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image src="/static/common/right.png" width="16" height="16" bgColor="#f1f6ff00" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_item_comm">
|
||||
<view class="card_title_comm card_title_comm2">
|
||||
<view>提成统计</view>
|
||||
<up-image src="/static/common/tips.png" width="16" height="16" bgColor="#f1f6ff00" @click="openTcShow=true;"/>
|
||||
</view>
|
||||
<view class="performance">
|
||||
<view class="amount_item">
|
||||
<view class="title_comm">{{(rewardSummary && rewardSummary.todayAmount) || 0}}</view>
|
||||
<view class="data_comm">今日</view>
|
||||
</view>
|
||||
<view class="fg_comm"></view>
|
||||
<view class="amount_item">
|
||||
<view class="title_comm">{{(rewardSummary && rewardSummary.unSettleAmount) || 0}}</view>
|
||||
<view class="data_comm">当前未结算</view>
|
||||
</view>
|
||||
<view class="fg_comm"></view>
|
||||
<view class="amount_item">
|
||||
<view class="title_comm">{{(rewardSummary && rewardSummary.settleAmount) || 0}}</view>
|
||||
<view class="data_comm">已结清</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_fg_comm"></view>
|
||||
<view class="card_item_comm">
|
||||
<view class="card_title_comm">提成来源</view>
|
||||
<view class="royalty_list">
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{'height': 'calc(100vh - 1220rpx)'}">
|
||||
<view class="royalty_item" v-for="(item,index) in royaltyList" :key="index" v-if="royaltyList && royaltyList.length !==0">
|
||||
<view>
|
||||
<view class="royalty_title_">{{getValue(BALANCE_TYPE,item.bizType)}}</view>
|
||||
<view class="royalty_data_">{{formatDate(item.ctdate)}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="royalty_title_ royalty_title_amount">{{item.amount}}元</view>
|
||||
<view class="royalty_data_">{{item.status ? "已结算" : "未结算"}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">暂无相关数据</view>
|
||||
</view>
|
||||
<view v-if="royaltyLoading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<up-picker
|
||||
:show="currencyShow"
|
||||
ref="uPickerRef"
|
||||
:columns="currencyColumns"
|
||||
@confirm="currencyConfirm"
|
||||
:loading="currencyLoading"
|
||||
keyName="value"
|
||||
itemHeight="34"
|
||||
@cancel="currencyShow=false"
|
||||
@close="currencyShow=false"
|
||||
></up-picker>
|
||||
<!-- 团队业绩 -->
|
||||
<up-modal :show="openTeamShow" :showConfirmButton = "false">
|
||||
<view class="slot-content">
|
||||
<view class="close_warp" @click="openTeamShow=false;">
|
||||
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="content_">
|
||||
<view class="content_1">温馨提示</view>
|
||||
<view class="content_2">1、订单金额:团队下的总业绩</view>
|
||||
<view class="content_2">2、订单数量:团队下的总订单数</view>
|
||||
<view class="content_2">3、直购订单金额:直推的总订单金额</view>
|
||||
<view class="content_2">4、直购订单数:直推的总订单数</view>
|
||||
</view>
|
||||
<view class="but_">
|
||||
<view class="but_copy" @click="openTeamShow=false;">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-modal>
|
||||
<!-- 提成统计 -->
|
||||
<up-modal :show="openTcShow" :showConfirmButton = "false">
|
||||
<view class="slot-content">
|
||||
<view class="close_warp" @click="openTcShow=false;">
|
||||
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="content_">
|
||||
<view class="content_1">温馨提示</view>
|
||||
<view class="content_2">1、今日:今日0点到当前时间的数据</view>
|
||||
<view class="content_2">2、当前未结算:当前所有收货后未结算的数据</view>
|
||||
<view class="content_2">3、直购订单金额:直推的总订单金额</view>
|
||||
<view class="content_2">4、已结算:所有已结算的数据</view>
|
||||
</view>
|
||||
<view class="but_">
|
||||
<view class="but_copy" @click="openTcShow=false;">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { getPerformance,getAcctCategory,getRewardSummaryRecord,getRewardSummary } from '@/api/team.js';
|
||||
import { formatDate } from '@/utils/index.js';
|
||||
import { BALANCE_TYPE,getValue } from '@/utils/enumUtils.js';
|
||||
import { getStorageFun,USER_DATA } from '@/utils/auth.js';
|
||||
import { getUserInfo } from '@/api/auth.js'
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
BALANCE_TYPE() {
|
||||
return BALANCE_TYPE;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
royaltyForm:{
|
||||
page:1,
|
||||
pageSize:15,
|
||||
category:null,
|
||||
},
|
||||
royaltyList:[],// 提成来源
|
||||
royaltyLoading:false,
|
||||
currencyShow:false,
|
||||
currencyColumns:[],
|
||||
currencyLoading:false,
|
||||
performanceData:{},
|
||||
selAcctCategory:{},// 选择的账户
|
||||
rewardSummary:{},// 提成统计
|
||||
openTeamShow:false,// 团队业绩的提示
|
||||
openTcShow:false,// 提成统计
|
||||
userData:{},// 当前登录对象
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUserInfo();
|
||||
this.getPerformance();
|
||||
this.getAcctCategory();
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
getValue,
|
||||
jumpMine(){
|
||||
uni.switchTab({// 首页
|
||||
url: '/pages/mine/mine',
|
||||
})
|
||||
},
|
||||
jumpMyTeam(){
|
||||
const userData = getStorageFun(USER_DATA);
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_my_team_list/mine_my_team_list',
|
||||
})
|
||||
},
|
||||
// 查询用户信息
|
||||
async getUserInfo(){
|
||||
const result = await getUserInfo();
|
||||
if(result && result.bizcode === 100){
|
||||
const data = result.data;
|
||||
this.userData = result.data || {};
|
||||
}
|
||||
},
|
||||
// 查询团队业绩
|
||||
async getPerformance(){
|
||||
const resp = await getPerformance();
|
||||
if(resp && resp.bizcode === 100){
|
||||
this.performanceData = resp.data;
|
||||
}
|
||||
},
|
||||
|
||||
// 查询账户类型
|
||||
async getAcctCategory(){
|
||||
const resp = await getAcctCategory();
|
||||
if(resp && resp.bizcode === 100){
|
||||
const data = resp.data || [];
|
||||
this.currencyColumns = [data];
|
||||
if(data && data.length !==0){
|
||||
this.selAcctCategory = data[0];
|
||||
this.royaltyForm.category = data[0].key;
|
||||
this.getRewardSummary();
|
||||
this.loadData();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 选择地址的弹框
|
||||
currencyShowCheck(status){
|
||||
this.currencyShow = status;
|
||||
},
|
||||
// 提交地址
|
||||
currencyConfirm(e){
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
} = e;
|
||||
const data = value[0];
|
||||
this.royaltyList = [];
|
||||
this.royaltyForm.page = 1;
|
||||
this.selAcctCategory = data;
|
||||
this.royaltyForm.category = data.key;
|
||||
this.getRewardSummary();
|
||||
this.loadData();
|
||||
this.currencyShowCheck(false);
|
||||
},
|
||||
|
||||
|
||||
// 查询提成概括
|
||||
async getRewardSummary(){
|
||||
const params = {
|
||||
category:this.royaltyForm.category,
|
||||
};
|
||||
const resp = await getRewardSummary(params);
|
||||
if(resp && resp.bizcode === 100){
|
||||
this.rewardSummary = resp.data || [];
|
||||
}
|
||||
},
|
||||
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.royaltyLoading) return; // 如果正在加载,则不重复加载
|
||||
this.royaltyLoading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData();
|
||||
if(newData.entitys && newData.entitys.length !==0){
|
||||
this.royaltyList = [...this.royaltyList, ...newData.entitys]; // 将新数据添加到列表中
|
||||
this.royaltyForm.page++; // 页码加1
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.royaltyLoading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData() {
|
||||
const params = {
|
||||
...this.royaltyForm,
|
||||
}
|
||||
const data = await getRewardSummaryRecord(params);
|
||||
if(data && data.bizcode === 100 && data.data){
|
||||
return data.data
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData(); // 加载更多数据
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my_team_warp{
|
||||
background-color: $app-bt-bj;
|
||||
height: calc(100vh - 144rpx);
|
||||
overflow: hidden;
|
||||
padding: 114rpx 30rpx 30rpx;
|
||||
.header_{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.title_{
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.my_info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #FFFFFF;
|
||||
margin-top: 30rpx;
|
||||
.left_{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.left_msg{
|
||||
margin-left: 10rpx;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.left_msg_title{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.right_{
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
font-size: 23rpx;
|
||||
color: rgba(255,255,255,0.9);
|
||||
line-height: 33rpx;
|
||||
// text-align: right;
|
||||
// width: 50%;
|
||||
// justify-content: space-between;
|
||||
}
|
||||
// .right_item{
|
||||
// margin-left: 20rpx;
|
||||
// }
|
||||
// .right_title{
|
||||
// font-size: 20rpx;
|
||||
// color: #FFFFFF;
|
||||
// }
|
||||
// .right_data{
|
||||
// background: rgba(255,255,255,0.2);
|
||||
// border-radius: 10rpx;
|
||||
// border: 1px solid #FFFFFF;
|
||||
// font-weight: bold;
|
||||
// font-size: 40rpx;
|
||||
// color: #FFFFFF;
|
||||
// padding: 10rpx;
|
||||
// text-align: center;
|
||||
// margin-top: 10rpx;
|
||||
// }
|
||||
}
|
||||
|
||||
.card_comm{
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
padding: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.card_title_comm{
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.card_title_comm2{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card_fg_comm{
|
||||
height: 10rpx;
|
||||
background: #EEEEEE;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
.title_comm{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.fg_comm{
|
||||
width: 1rpx;
|
||||
height: 40rpx;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
.data_comm{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.card_item_comm{
|
||||
padding: 30rpx;
|
||||
}
|
||||
.my_team{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.my_team_count{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.performance{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
.performance_item{
|
||||
width: 24%;
|
||||
text-align:center;
|
||||
}
|
||||
}
|
||||
|
||||
.royalty_warp{
|
||||
border-radius: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF;
|
||||
.amount_item{
|
||||
width: 30%;
|
||||
text-align:center;
|
||||
}
|
||||
.amount_fg{
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: #EEEEEE;
|
||||
border-radius: 1rpx;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.royalty_list{
|
||||
margin-top: 20rpx;
|
||||
// height: 440rpx;
|
||||
// overflow: auto;
|
||||
.royalty_item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #F5F5F5;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.royalty_title_{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.royalty_title_amount{
|
||||
color: $app-bt-bj;
|
||||
}
|
||||
.royalty_data_{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
.content_1{
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.content_2{
|
||||
text-align: left;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
.commission_count{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: rgba(0,0,0,0.06);
|
||||
border-radius: 8rpx;
|
||||
padding:16rpx 10rpx 16rpx 26rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 27rpx;
|
||||
color: rgba(0,0,0,0.4);
|
||||
line-height: 38rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,311 @@
|
||||
<template>
|
||||
<view class="my_team_list">
|
||||
<Header :leftTitle="$t('mine.my.team.title')" left-path-type="navigateTo" :leftPath="leftPath"/>
|
||||
<view class="my_team_list_content">
|
||||
<view class="team_list_card">
|
||||
<view class="amount_">{{(juniorSummaryData && juniorSummaryData.teamAmount) || 0}}</view>
|
||||
<view class="amount_sum">总订单金额</view>
|
||||
<view class="comm_fg"></view>
|
||||
<view class="people_number">
|
||||
<view class="people_number_item">
|
||||
<view class="title_">总人数</view>
|
||||
<view class="value_">{{(juniorSummaryData && juniorSummaryData.teamCount) || 0}}</view>
|
||||
</view>
|
||||
<view class="comm_fg_s"></view>
|
||||
<view class="people_number_item">
|
||||
<view class="title_">直推人数</view>
|
||||
<view class="value_">{{(juniorSummaryData && juniorSummaryData.ztCount) || 0}}</view>
|
||||
</view>
|
||||
<view class="comm_fg_s"></view>
|
||||
<view class="people_number_item">
|
||||
<view class="title_">间推人数</view>
|
||||
<view class="value_">{{(juniorSummaryData && juniorSummaryData.jtCount) || 0}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="current_user_id" v-if="form.userId">当前用户ID:{{form.userId}}</view>
|
||||
<view class="current_user_tips">
|
||||
<up-image src="/static/common/tips_b.png" width="20" height="20" bgColor="#f1f6ff00" @click="openTcShow=true;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="team_list_remarks">
|
||||
<view>注:所有数据均截至到进入页面的时间为止,返回再进入页面数据会更新</view>
|
||||
<view style="margin-left: 40rpx;">总订单金额统计的为所有已支付的订单金额</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{'height': 'calc(100vh - 500rpx)'}">
|
||||
<view class="team_item" v-for="(item,index) in listData" :key="item.id" v-if="listData && listData.length">
|
||||
<view class="team_header" @click="jumpNextLevel(item)">
|
||||
<view class="header_left_">
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image :src="item.userUrl || '/static/logo.png'" width="50" height="50" bgColor="#f1f6ff00" shape="circle" radius='16'></up-image>
|
||||
</view>
|
||||
<view class="right_data">
|
||||
<view class="name_">{{item.userName || '三荣优品用户'}}({{item.gradeName}})</view>
|
||||
<view class="msg_">
|
||||
ID:{{item.userId}}
|
||||
</view>
|
||||
<view class="msg_">
|
||||
注册时间:{{formatDate(item.registTime)}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<up-image src="/static/common/right_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16'></up-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">团队暂无数据</view>
|
||||
</view>
|
||||
<view v-if="royaltyLoading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 提成统计 -->
|
||||
<up-modal :show="openTcShow" :showConfirmButton = "false">
|
||||
<view class="slot-content">
|
||||
<view class="close_warp" @click="openTcShow=false;">
|
||||
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="content_">
|
||||
<view class="content_1">温馨提示</view>
|
||||
<view class="content_2">1、页面数据截至到进入该页面的时间统计</view>
|
||||
<view class="content_2">2、当前页面数据为主用户的数据</view>
|
||||
<view class="content_2">3、下方显示为全部的直推用户,点击后可跳转他/她的团队数据页,查看他/她的直推数据(也就是我的间推)</view>
|
||||
</view>
|
||||
<view class="but_">
|
||||
<view class="but_copy" @click="openTcShow=false;">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import{ getCascadeJunior,getJuniorSummary } from '@/api/team.js';
|
||||
import { formatDate } from '@/utils/index.js';
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
userId:0,
|
||||
page:1,
|
||||
pageSize:15,
|
||||
},
|
||||
loading:false,
|
||||
listData:[],
|
||||
juniorSummaryData:{},// 统计
|
||||
leftPath:"/pages/mine_my_team_list/mine_my_team_list",
|
||||
openTcShow:false,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const id = option.id;
|
||||
if(id && id !== "null"){
|
||||
this.form.userId = id;
|
||||
}else{
|
||||
this.leftPath = '/pages/mine_my_team/mine_my_team';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
this.getJuniorSummary();
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
jumpNextLevel(item){
|
||||
const path = "/pages/mine_my_team_list/mine_my_team_list?id="+item.userId;
|
||||
this.leftPath = path;
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查询统计数据
|
||||
*/
|
||||
async getJuniorSummary(){
|
||||
const resp = await getJuniorSummary();
|
||||
console.log("getJuniorSummary",resp);
|
||||
if(resp && resp.bizcode === 100){
|
||||
this.juniorSummaryData = resp.data;
|
||||
}
|
||||
},
|
||||
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||
this.loading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData();
|
||||
if(newData.entitys && newData.entitys.length !==0){
|
||||
this.listData = [...this.listData, ...newData.entitys]; // 将新数据添加到列表中
|
||||
this.form.page++; // 页码加1
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.loading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData() {
|
||||
const params = {
|
||||
...this.form,
|
||||
}
|
||||
const data = await getCascadeJunior(params);
|
||||
if(data && data.bizcode === 100 && data.data){
|
||||
return data.data
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData(); // 加载更多数据
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my_team_list{
|
||||
// height: calc(100vh - 58rpx);
|
||||
// overflow: auto;
|
||||
background-color: $app-bj;
|
||||
.my_team_list_content{
|
||||
padding:30rpx;
|
||||
}
|
||||
.team_list_card{
|
||||
background-color: $app-bt-bj;
|
||||
text-align: center;
|
||||
color: rgba(255,255,255,0.9);
|
||||
padding:40rpx;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
.current_user_id{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #33333340;
|
||||
padding: 10rpx;
|
||||
font-size: 22rpx;
|
||||
border-radius: 10rpx 0;
|
||||
}
|
||||
.current_user_tips{
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right:20rpx;
|
||||
}
|
||||
.amount_{
|
||||
font-weight: 500;
|
||||
font-size: 58rpx;
|
||||
color: rgba(255,255,255,0.9);
|
||||
}
|
||||
.amount_sum{
|
||||
font-size: 23rpx;
|
||||
color: rgba(255,255,255,0.55);
|
||||
}
|
||||
.comm_fg{
|
||||
border: 2rpx dashed rgba(255,255,255,0.55);
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
.comm_fg_s{
|
||||
width: 1rpx;
|
||||
height: 35rpx;
|
||||
background-color: rgba(255,255,255,0.9);
|
||||
}
|
||||
.people_number{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.people_number_item{
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
.title_{
|
||||
font-size: 23rpx;
|
||||
color: rgba(255,255,255,0.55);
|
||||
line-height: 33rpx;
|
||||
}
|
||||
.value_{
|
||||
font-size: 38rpx;
|
||||
color: rgba(255,255,255,0.9);
|
||||
line-height: 54rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.team_list_remarks{
|
||||
font-size: 20rpx;
|
||||
color: #9E9E9E;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.team_item{
|
||||
padding: 20rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.team_header{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
.header_left_{
|
||||
display: flex;
|
||||
align-items: inherit;
|
||||
width: calc(100% - 70rpx);
|
||||
}
|
||||
.right_data{
|
||||
margin-left: 10rpx;
|
||||
// display: grid;
|
||||
}
|
||||
.name_{
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.msg_{
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.team_content{
|
||||
border-top: 1rpx solid #EEEEEE;
|
||||
padding: 20rpx 0 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.team_content_item{
|
||||
width: 50%;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.team_content2_item{
|
||||
width: 100%;
|
||||
}
|
||||
.title_{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.content_{
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.content_1{
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.content_2{
|
||||
text-align: left;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view class="privacy_agreement_warp">
|
||||
<Header :leftTitle="$t('mine.privacy.agreement.title')" leftPathType="navigateTo" :leftPath="leftPath"/>
|
||||
<view class="privacy_agreement_content_warp">
|
||||
本App名稱:德商汇<br />
|
||||
開發者:德商汇<br />
|
||||
|
||||
我們的隱私政策於2025年1月20日生效。 “德商汇”應用深知個人資訊安全重要性,並會盡全力保護您的個人資訊安全可靠。 我們致力於維持您對我們的信任,恪守原則,保護您的個人資訊。 同時,我們承諾,我們將按業界成熟的安全標準,採取相應的安全保護措施來保護您的個人資訊。<br />
|
||||
請在使用我們的產品或服務前,仔細閱讀並瞭解本《德商汇隱私政策》。<br />
|
||||
我們如何收集和使用您的資訊<br />
|
||||
本隱私政策規定了德商汇如何收集,使用,披露,處理和保護您在使用我們的產品和服務時,通過德商汇提供給我們的資訊。 若我們要求您提供某些資訊,以便在使用德商汇時驗證您的身份,我們將嚴格遵守本隱私政策和/或我們的用戶條款與條件來使用這些資訊。 本隱私政策在製定時充分考慮到您的需求; 您全面瞭解我們的個人資料收集和使用管理,而且確信自己最終能控制提供給德商汇的所有個人資訊,這一點至關重要。<br />
|
||||
在這項隱私政策中。 “個人資訊”指所有通過有關特定個人的資訊,或者與德商汇能够訪問的其他關於該人的資訊結合後,能够直接或簡介識別該人的所有數據。 此類個人資訊包括但不限於您提供或上傳的資訊和設備資訊。<br />
|
||||
通過使用德商汇或其他符合使用法律的操作,即表示您已閱讀並接受本隱私政策中所述之所有條款,包括我們定期作出的任何變更。 為遵守使用法律,包括本地數據保護法律,我們將會對於特定類別的個人數據的處理(如自動個體決策)徵求您的明確同意。 另外,我們承諾遵照適用法律(包括您所在地的數據保護法律)來保護您的個人資訊的隱私,機密,和安全。 同時我們承諾確保我們的全體員工和代理商履行這些義務。<br />
|
||||
最後,我們所希望的就是為我們的用戶帶來最好的體驗。<br />
|
||||
APP安裝及運行所需許可權清單及用途<br />
|
||||
1: INTERNET:允許應用訪問網絡,用於連接網絡以便應用更新內容<br />
|
||||
2: RECORD_AUDIO:允許程式播放視頻類資訊,調節進度<br />
|
||||
3: READ_CALENDAR:讀取行事曆活動,用於郵件功能中讀取並展示系統日程<br />
|
||||
那些資訊會被收集以及我們如何使用這些資訊?<br />
|
||||
收集的資訊類別<br />
|
||||
為了向您提供我們的服務,我們會要求您提供服務所必需的個人資訊。 如過您不提供個人資訊,我們可能無法向您提供我們的產品或服務。<br />
|
||||
我們只會為了詳細說明過的,明確的,合法的目的收集必要的資訊,並保證不會以和上述目的不符的管道處理這些資訊。 我們可能會收集一下各類資訊(無論其是否為個人資訊)<br />
|
||||
您提供給我們或上傳的資訊(包括您的聯系資訊):我們可能收集您提供給我們的個人資訊,例如手機號、德商汇帳號資訊(例如您的姓名、年齡、性別使用記錄)。<br />
|
||||
我們指定與您相關的資訊:我們可能收集並使用諸如您的德商汇帳號等資訊。<br />
|
||||
位置資訊(僅適用於特定服務/功能):與您的位置相關的各類資訊,例如區域和國家代碼、都市程式碼、移動網絡程式碼、移動設備國家代碼、社區識別碼、地區名稱、經緯度資訊、時區設定和語言設定。 登入資訊:與您使用某些功能、移動應用程序和網站相關的資訊,例如cookie和其他匿名識別字科技、IP地址、網絡請求資訊、臨時消息歷史、標準系統日誌和系統崩潰資訊等。<br />
|
||||
設備資訊:為識別您的設備id並預防惡意程式及反作弊,提高服務安全性,保障運營質量及效率,我們會收集您的設備資訊(包括OAID,IMEI,設備序號,MEID,Android ID,IMSI,GUID,MAC地址)。<br />
|
||||
其他資訊:環境特徵值(ECV)(由德商汇帳號位置資訊產生的數值)<br />
|
||||
帳戶憑證:有關您帳戶憑證的資訊,例如手機號等。<br />
|
||||
我們將會在靜默/後臺狀態中收集您的按摩程式使用,用於提升我們提供給您的服務質量。<br />
|
||||
使用許可權:在使用應用的過程中,您可能需要授予應用訪問相機的許可權,以便進行掃碼使用硬體設備。 我們僅在您授權的範圍內使用相機許可權,且不會將相機許可權用於其他目的。<br />
|
||||
法律要求:在法律法規要求的情况下我們可能會根據適用的法律法規、法律程式或政府要求,披露您的個人資訊。<br />
|
||||
自啟動和關聯啟動說明<br />
|
||||
為確保本應用處於關閉或後臺運行狀態下可正常接收到用戶端推送的資訊,本應用須使用(自啟動)能力,將存在一定頻率通過系統發送廣播喚醒本應用自啟動或關聯啟動行為,是因實現功能及服務所必要的。<br />
|
||||
當您打開內容類推送消息,在征得您的明確同意後,會跳轉打開相關內容。 在未征得您同意的情况下,則不會有自啟動或關聯啟動。<br />
|
||||
當您打開本App內部下載的檔案後,不會關聯啟動協力廠商App。<br />
|
||||
我們僅會在以下情况,公開披露您的的個人資訊收集個人資訊的目的在於向您提供產品和/或服務,並且保證我們遵守適用法律。 您特此同意我們可以出於本隱私政策規定的目的處理個人資訊,並向我們的關聯公司(涉及通信、社交媒體、科技和雲業務)和協力廠商服務供應商(定義如下)披露個人資訊。<br />
|
||||
我們可能會將個人資訊用於下列目的:<br />
|
||||
提供、處理、維護、改善、開發我們的商品和/或給您的服務,以及通過設備或德商汇提供的服務。 與您就您的設備、服務或任何普通査詢(例如更新、設備固件/軟體升級、客戶諮詢支持、相關資訊、通知)等進行交流。<br />
|
||||
開展市場行銷相關活動,例如提供行銷和推廣相關的資料和更新。<br />
|
||||
分析和開發與我們產品及服務的使用相關的統計資訊,以更好地改進我們的產品和服務。<br />
|
||||
儲存並維護與您相關的資訊,用於我們運營業務或履行法律義務。 無需與我們的服務器通信,提供本地服務。<br />
|
||||
關於我們如何使用您的資訊(其中可能包含個人資訊),下麵提供了更多詳細資訊:<br />
|
||||
創建您的德商汇帳號。 在通過移動設備創建帳號時收集的個人資訊用於建立用戶的個人帳戶和資料頁。<br />
|
||||
提供基於位置的服務。 在使用德商汇時,我們可能會使用位置資訊判斷設備時區,以保證在設備中準確顯示時間、登入服務地區。 以及根據您的選擇為您提前開啟相應設備等體驗。 您可以隨時進入設備設定或停止使用這一應用程序來關閉這一功能。<br />
|
||||
設備接入。 設備通過App進行操作,無需驗證其設備的真實性。<br />
|
||||
設備狀態顯示。 可以允許您遠程查看設備狀態,以便您時刻查看設備運行情况。<br />
|
||||
收集用戶回饋。 您選擇提供的迴響對幫助德商汇改進我們的服務而言極為珍貴。 為了跟踪您選擇提供的迴響,德商汇可能會使用您所提供的個人資訊與您聯系,並保留記錄。<br />
|
||||
發送通知。 我們可能會不時使用您的個人資訊來發送重要通知,例如有關設備异常運行狀態的通知、您定制的設備推送通知<br />
|
||||
(具體需要根據您購買添加設備的情况而定)、我們的條款、條件和政策變更。<br />
|
||||
德商汇的安全措施<br />
|
||||
我們承諾保證您的個人資訊安全。 為了防止未經授權的訪問、披露或其他類似風險,我們落實了合理的物理、電子和管理措施流程,保護我們從您對德商汇的使用收集的資訊。 我們將採取所有合理的措施保護您的個人資訊。<br />
|
||||
您的個人資訊全都被儲存在安全的服務器上,並在受控設施中受到保護。 我們依據重要性和敏感性對您的數據進行分類,並且保證您的個人資訊具有最高的安全等級。 我們保證通過訪問這些資訊來幫助向您提供產品和服務的員工和協力廠商服務供應商具有嚴格的契约保密義務,如果未能履行這些義務,其將會受到紀律處分或被終止合作。 同樣,我們對以德商汇為基礎的資料存儲設有專門的存取控制措施。 總而言之,我們定期審查資訊收集、儲存和處理實踐,包括物理安全措施,以防止任何未經授權的訪問和使用。<br />
|
||||
我們將採取所有可行的步驟保護您的個人資訊。 但是,您應當意識到互聯網的使用並不總是安全的,囙此,我們不能保證在通過互聯網雙向傳輸時任何個人資訊的安全性或完整性。<br />
|
||||
我們將對個人數據洩露行為採取相應措施,如將洩露現象通報相關監管機构,或在某些情况下依照使用法律(包括您當地的數據保護法律)向數據主體通報個人數據洩露行為。<br />
|
||||
您能做什麼<br />
|
||||
您可以在保護您的個人資訊方面發揮自己的作用,不要向任何人透露您的帳戶資訊,除非此人獲得您的正式授權。 無論您何時作為德商汇帳號用戶登錄德商汇,尤其是在他人的手機上登入時,在結束使用時您總應註銷登出。<br />
|
||||
德商汇不對因您未能保持個人資訊的私密性而導致協力廠商訪問您的個人資訊進而造成的安全疏漏承擔責任。 儘管有上述規定,如果發生互聯網其他任何用戶未經授權使用您帳戶的情况或其他任何安全性漏洞,您必須立即通知我們。<br />
|
||||
您的協助將有助於我們保護您個人資訊的私密性。<br />
|
||||
保留政策<br />
|
||||
如有必要實現收集資訊的目的,或者遵守適用法律要求或允許,我們將一直保留個人資訊。 如果有合理的理由認為保留個人資訊不能實現收集個人資訊的目的,我們將不再保留個人資訊,或删除個人資訊與特定個人相關聯的管道。 如果是為了公眾利益對資訊進行進一步處理歸檔,為了科學或歷史研究目的或根據使用法律進行統計的目的,即使進一步處理資訊的目的與原始目的不相符,德商汇也可以進一步保留數據。<br />
|
||||
您可以控制您的個人資訊<br />
|
||||
聯繫我們<br />
|
||||
德商汇承認每個人對隱私權的關注各不相同。 囙此,我們提供了一些示例,說明德商汇提供的各種管道,供您選擇,以限制收集、使用、披露或處理您的個人資訊,並控制您的隱私權設定:<br />
|
||||
打開或者關閉用戶體驗計畫和位置訪問功能;<br />
|
||||
登入或登出德商汇帳戶;<br />
|
||||
訪問、更新、更正、消除或限制處理您的個人資訊<br />
|
||||
您有權要求訪問和/或更正我們持有的與您有關的任何個人資訊。 當您更新個人資訊時,在我們處理您的請求前,會要求驗證您的身份。 一旦我們獲得充分資訊,可處理您的請求以訪問或更正您的個人資訊時,我們將在適用資料保護法規定的時間內對您的請求做出回應。 根據您的要求. 我們可以將收集和處理的您的個人數據副本免費提供給您。 對於同一資訊的任何額外請求,我們可能會根據使用法律根據實際管理支出收取合理的費用。<br />
|
||||
與您德商汇帳戶中的個人資訊相關的更多詳細資訊,您可以通過您的設備登入帳戶來訪問和更改。<br />
|
||||
註銷帳號<br />
|
||||
您可以通過APP-個人中心-註銷申請註銷您的帳號。 為確保是相應用戶或者該用戶授權的主體申請註銷帳號,德商汇盡最大努力保護用戶的權益。 德商汇嚴格遵守法律法規有關個人資訊保護的規定,以上資訊僅用於本次帳號註銷。<br />
|
||||
德商汇特別提示,您註銷帳號的行為是不可逆的。 除法律法規另有規定外,在您註銷帳號後,我們將删除或匿名化有關您的個人資訊,若删除個人資訊從科技上難以實現的,我們會停止除存儲和採取必要的安全保護措施之外的處理。<br />
|
||||
撤銷同意<br />
|
||||
請注意,您撤銷同意會導致某些法律後果。 根據您撤銷同意讓我們處理您的個人資訊的範圍,這可能表示您不能享受德商汇的產品和服務。<br />
|
||||
其他規定<br />
|
||||
優先順序<br />
|
||||
如果您同意了適用的使用者協定,並且此類使用者協定和本隱私政策之間存在不一致,將以此類使用者協定為准。<br />
|
||||
本隱私政策的更新<br />
|
||||
我們會對隱私政策進行定期稽核,為反映我們資訊慣例的變更,我們可能會更新本隱私政策。 如果我們對本隱私政策進行重大變更,我們將通過(向您帳戶指定的郵箱地址發送)電子郵件或在德商汇公佈或通過移動設備通知您,這樣您可以瞭解我們收集的資訊以及我們如何使用這些資訊。 此類隱私政策變化將從通知或網站規定的生效日期開始適用。 我們建議您定期查閱,獲取我們隱私權實踐的最新資訊。 您繼續使用德商汇上的服務,將被視為接受更新的隱私政策。 在我們向您收集更多的個人資訊或我們希望因為新的目的使用或披露您的個人資訊時,我們會再次征得您的同意。<br />
|
||||
我是否必須同意任何協力廠商條款與條件?<br />
|
||||
我們的隱私政策不適用於協力廠商提供的產品和服務。 德商汇可能包括協力廠商的產品和服務,以及協力廠商網站的連結。 當您使用這些產品或服務時,也可能收集您的資訊。 囙此,我們強烈建議您花時間閱讀該協力廠商的隱私政策,就像閱讀我們的政策一樣。 我們不對協力廠商如何使用他們向您收集的個人資訊負責,也不能控制其使用。 我們的隱私政策不適用通過我們的服務連結的其他網站。<br />
|
||||
當您使用德商汇平臺上這些特定產品的擴展程式服務時,適用協力廠商條款和隱私政策,您將同意各擴展程式的條款。<br />
|
||||
關於我們系統管理您個人資訊的管道<br />
|
||||
聯繫我們<br />
|
||||
我們可能適時會對本隱私權政策進行調整或變更,本隱私權政策的任何更新將以標注更新時間的管道公佈在我們網站上,除法律法規或監管規定另有強制性規定外,經調整或變更的內容一經通知或公佈後生效。 如您在隱私權政策調整或變更後繼續使用我們提供的任一服務或訪問我們相關網站的,我們相信這代表您已充分閱讀、理解並接受修改後的隱私權政策並受其約束。 如果您對本隱私政策有任何意見或問題,或者您對德商汇收集、使用或披露您的個人資訊有任何問題,請通過德商汇中的客服或者問題迴響通路聯繫我們。<br />
|
||||
開發者:德商汇<br />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
leftPath:'/pages/mine_settings/mine_settings',
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const backPath = option.backPath;
|
||||
if(backPath && backPath === "login"){
|
||||
this.leftPath = '/pages/login/login';
|
||||
}
|
||||
if(backPath && backPath === "register"){
|
||||
this.leftPath = '/pages/register/register';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.privacy_agreement_warp{
|
||||
background-color: $app-bj;
|
||||
overflow: hidden;
|
||||
|
||||
.privacy_agreement_content_warp{
|
||||
padding: 40rpx;
|
||||
height: calc(100vh - 242rpx);
|
||||
overflow: auto;
|
||||
}
|
||||
.interval{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.interval2{
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<view class="user_agreement_warp">
|
||||
<Header :leftTitle="$t('mine.user.product.title')" left-path-type="navigateTo" :leftPath="leftPath"/>
|
||||
<view class="user_agreement_content_warp">
|
||||
生效日期:2025/4/01<br />
|
||||
最后更新日期:2025/04/24<br />
|
||||
本协议适用于在 (德商汇)(以下简称“本商城”)购买商品的用户(以下简称“您”或“买家”)。为确保您的合法权益,本商城特制定本售后保障协议,明确售后服务范围、责任及处理流程。请您仔细阅读并确认同意后使用本商城服务。 <br />
|
||||
一、售后服务范围<br />
|
||||
1. 商品质量保障 <br />
|
||||
您在本商城购买的商品如存在 质量问题(如功能故障、破损、与描述不符等),可申请 退货、换货或维修。 <br />
|
||||
质量问题需在 收货后7天内 提出,并提供相关证明(如照片、视频等)。 <br />
|
||||
|
||||
2. 物流问题保障 <br />
|
||||
若因物流原因导致商品 未送达、损坏或丢失,本商城将协助您联系物流公司处理,或提供补发/退款服务。 <br />
|
||||
|
||||
3. 售后时效<br />
|
||||
本商城承诺在收到您的售后申请后 13个工作日内 响应,并在符合条件的情况下 715个工作日内 完成退换货或退款流程。<br />
|
||||
|
||||
|
||||
二、售后申请流程<br />
|
||||
1. 提交申请 <br />
|
||||
您可通过 商城APP/网站 → 订单中心 → 申请售后 提交申请,或联系客服(电话/在线客服)提供 订单号、问题描述及相关证明。<br />
|
||||
|
||||
2. 审核处理 <br />
|
||||
本商城将在 13个工作日内 审核您的申请,并告知处理结果。 <br />
|
||||
如需退货/换货,您需按商城提供的地址寄回商品(保持商品完好,不影响二次销售)。 <br />
|
||||
|
||||
3. 退款/换货/维修 <br />
|
||||
退款:审核通过后,款项将按原支付方式退回(17个工作日到账)。<br />
|
||||
换货:本商城将重新发货,运费由责任方承担(质量问题由商城承担,个人原因由买家承担)。 <br />
|
||||
维修:部分商品(如电子产品)可提供 官方保修服务,具体以品牌售后政策为准。<br />
|
||||
|
||||
三、不适用售后保障的情形<br />
|
||||
1. 人为损坏(如自行拆修、进水、摔坏等)。 <br />
|
||||
2. 超过售后期限(如收货超过15天未反馈问题)。 <br />
|
||||
3. 定制类商品(如刻字、专属设计等)。 <br />
|
||||
4. 虚拟商品(如电子书、会员卡等)。<br />
|
||||
5. 因个人原因不想要(如不喜欢、买错等),除非商城支持“7天无理由退货”。 <br />
|
||||
|
||||
四、责任划分<br />
|
||||
1. 商城责任 <br />
|
||||
因商品质量问题或物流问题导致的售后需求,本商城承担退换货费用。<br />
|
||||
若因商城原因导致售后延迟,将提供适当补偿(如优惠券、积分等)。<br />
|
||||
|
||||
2. 买家责任 <br />
|
||||
提供虚假售后信息(如伪造质量问题),本商城有权拒绝售后并保留法律追责权利。<br />
|
||||
因个人原因(如不喜欢、买错)申请退货,需自行承担退货运费(如适用)。 <br />
|
||||
|
||||
五、争议解决<br />
|
||||
1. 如对售后处理结果有异议,可联系本商城客服协商解决。 <br />
|
||||
2. 协商不成,可向 (商城所在地) 消费者协会或法院提起诉讼。 <br />
|
||||
|
||||
六、其他说明<br />
|
||||
1. 本商城有权根据法律法规或运营需求调整本协议,并通过公告通知用户。 <br />
|
||||
2. 本协议自您首次使用本商城服务时生效。 <br />
|
||||
|
||||
客服联系方式:<br />
|
||||
电话:18888888888<br />
|
||||
邮箱:deshanghui2025@163.com <br />
|
||||
在线客服:商城APP/网站内联系<br />
|
||||
|
||||
|
||||
本协议最终解释权归 (德商汇) 所有。<br />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
leftPath:'/pages/mine_settings/mine_settings'
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
const backPath = option.backPath;
|
||||
if(backPath && backPath === "login"){
|
||||
this.leftPath = '/pages/login/login';
|
||||
}
|
||||
if(backPath && backPath === "register"){
|
||||
this.leftPath = '/pages/register/register';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user_agreement_warp{
|
||||
background-color: $app-bj;
|
||||
overflow: hidden;
|
||||
.user_agreement_content_warp{
|
||||
padding: 40rpx;
|
||||
height: calc(100vh - 242rpx);
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<view class="mine_purse_bonus_waithdraw">
|
||||
<view class="waithdraw_header_">
|
||||
<view style="margin-top: 10rpx;" @click="jumpPurse">
|
||||
<up-image src="/static/common/left.png" width="18" height="18" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view>提现</view>
|
||||
<view @click="jumpLog">提现记录</view>
|
||||
</view>
|
||||
<view class="waithdraw_content_">
|
||||
<view class="content_bank_item">
|
||||
<view class="title_comm">提现账户</view>
|
||||
<view class="bank_" @click="bankShowCheck(true)">
|
||||
<view>{{form.bankName || '请选择'}}</view>
|
||||
<up-image src="/static/common/right.png" width="16" height="16" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_amout_item">
|
||||
<view class="title_comm">提现金额</view>
|
||||
<up-input
|
||||
placeholder="请输入提现金额"
|
||||
border="none"
|
||||
v-model="form.amount"
|
||||
:customStyle="{
|
||||
'height':'110rpx',
|
||||
'background-color':'#F8F8F8',
|
||||
'margin':'10rpx 0',
|
||||
'padding':'0 20rpx',
|
||||
}"
|
||||
type="number"
|
||||
@change="amountChange"
|
||||
>
|
||||
<template #suffix>
|
||||
<text>元</text>
|
||||
<text class="all_" @click="allFun">全部</text>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
<view class="content_amout_item" style="margin-top: 20rpx;">
|
||||
<view class="title_comm">实际到账</view>
|
||||
<up-input
|
||||
placeholder="请输入需要提现金额"
|
||||
border="none"
|
||||
v-model="form.dzAmount"
|
||||
:customStyle="{
|
||||
'height':'110rpx',
|
||||
'background-color':'#F8F8F8',
|
||||
'margin':'10rpx 0',
|
||||
'padding':'0 20rpx',
|
||||
}"
|
||||
disabled
|
||||
>
|
||||
<template #suffix>
|
||||
<text>元</text>
|
||||
</template>
|
||||
</up-input>
|
||||
<view class="amount_">
|
||||
<view>可提现金额:¥{{withdrawAmount}}</view>
|
||||
<view>手续费:{{form.rateAmount}}({{(ruleObj && ruleObj.rate) || 0}}%)</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="withdraw_but" @click="withdrawFun">提现</view>
|
||||
<view class="warm_reminder">
|
||||
<view>温馨提示</view>
|
||||
<view>
|
||||
<view>单笔最小提现金额:{{(ruleObj && ruleObj.minAmount) || 0}}</view>
|
||||
<view>单日最大提现金额:{{(ruleObj && ruleObj.dayAmount) || 0}}</view>
|
||||
<view>单日最大提现次数:{{(ruleObj && ruleObj.dayTimes) || 0}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<up-picker
|
||||
:show="bankShow"
|
||||
:columns="bankOption"
|
||||
keyName="bankName"
|
||||
itemHeight="34"
|
||||
@confirm="bankConfirm"
|
||||
:loading="bankLoading"
|
||||
@cancel="bankShow=false"
|
||||
@close="bankShow=false"
|
||||
></up-picker>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWithdrawalRule,withdrawal } from '@/api/finance.js';
|
||||
import { getBankList } from '@/api/bank.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
category:null,//账户类型
|
||||
amount:null,// 提现金额
|
||||
dzAmount:0,// 到账金额
|
||||
rateAmount:0,// 手续费
|
||||
bankId:null,// 提现银行卡
|
||||
bankName:null,// 提现银行卡名称
|
||||
},
|
||||
withdrawAmount:0,
|
||||
ruleObj:{},// 规则
|
||||
bankOption:[],
|
||||
bankShow:false,
|
||||
bankLoading:false,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const amount = option.amount || 0;
|
||||
if(amount && amount !== "null"){
|
||||
this.withdrawAmount = amount || 0;
|
||||
}
|
||||
const category = option.category;
|
||||
if(category && category !== "null"){
|
||||
this.form.category = category;
|
||||
this.getWithdrawalRule();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpPurse(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/mine_purse/mine_purse",
|
||||
})
|
||||
},
|
||||
allFun(){
|
||||
const amount = this.withdrawAmount;
|
||||
this.form.amount = amount;
|
||||
this.amountChange(amount);
|
||||
},
|
||||
jumpLog(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/mine_purse_bonus_withdraw_log/mine_purse_bonus_withdraw_log?category="+this.form.category,
|
||||
})
|
||||
},
|
||||
async withdrawFun(){
|
||||
const params={
|
||||
...this.form,
|
||||
}
|
||||
if(!params.bankId){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请选择提现银行卡",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!params.amount){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入需要提现余额",
|
||||
});
|
||||
return;
|
||||
}
|
||||
delete params.bankName;
|
||||
const resp = await withdrawal(params);
|
||||
if(resp && resp.bizcode === 100){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: "已成功申请提现",
|
||||
});
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine_purse/mine_purse'
|
||||
});
|
||||
},1500)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 查询规则
|
||||
*/
|
||||
async getWithdrawalRule(){
|
||||
const params={
|
||||
category:this.form.category
|
||||
}
|
||||
const resp = await getWithdrawalRule(params);
|
||||
if(resp && resp.bizcode ===100){
|
||||
this.ruleObj = resp.data;
|
||||
}
|
||||
},
|
||||
// 选择银行的弹框
|
||||
async bankShowCheck(status){
|
||||
if(status){
|
||||
this.bankLoading = true;
|
||||
const resp = await getBankList();
|
||||
if(resp && resp.bizcode === 100){
|
||||
if(!resp.data){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'warring',
|
||||
message: "请先去银行卡管理绑定银行卡",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.bankOption = [resp.data || []];
|
||||
}
|
||||
this.bankLoading = false;
|
||||
}else{
|
||||
this.bankOption = [[]];
|
||||
}
|
||||
this.bankShow = status;
|
||||
},
|
||||
// 提交地址
|
||||
bankConfirm(e){
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
} = e;
|
||||
const data = value[0];
|
||||
this.form.bankId = data.id;
|
||||
this.form.bankName = data.bankName;
|
||||
this.bankShowCheck(false);
|
||||
},
|
||||
amountChange(amount){
|
||||
const rate = this.ruleObj.rate;
|
||||
if(rate && amount){
|
||||
const rateAmount = amount * (rate / 100);
|
||||
this.form.rateAmount = rateAmount.toFixed(2);
|
||||
this.form.dzAmount = (amount - rateAmount).toFixed(2);
|
||||
}else{
|
||||
this.form.rateAmount =0;
|
||||
this.form.dzAmount =0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mine_purse_bonus_waithdraw{
|
||||
background-color: $app-bj;
|
||||
height: calc(100vh - 130rpx);
|
||||
padding: 100rpx 30rpx 30rpx;
|
||||
overflow: auto;
|
||||
.waithdraw_header_{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.waithdraw_content_{
|
||||
margin-top: 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding:30rpx;
|
||||
.content_bank_item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #EEEEEE;
|
||||
padding-bottom: 30rpx;
|
||||
.bank_{
|
||||
display: flex;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.title_comm{
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.content_amout_item{
|
||||
margin: 20rpx 0;
|
||||
.amount_{
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.all_{
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: $app-bt-bj;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.withdraw_but{
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
background-color: $app-bt-bj;
|
||||
margin-top: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.warm_reminder{
|
||||
margin: 60rpx 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<view class="purse_bonus_withdraw_log">
|
||||
<Header :leftTitle="'提现记录('+getValue(ACCOUNT_CATEGORY,form.category)+')'" left-path-type="navigateTo" :leftPath="'/pages/mine_purse_bonus_withdraw/mine_purse_bonus_withdraw?category='+form.category"/>
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{'height':'calc(100vh - 200rpx)'}">
|
||||
<view class="purse_bonus_withdraw_log_content" v-if="logList && logList.length!==0">
|
||||
<view class="log_item" v-for="(item,index) in logList" :key="index">
|
||||
<view>
|
||||
<view class="title_">{{item.bankName}}(**** {{getBankNumber(item.bankNo)}})</view>
|
||||
<view class="msg_">{{formatDate(item.ctdate)}}</view>
|
||||
</view>
|
||||
<view style="text-align: right;">
|
||||
<view class="title_">{{handleAmount(item.amount)}}</view>
|
||||
<view class="msg_">{{getValue(FINANCE_WITHDRAWAL_STATUS,item.status)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">还没有提现记录哦~</view>
|
||||
</view>
|
||||
<view v-if="loading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
import { handleAmount,formatDate,getBankNumber } from '@/utils/index.js';
|
||||
import { ACCOUNT_CATEGORY,ACCOUNT_TYPE,FINANCE_WITHDRAWAL_STATUS,getValue } from '@/utils/enumUtils.js';
|
||||
import { getWithdrawalList } from '@/api/finance.js';
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
ACCOUNT_CATEGORY() {
|
||||
return ACCOUNT_CATEGORY;
|
||||
},
|
||||
ACCOUNT_TYPE() {
|
||||
return ACCOUNT_TYPE;
|
||||
},
|
||||
FINANCE_WITHDRAWAL_STATUS(){
|
||||
return FINANCE_WITHDRAWAL_STATUS;
|
||||
}
|
||||
},
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
logList:[],
|
||||
form:{
|
||||
category:null,
|
||||
page:1,
|
||||
pageSize:20,
|
||||
},
|
||||
loading: false, // 加载状态标志
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
const category = option.category;
|
||||
if(category && category !=="null"){
|
||||
this.form.category = category;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData(); // 页面加载时加载数据
|
||||
},
|
||||
methods: {
|
||||
handleAmount,
|
||||
formatDate,
|
||||
getValue,
|
||||
getBankNumber,
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||
this.loading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData(this.form.page, this.form.pageSize);
|
||||
if(newData.entitys){
|
||||
this.logList = [...this.logList, ...newData.entitys]; // 将新数据添加到列表中
|
||||
this.form.page++; // 页码加1
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.loading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData(page, pageSize) {
|
||||
const params = {
|
||||
page,
|
||||
pageSize,
|
||||
category:this.form.category,
|
||||
}
|
||||
const data = await getWithdrawalList(params);
|
||||
if(data && data.bizcode === 100){
|
||||
return data.data
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData(); // 加载更多数据
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.purse_bonus_withdraw_log{
|
||||
background-color: $app-bj;
|
||||
padding: 30rpx;
|
||||
// height: calc(100vh - 60rpx);
|
||||
// overflow: auto;
|
||||
.log_item{
|
||||
padding:30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.title_{
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.msg_{
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<view class="purse_recharge_warp">
|
||||
<Header
|
||||
:leftTitle="getValue(ACCOUNT_CATEGORY,form.fromCategory)+'兑换'"
|
||||
left-path-type="navigateTo"
|
||||
left-path="/pages/mine_purse/mine_purse"
|
||||
style="background-color: #FFFFFF;"
|
||||
/>
|
||||
<view class="purse_recharge_cntent">
|
||||
<view class="recharge_balance">
|
||||
<view class="recharge_balance_image">
|
||||
<view style="margin-top: 6rpx;">
|
||||
<up-image src="/static/mine/exchange.png" width="20" height="20" bgColor="#f1f6ff00"/>
|
||||
</view>
|
||||
<view class="msg_">可兑换余额</view>
|
||||
</view>
|
||||
<view class="recharge_balance_">{{proAmount}}</view>
|
||||
</view>
|
||||
<view class="form_item">
|
||||
<view class="form_item_title">兑换金额</view>
|
||||
<up-input
|
||||
placeholder="输入需要兑换的金额"
|
||||
border="surround"
|
||||
clearable
|
||||
v-model="form.amount"
|
||||
:customStyle="{
|
||||
'margin-top':'20rpx',
|
||||
'background': '#FFFFFF',
|
||||
'box-shadow': '0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.06)',
|
||||
'border-radius': '8rpx',
|
||||
'height': '80rpx',
|
||||
}"
|
||||
type="number"
|
||||
></up-input>
|
||||
</view>
|
||||
<view class="form_item">
|
||||
<view class="form_item_title">目标账户</view>
|
||||
<view class="recharge_way_warp">
|
||||
<up-radio-group
|
||||
v-model="form.toCategory"
|
||||
placement="column"
|
||||
v-if="wayOption && wayOption.length !==0"
|
||||
>
|
||||
<view :class="index+1 < wayOption.length ? 'way_item way_item_but':'way_item'" v-for="(item,index) in wayOption" :key="item.id">
|
||||
<view class="way_item_">
|
||||
<!-- <view style="margin-top: 2rpx;"><up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image></view> -->
|
||||
<view class="way_item_val">{{getValue(ACCOUNT_CATEGORY,item.category)}}<text v-if="item.rate"> (汇率 1:{{item.rate}})</text></view>
|
||||
</view>
|
||||
<up-radio
|
||||
:name="item.category"
|
||||
activeColor="#03AD27"
|
||||
>
|
||||
</up-radio>
|
||||
</view>
|
||||
</up-radio-group>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">暂无兑换选项</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add_but_" @click="rechargeOk">
|
||||
立即兑换
|
||||
</view>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
import { getExchangeRule,exchange } from '@/api/finance.js';
|
||||
import { ACCOUNT_CATEGORY,getValue } from '@/utils/enumUtils.js';
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
ACCOUNT_CATEGORY() {
|
||||
return ACCOUNT_CATEGORY;
|
||||
},
|
||||
},
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
amount:null,//充值金额
|
||||
fromCategory:null,
|
||||
toCategory:null,
|
||||
},
|
||||
wayOption:[],
|
||||
proAmount:0,// 可兑换的金额
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
const category = option.category;
|
||||
if(category && category !== 'null'){
|
||||
this.form.fromCategory = category;
|
||||
}
|
||||
const amount = option.amount;
|
||||
if(amount && amount !== 'null'){
|
||||
this.proAmount = amount;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWayOption();
|
||||
},
|
||||
methods: {
|
||||
getValue,
|
||||
async getWayOption(){
|
||||
const params={
|
||||
category:this.form.fromCategory,
|
||||
}
|
||||
const result = await getExchangeRule(params);
|
||||
if(result && result.bizcode === 100){
|
||||
this.wayOption = result.data;
|
||||
}
|
||||
},
|
||||
// 立即提现
|
||||
async rechargeOk(){
|
||||
const params = this.form;
|
||||
if(!params.amount){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入需要兑换金额",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!params.toCategory){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请选择目标账户",
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log("params",params);
|
||||
const result = await exchange(params);
|
||||
console.log("result",result);
|
||||
if(result && result.bizcode === 100){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: "已成功申请兑换",
|
||||
});
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine_purse/mine_purse'
|
||||
});
|
||||
},1500)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<view class="purse_log_warp">
|
||||
<Header :leftTitle="$t('mine.purse.mine_purse_log.title')" left-path-type="navigateTo" left-path="/pages/mine_purse/mine_purse"/>
|
||||
<view class="info_warp">
|
||||
<view class="info_title_warp">
|
||||
<view
|
||||
:class="selInfo === item.key ? 'info_title_item_warp info_title_item_sel_warp':'info_title_item_warp'"
|
||||
v-for="item in infoList"
|
||||
:key="item.key"
|
||||
@click="selectInfo(item)"
|
||||
>
|
||||
<text>{{item.name}}</text>
|
||||
<view class="info_title_item_sel_but_warp" v-if="selInfo === item.key"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 抽奖 -->
|
||||
<!-- <view class="info_list_warp" v-if="form.category === 'raffle'">
|
||||
<winningRecord heightRef="calc(100vh - 246rpx)"/>
|
||||
</view> -->
|
||||
<view class="info_list_warp">
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore(selInfo)" style="height:calc(100vh - 308rpx)">
|
||||
<view
|
||||
v-for="item in orderList"
|
||||
:key="item.id"
|
||||
class="purse_info_item"
|
||||
v-if="orderList && orderList.length !==0"
|
||||
>
|
||||
<view class="purse_info_left">
|
||||
<!-- <up-image :src="item.type === 1? '/static/mine/purse_sf.png' : '/static/mine/purse_xf.png'" width="40" height="40" bgColor="#f1f6ff00"></up-image> -->
|
||||
<up-image src="/static/mine/purse_sf.png" width="40" height="40" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="purse_data_warp">
|
||||
<view class="purse_info_name">{{getValue(BALANCE_TYPE,item.type)}}</view>
|
||||
<view class="purse_info_value">{{formatDate(item.ctdate)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ipurse_nfo_right">
|
||||
<view class="purse_info_title">{{handleAmount(item.amount)}}</view>
|
||||
<view class="purse_info_value">{{item.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">暂无记录~</view>
|
||||
</view>
|
||||
<view v-if="loading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
import winningRecord from '@/components/winning_record.vue';
|
||||
import { getAcctFlow} from '@/api/finance.js';
|
||||
import { getValue,BALANCE_TYPE } from '@/utils/enumUtils.js';
|
||||
import { formatDate,handleAmount } from '@/utils/index.js';
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
BALANCE_TYPE() {
|
||||
return BALANCE_TYPE;
|
||||
}
|
||||
},
|
||||
components:{winningRecord,Header},
|
||||
data() {
|
||||
return {
|
||||
infoList:[
|
||||
{
|
||||
name:"活期账户",
|
||||
key:"cur"
|
||||
},
|
||||
{
|
||||
name:"锁定账户",
|
||||
key:"lock"
|
||||
},
|
||||
],
|
||||
selInfo:"cur",
|
||||
form:{
|
||||
id:0,
|
||||
page:1,
|
||||
pageSize:15,
|
||||
category:null,
|
||||
},
|
||||
orderList:[],
|
||||
lockId:0,
|
||||
curId:0,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
const category = option.category;
|
||||
if(category && category!==0){
|
||||
this.form.category=category;
|
||||
}
|
||||
const lockId = option.lockId;
|
||||
const curId = option.curId;
|
||||
if(lockId && lockId !=='null'){
|
||||
this.lockId = lockId;
|
||||
this.selectInfo(this.infoList[1]);
|
||||
}
|
||||
if(curId && curId !=='null'){
|
||||
this.curId = curId;
|
||||
this.selectInfo(this.infoList[0]);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getValue,
|
||||
formatDate,
|
||||
handleAmount,
|
||||
selectInfo(item){
|
||||
this.orderList = [];
|
||||
this.form.page = 1;
|
||||
this.selInfo = item.key;
|
||||
let id = 0;
|
||||
if(item.key === "cur"){
|
||||
id = this.curId;
|
||||
}
|
||||
if(item.key === "lock"){
|
||||
id = this.lockId;
|
||||
}
|
||||
this.form.id = id;
|
||||
this.loadData();
|
||||
},
|
||||
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||
this.loading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData(this.form.page, this.form.pageSize);
|
||||
this.orderList = [...this.orderList, ...newData]; // 将新数据添加到列表中
|
||||
this.form.page++; // 页码加1
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.loading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData(page, pageSize) {
|
||||
if(!this.form.id || this.form.id === 0){
|
||||
return[];
|
||||
}
|
||||
const params = {
|
||||
id:this.form.id,
|
||||
category:this.form.category,
|
||||
page,
|
||||
pageSize,
|
||||
}
|
||||
console.log("params",params);
|
||||
const resp = await getAcctFlow(params);
|
||||
console.log("resp",resp);
|
||||
if(resp && resp.bizcode === 100){
|
||||
const data = resp.data && resp.data.entitys || [];
|
||||
return data
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore(selInfo) {
|
||||
let id = 0;
|
||||
if(selInfo === "cur"){
|
||||
id = this.curId;
|
||||
}
|
||||
if(selInfo === "lock"){
|
||||
id = this.lockId;
|
||||
}
|
||||
this.form.id = id;
|
||||
this.loadData(); // 加载更多数据
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.purse_log_warp{
|
||||
height: calc(100vh - 58rpx);
|
||||
padding: 30rpx;
|
||||
overflow-y: hidden;
|
||||
.info_title_warp{
|
||||
display: flex;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
.info_title_item_warp{
|
||||
margin-right: 40rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.info_title_item_sel_warp{
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.info_title_item_sel_but_warp{
|
||||
background: $app-bt-bj;
|
||||
border-radius: 4rpx;
|
||||
width: 80rpx;
|
||||
height: 8rpx;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
.info_list_warp{
|
||||
margin-top: 30rpx;
|
||||
// height: calc(100vh - 500rpx);
|
||||
// overflow-y: auto;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<view class="purse_recharge_warp">
|
||||
<Header
|
||||
:leftTitle="$t('purse.recharge.title')"
|
||||
left-path-type="navigateTo"
|
||||
left-path="/pages/mine_purse/mine_purse"
|
||||
style="background-color: #FFFFFF;"
|
||||
/>
|
||||
<view class="purse_recharge_cntent">
|
||||
<view class="recharge_balance">
|
||||
<view class="recharge_balance_image">
|
||||
<up-image src="/static/mine/recharge.png" width="20" height="20" bgColor="#f1f6ff00"/>
|
||||
<view class="msg_">现金余额</view>
|
||||
</view>
|
||||
<view class="recharge_balance_">{{proAmount}}</view>
|
||||
</view>
|
||||
<view class="form_item">
|
||||
<view class="form_item_title">充值金额</view>
|
||||
<up-input
|
||||
placeholder="输入需要充值的金额"
|
||||
border="surround"
|
||||
clearable
|
||||
v-model="form.amount"
|
||||
:customStyle="{
|
||||
'margin-top':'20rpx',
|
||||
'background': '#FFFFFF',
|
||||
'box-shadow': '0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.06)',
|
||||
'border-radius': '8rpx',
|
||||
'height': '80rpx',
|
||||
}"
|
||||
type="number"
|
||||
></up-input>
|
||||
</view>
|
||||
<view class="form_item">
|
||||
<view class="form_item_title">支付方式</view>
|
||||
<view class="recharge_way_warp">
|
||||
<up-radio-group
|
||||
v-model="form.payway"
|
||||
placement="column"
|
||||
>
|
||||
<view :class="index+1 < wayOption.length ? 'way_item way_item_but':'way_item'" v-for="(item,index) in wayOption" :key="item.id">
|
||||
<view class="way_item_">
|
||||
<!-- <view style="margin-top: 2rpx;"><up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image></view> -->
|
||||
<view class="way_item_val">{{item.name}}<text v-if="item.balance"> ({{item.balance}})</text></view>
|
||||
</view>
|
||||
<up-radio
|
||||
:name="item.type"
|
||||
activeColor="#03AD27"
|
||||
>
|
||||
</up-radio>
|
||||
</view>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add_but_" @click="rechargeOk">
|
||||
立即充值
|
||||
</view>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
import { getRechargeSupportPay,recharge } from '@/api/finance.js';
|
||||
import { feedback } from '@/api/payment.js';
|
||||
import { appWxpayFun,zfbPayFun } from '@/utils/payUtils.js'
|
||||
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
category:null,
|
||||
amount:null,//充值金额
|
||||
payway:null,// 支付当时
|
||||
},
|
||||
wayOption:[],
|
||||
proAmount:0,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
const category = option.category;
|
||||
if(category && category !== 'null'){
|
||||
this.form.category = category;
|
||||
}
|
||||
const amount = option.amount;
|
||||
if(amount && amount !== 'null'){
|
||||
this.proAmount = amount;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWayOption();
|
||||
},
|
||||
methods: {
|
||||
async getWayOption(){
|
||||
const result = await getRechargeSupportPay();
|
||||
if(result && result.bizcode === 100){
|
||||
this.wayOption = result.data;
|
||||
}
|
||||
},
|
||||
// 立即充值
|
||||
async rechargeOk(){
|
||||
const params = this.form;
|
||||
if(!params.amount){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请输入需要充值的金额",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!params.payway){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "请选择支付方式",
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log("params",params);
|
||||
const result = await recharge(params);
|
||||
console.log("result",result);
|
||||
if(result && result.bizcode === 100){
|
||||
const item = result.data;
|
||||
console.log("item",item);
|
||||
if(item.wechat && Object.keys(item.wechat).length !==0){
|
||||
this.appWxpay(item.wechat,item.orderId,item.orderNum);
|
||||
}else if(item.alipay && Object.keys(item.alipay).length !==0 && item.alipay){
|
||||
this.zfbPay(item.alipay,item.orderId,item.orderNum);
|
||||
}else{
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "充值失败",
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
// app 微信支付
|
||||
async appWxpay(alipay,orderId,orderNum){
|
||||
try {
|
||||
const result = await appWxpayFun(alipay,orderId,orderNum);
|
||||
console.log('支付成功', result);
|
||||
// 处理支付成功后的逻辑,如更新订单状态等
|
||||
} catch (error) {
|
||||
console.error('支付失败', error);
|
||||
// 处理支付失败后的逻辑,如提示用户等
|
||||
}
|
||||
// const newThis = this;
|
||||
// const orderInfo = {
|
||||
// "appid": item.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
|
||||
// "noncestr": item.nonceStr, // 随机字符串
|
||||
// "package": "Sign=WXPay", // 固定值
|
||||
// "partnerid": item.partnerId, // 微信支付商户号
|
||||
// "prepayid": item.prepayId, // 统一下单订单号
|
||||
// "timestamp": item.timeStamp, // 时间戳(单位:秒)
|
||||
// "sign": item.sign // 签名,这里用的 MD5/RSA 签名
|
||||
// };
|
||||
// uni.requestPayment({
|
||||
// provider:"wxpay",
|
||||
// orderInfo: orderInfo,
|
||||
// success: function(res) {
|
||||
// console.log('success:' + res);
|
||||
// newThis.payFeedbackFun(orderId,orderNum,1);
|
||||
// newThis.jumpWayOk();
|
||||
// },
|
||||
// fail: function(err) {
|
||||
// console.log('fail:',err);
|
||||
// newThis.$refs.uToastRef.show({
|
||||
// type: 'error',
|
||||
// message: "充值失败",
|
||||
// });
|
||||
// setTimeout(()=>{
|
||||
// newThis.jumpWayError()
|
||||
// },2000)
|
||||
// }
|
||||
// });
|
||||
},
|
||||
// 支付宝支付
|
||||
async zfbPay(alipay,orderId,orderNum){
|
||||
try {
|
||||
const result = await zfbPayFun(alipay,orderId,orderNum);
|
||||
console.log('支付成功', result);
|
||||
// 处理支付成功后的逻辑,如更新订单状态等
|
||||
} catch (error) {
|
||||
console.error('支付失败', error);
|
||||
// 处理支付失败后的逻辑,如提示用户等
|
||||
}
|
||||
// const that = this;
|
||||
// uni.requestPayment({
|
||||
// provider: 'alipay',
|
||||
// orderInfo: item,
|
||||
// success(res) {
|
||||
// that.payFeedbackFun(orderId,orderNum,1);
|
||||
// that.jumpWayOk();
|
||||
// },
|
||||
// //调用失败的回调
|
||||
// fail(err) {
|
||||
// that.$refs.uToastRef.show({
|
||||
// type: 'error',
|
||||
// message: "充值失败",
|
||||
// });
|
||||
// setTimeout(()=>{
|
||||
// that.jumpWayError()
|
||||
// },2000)
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 跳转到支付成功页面
|
||||
jumpWayOk(){
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: "充值成功",
|
||||
});
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine_purse/mine_purse'
|
||||
});
|
||||
},1500)
|
||||
},
|
||||
// 支付结果回调
|
||||
async payFeedbackFun(orderId,orderNum,status){
|
||||
const params = {
|
||||
orderId,
|
||||
orderNum,
|
||||
status,
|
||||
}
|
||||
const response = await feedback(params);
|
||||
console.log("response",response);
|
||||
if(response && response.bizcode !==100){
|
||||
console.error("反馈结果",response);
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<view class="mine_setting">
|
||||
<Header :leftTitle="$t('mine.settings.title')" left-path-type="switchTab" leftPath="/pages/mine/mine"/>
|
||||
<view class="mine_setting_content">
|
||||
<view class="setting_comm">
|
||||
<view class="header_user">
|
||||
<view class="mine_data" >
|
||||
<up-image src="/static/logo_y.png" shape="circle" width="60" height="60" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="mine_info">
|
||||
<view class="mine_info_name">{{userData.name || '德商汇用户'}}</view>
|
||||
<view class="mine_info_id">邀请码:{{userData.inviteCode}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view @click="jumpSetting">
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="header_fg"></view>
|
||||
<view class="item_comm" @click="jumpInfo('address')">
|
||||
<view>地址管理</view>
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="setting_comm">
|
||||
<view class="item_comm">
|
||||
<view>账号安全</view>
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="header_fg"></view>
|
||||
<view class="item_comm">
|
||||
<view>绑定收款信息</view>
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="setting_comm">
|
||||
<view class="item_comm" @click="jumpInfo('userAgreement')">
|
||||
<view>用户协议</view>
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="header_fg"></view>
|
||||
<view class="item_comm" @click="jumpInfo('privacyAgreement')">
|
||||
<view>隐私协议</view>
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="header_fg"></view>
|
||||
<view class="item_comm" @click="jumpInfo('productAgreement')">
|
||||
<view>售后保障协议</view>
|
||||
<up-image src="/static/common/right_x.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="header_fg"></view>
|
||||
<view class="item_comm" @click="jumpInfo('aboutUs')">
|
||||
<view>关于我们</view>
|
||||
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="login_out_warp" @click="loginOutFun">
|
||||
退出登录
|
||||
</view>
|
||||
<view class="cancel_but" @click="cancelAccount">
|
||||
注销账号
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getStorageFun,USER_DATA,clear } from '@/utils/auth.js'
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
userData:{},// 当前登录对象
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.userData = getStorageFun(USER_DATA);
|
||||
},
|
||||
methods:{
|
||||
// 退出登录
|
||||
loginOutFun(){
|
||||
clear();
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
cancelAccount(){
|
||||
clear();
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
jumpInfo(type){
|
||||
// 地址
|
||||
if(type === "address"){
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_address/mine_address'
|
||||
})
|
||||
}else if(type === "aboutUs"){
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_about_us/mine_about_us'
|
||||
})
|
||||
}else if(type === "userAgreement"){// 用户协议
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_user_agreement/mine_user_agreement'
|
||||
})
|
||||
}else if (type === "privacyAgreement"){// 隐私政策
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_privacy_agreement/mine_privacy_agreement'
|
||||
})
|
||||
}else if (type === "productAgreement"){// 售后保障协议
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_product_agreement/mine_product_agreement'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mine_setting{
|
||||
background-color: $app-bj;
|
||||
height: calc(100% - 60rpx);
|
||||
.mine_setting_content{
|
||||
padding: 30rpx;
|
||||
}
|
||||
.setting_comm{
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
padding:30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.mine_data{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.mine_info_not_login{
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.mine_info{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.mine_info_name{
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
color: #111111;
|
||||
display: flex;
|
||||
}
|
||||
.mine_info_id{
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.header_user{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.header_fg{
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background: #E7E7E7;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
.item_comm{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.login_out_warp{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
background-color: $app-bt-bj;
|
||||
padding: 20rpx;
|
||||
width: calc(100% - 40rpx);
|
||||
border-radius: 10rpx;
|
||||
margin: 140rpx 0 0rpx;
|
||||
}
|
||||
.cancel_but{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
width: calc(100% - 40rpx);
|
||||
margin-top: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
padding: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<view class="user_agreement_warp">
|
||||
<Header :leftTitle="$t('mine.user.agreement.title')" left-path-type="navigateTo" :leftPath="leftPath"/>
|
||||
<view class="user_agreement_content_warp">
|
||||
本应用“德商汇”(下称:德商汇)系由“德商汇”开发。<br />
|
||||
《软件许可和用户协议》(以下简称“本协议”)是您(或称“用户”)与德商汇及其关联公司(以下简称“关联公司”)、其合作单位(包括但不限于第三方平台,以下简称“合作单位”)之间关于用户下载、安装、使用“德商汇”(以下简称“本软件”)及使用德商汇相关产品和服务所订立的协议。德商汇和关联公司、合作单位分别就您在本应用程序接受服务的过程中享受的权利和承担的义务,与您签订本协议,并独立向您承担责任,互不承担保证、连带或共同责任等。本软件及服务的所有权和运营权均归德商汇所有。<br />
|
||||
德商汇(以下简称“德商汇”)在此特别提醒用户认真阅读、充分理解《软件许可及用户协议》(以下简称“本协议”)。用户务必审慎阅读、充分理解各条款内容,特别涉及免除或者限制德商汇责任、法律适用和争议解决的条款,尤此类条款将以加粗的形式提示您注意。请您审慎阅读并选择接受或不接受本协议(未成年人应在法定监护人陪同下阅读)。您的下载、安装、使用本软件以及账号获取和登录等行为将视为对本协议的接受,并同意接受本协议各项条款的约束,并与德商汇达成一致,成为德商汇平台用户。阅读本协议的过程中,如果您不同意本协议或其中任何条款约定,您应立即停止注册、使用。<br />
|
||||
德商汇有权修订本协议,更新后的协议条款将公布于软件,自公布之日起生效。<br />
|
||||
用户可重新下载安装本软件或软件中的关于查阅最新版协议条款。在德商汇修改本协议条款后,如果用户不接受修改后的条款,请立即停止使用德商汇提供的软件和服务,用户继续使用德商汇提供的软件和服务将被视为已接受了修改后的协议。<br />
|
||||
一、知识产权声明及授权范围<br />
|
||||
1.1.德商汇就本软件给予用户一项个人的、不可转让、不可转授权以及非独占性的许可。<br />
|
||||
1.2.用户可以为非商业目的在单一台移动终端设备上安装、使用、显示、运行本软件。但用户不得为商业运营目的安装、使用、运行本软件,不可以对本软件或者本软件运行过程中释放到任何终端设备内存中的数据及本软件运行过程中客户端与服务器端的交互数据进行复制、更改、修改、挂接运行或创作任何衍生作品,形式包括但不限于使用插件、外挂或非经授权的第三方工具/服务接入本软件和相关系统。如果需要进行商业性的销售、复制和散发,例如软件预装和捆绑,必须获得德商汇的书面授权和许可。<br />
|
||||
1.3.除本《协议》明示授权外,德商汇未授权给用户其他权利,若用户使用其他权利时须另外取得德商汇的书面同意。<br />
|
||||
1.4.考虑到互联网业务的高速发展,本协议条款并不能完整覆盖您与德商汇的所有权利和义务,也不能保证完全符合发展的需求。德商汇平台的法律声明、隐私政策、平台规范、规则、通知、公告、操作规则、帮助文档、温馨提示等均为本协议的补充协议,与本协议不可分割且具有同等法律效力。如您使用本平台服务,视为您同意上述补充协议。<br />
|
||||
二、软件的获取、安装、升级<br />
|
||||
2.1.用户应当按照德商汇的指定网站或指定方式下载安装本软件产品。谨防在非指定网站下载本软件,以免移动终端设备感染能破坏用户数据和获取用户隐私信息的恶意程序。如果用户从未经德商汇授权的第三方获取本软件或与本软件名称相同的安装程序,德商汇无法保证该软件能够正常使用,并对因此给您造成的损失不予负责。<br />
|
||||
2.2.用户必须选择与所安装终端设备相匹配的本软件版本,否则,由于软件与设备型号不相匹配所导致的任何软件问题、设备问题或损害,均由用户自行承担。<br />
|
||||
2.3.为了改善用户体验、完善服务内容,德商汇有权不时地为您提供本软件替换、修改、升级版本,也有权为替换、修改或升级收取费用,但将收费提前征得您的同意。软件新版本发布后,德商汇不保证旧版本软件的继续可用。<br />
|
||||
三、德商汇账号申请与使用<br />
|
||||
3.1.如您登录本软件,需注册有德商汇帐号。您对德商汇帐号的申请、使用等行为应符合德商汇帐号使用协议及德商汇不时修订并公布的规范。<br />
|
||||
3.2.在您开始注册程序使用本平台服务前,您应当具备中华人民共和国法律规定的与您行为相适应的民事行为能力。若您不具备前述与您行为相适应的民事行为能力,则您应当在您的监护人的参与下使用本款软件,您及您的监护人应依照法律规定承担因此而导致的一切后果。您账户下的操作行为,仅代表您本人;如需代表特定的单位在德商汇平台购买商品或享受服务,您须按照德商汇的要求提供该单位相关的证件材料及授权材料。此外,您还需确保您不是任何国家、国际组织或者地域实施的贸易限制、制裁或其他法律、规则限制的对象,否则您可能无法正常注册及使用德商汇平台服务。<br />
|
||||
四、使用规范<br />
|
||||
4.1.用户在遵守法律及本《协议》的前提下可依本《协议》使用本软件及服务,用户不得实施如下行为:<br />
|
||||
4.1.1.对本软件进行反向工程,如反汇编、反编译或者其他试图获得本软件的源代码;<br />
|
||||
4.1.2.通过修改或伪造软件运行中的指令、数据,增加、删减、变动软件的功能或运行效果,或者将用于上述用途的软件、方法进行运营或向公众传播,无论这些行为是否为商业目的;<br />
|
||||
4.1.3.使用本软件进行任何危害网络安全的行为,包括但不限于:使用未经许可的数据或进入未经许可的服务器/账户;未经允许进入公众网络或者他人操作系统并删除、修改、增加存储信息;未经许可企图探查、扫描、测试本软件的系统或网络的弱点或其它实施破坏网络安全的行为;企图干涉、破坏本软件系统或网站的正常运行,故意传播恶意程序或病毒以及其他破坏干扰正常网络信息服务的行为;伪造TCP/IP数据包名称或部分名称;<br />
|
||||
4.1.4.未经德商汇书面同意,用户对软件及其中的信息擅自实施包括但不限于下列行为:使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版,建立镜像站点、擅自借助本软件发展与之有关的衍生产品、作品、服务、插件、外挂、兼容、互联等;<br />
|
||||
4.1.5.利用本软件发表、传送、传播、储存违反当地法律法规的内容;<br />
|
||||
4.1.6.利用本软件发表、传送、传播、储存侵害他人知识产权、商业秘密等合法权利的内容;<br />
|
||||
4.1.7.利用本软件批量发表、传送、传播广告信息及垃圾信息;<br />
|
||||
4.1.8.其他以任何不合法的方式、为任何不合法的目的、或以任何与本协议许可使用不一致的方式使用本软件和德商汇提供的其他服务;<br />
|
||||
4.2信息发布规范<br />
|
||||
4.2.1您可使用本软件发表属于您原创或您有权发表的观点看法、数据、文字、信息、用户名、图片、照片、个人信息、音频、视频文件、链接等信息内容。您必须保证,您拥有您所上传信息内容的知识产权或已获得合法授权,您使用本软件及服务的任何行为未侵犯任何第三方之合法权益。<br />
|
||||
4.2.2您在使用本软件时需遵守当地法律法规要求。<br />
|
||||
4.2.3我们不会与德商汇(及相关关联公司或者相关服务提供的主体)以外的任何公司、组织和个人共享您的个人信息,但以下情况除外:<br />
|
||||
(1)事先获得您明确的同意或授权;<br />
|
||||
(2)根据适用的法律法规、法律程序的要求、强制性的行政或司法要求所必须的情况下进行提供,包括但不限于有关主管部门按照《电子商务法》要求德商汇提供有关电子商务数据信息(其中包含部分个人信息)的。<br />
|
||||
4.2.4.您在使用本软件时不得利用本软件从事以下行为,包括但不限于:<br />
|
||||
4.2.4.1.制作、复制、发布、传播、储存违反当地法律法规的内容;<br />
|
||||
4.2.4.2.发布、传送、传播、储存侵害他人名誉权、肖像权、知识产权、商业秘密等合法权利的内容;<br />
|
||||
4.2.4.3.虚构事实、隐瞒真相以误导.欺骗他人;<br />
|
||||
4.2.4.4.发表、传送、传播广告信息及垃圾信息;<br />
|
||||
4.2.4.5.从事其他违反当地法律法规的行为。<br />
|
||||
4.2.5.您声明并保证,您对您所发布的信息拥有相应、合法的权利。否则,德商汇可对您发布的信息依法或依本协议进行删除或屏蔽。同时,德商汇不对任何您所发布的有关信息内容的真实性、适用性、合法性承担责任。<br />
|
||||
4.3【禁止性信息】您应当确保您所发布的信息不包含以下内容:<br />
|
||||
(1)违反国家法律法规禁止性规定的;<br />
|
||||
(2)政治宣传、封建迷信、淫秽、色情、赌博、暴力、恐怖或者教唆犯罪的;<br />
|
||||
(3)欺诈、虚假、不准确或存在误导性的;<br />
|
||||
(4)侵犯他人知识产权或涉及第三方商业秘密及其他专有权利的;<br />
|
||||
(5)侮辱、诽谤、恐吓、涉及他人隐私等侵害他人合法权益的;<br />
|
||||
(6)存在可能破坏、篡改、删除、影响德商汇平台任何系统正常运行或未经授权秘密获取德商汇相关平台及其他用户的数据、个人资料的病毒、木马、爬虫等恶意软件、程序代码的;<br />
|
||||
(7)其他违背社会公共利益或公共道德或依据相关德商汇平台协议、规则的规定不适合在德商汇平台上发布的。<br />
|
||||
4.4.未经许可,您不得在本软件中进行任何诸如发布广告、销售商品的商业行为<br />
|
||||
4.5.为方便您使用德商汇平台等其他相关服务,您授权德商汇将您在账户注册和使用德商汇平台服务过程中提供、形成的信息传递给其他相关服务提供者,或从其他相关服务提供者获取您在注册、使用相关服务期间提供、形成的信息。<br />
|
||||
4.6您理解并同意:<br />
|
||||
4.6.1.德商汇对用户是否涉嫌违反上述使用规范做出认定,并根据认定结果中止、终止对您的使用许可或采取其他依本约定可采取的限制措施;<br />
|
||||
4.6.2.对于用户使用许可软件时发布的涉嫌违法或涉嫌侵犯他人合法权利或违反本协议的信息,德商汇直接删除;<br />
|
||||
4.6.3.对于用户违反上述使用规范的行为对第三方造成损害的,您需要以自己的名义独立承担法律责任,并应确保德商汇免于因此产生损失或增加费用;<br />
|
||||
4.6.4.若用户违反有关法律规定或协议约定,使德商汇遭受损失,或受到第三方的索赔,或受到行政管理机关的处罚,用户应当赔偿德商汇因此造成的损失和(或)发生的费用,包括合理的律师费、调查取证费用。<br />
|
||||
4.7(第三方内容/服务说明】本软件可能包含由德商汇的关联方或第三方提供的内容或服务,德商汇只是为了用户便利操作而在本软件中提供相关功能模块,提供第三方内容或服务的使用入口。<br />
|
||||
4.7.1.不论第三方内容或服务预置于本软件中,还是由用户自行开通或订购,用户均理解并同意,德商汇不对第三方内容或服务提供方或用户行为的合法性、有效性,以及第三方内容或服务的合法性、准确性、有效性、安全性进行任何明示或默示的保证或担保。<br />
|
||||
4.7.2.德商汇并不监督第三方内容或服务,不对其拥有任何控制权,也不对第三方服务提供任何形式的保证或担保,更不承担任何责任。<br />
|
||||
4.7.3.用户与第三方内容或服务提供方之间发生的任何争议、纠纷应由用户与第三方服务提供方自行协商解决,德商汇不承担任何责任。<br />
|
||||
五、变更<br />
|
||||
5.1.德商汇可根据国家法律法规变化及维护交易秩序、保护消费者权益需要,不时修改本协议、补充协议,变更后的协议、补充协议(下称“变更事项”)将通过法定程序并以合理方式通知您。<br />
|
||||
5.2.德商汇和合作公司有权按需要修改或变更所提供的收费服务、收费标准、收费方式、服务费及服务条款。德商汇在提供服务时,可能现在或日后对部分服务的用户开始收取一定的费用如用户拒绝支付该等费用,则不能在收费开始后继续使用相关的服务。德商汇和合作公司将尽最大努力通过电邮或其他方式通知用户有关的修改或变更。<br />
|
||||
5.3.如您对已生效的变更事项仍不同意的,您应当于变更事项确定的生效之日起停止使用德商汇平台服务,变更事项对您不产生效力;如您在变更事项生效后仍继续使用德商汇平台服务,则视为您同意已生效的变更事项。<br />
|
||||
六、账号终止<br />
|
||||
6.1当您发生以下任一情况时,德商汇平台有权限制您的全部或部分权限(包括但不限于下单、参加促销活动等),取消相关未履行完毕的订单、解除合同,或者注销您的德商汇帐号:<br />
|
||||
(1) 通过网络攻击、大量发布广告等行为影响网站正常经营或影响网站为其他用户提供服务;<br />
|
||||
(2)多次在评论区或咨询区发布与所售商品或服务无关的信息,或多次恶意进行负面评价,违反平台信用评价制度的;<br />
|
||||
(3)通过不正当手段(如外挂工具、网络攻击、盗刷银行卡等方式)或其他违法,侵犯第三人利益的方式谋取利益;<br />
|
||||
(4)利用销售方过错或失误进行恶意索赔、投诉达两次或以上,或者无故对销售商或客服人员进行辱骂、人身攻击;<br />
|
||||
(5)非因商品/服务质量原因,短期内多次拒收商品或拒绝接受服务;<br />
|
||||
(6)通过账户购物从事索赔或转售业务的(如批发、零售);<br />
|
||||
(7)您提供的订单信息(包括但不限于姓名、电话、身份证号、电子邮箱等)不真实、不准确或不完整;<br />
|
||||
(8)您有其他影响平台正常经营秩序或违法行为。<br />
|
||||
6.2.一旦您在德商汇平台的账户被终止,您使用德商汇平台服务的权利即告终止。德商汇不因终止本协议对您承担任何责任,包括终止您的用户账户和删除您的用户内容;德商汇也没有义务向您或第三方提供您使用德商汇平台服务所形成的信息资料。<br />
|
||||
七、知识产权声明<br />
|
||||
7.1【知识产权保护】德商汇是本软件的知识产权权利人。本软件的一切著作权、商标权、专利权、商业秘密等知识产权,以及与本软件相关的所有信息内容(包括但不限于文字、图片、音频、视频、图表、界面设计、版面框架、有关数据或电子文档等)均受您所在当地法律法规和相应的国际条约保护,德商汇享有上述知识产权。您使用德商汇帐号及德商汇平台服务的行为应符合相关协议关于知识产权的约定。<br />
|
||||
7.2【知识产权许可】您在使用德商汇平台服务时利用德商汇帐号发表上传的文字、图片等原创信息的知识产权归您所有但是您确认您对该等信息的发表、上传行为视同为对德商汇非独占地、永久地、不可撤销地授予该等信息相关全部知识产权的使用、复制等权利,并且您同意德商汇可转授权上述权利。<br />
|
||||
7.3【知识产权归属】除非经过德商汇的在先书面同意,您未获得权利使用德商汇的任何知识产权。您保证、陈述并承诺您尊重德商汇的知识产权。您不会以自己名义或促使第三方,也不会同意或放任任何第三方,为了其任何营销、广告、促销或其他目的,在任何法域、以任何方式申请与德商汇或德商汇关联公司商标相似的商标、域名、无线网站、互联网搜索词或任何商号、服务标志。如出现上述情况,您须将所有相关权利转让给德商汇,费用由您承担。您保证、陈述并承诺,不会使用以下名称(包括但不限于“德商汇”)、上述品牌的附属标志及图案(包括但不限于等)作为企业、商户、服务或产品名称的一部分,亦不会使用与德商汇商标或近似商标的知识产权。如因您违反本条款约定而给德商汇造成损失的,该损失全部由您承担。<br />
|
||||
7.4【侵权处理】您在德商汇发布的信息不得侵犯任何第三人的知识产权,未经具有相关所有权人之事先书面同意,您不得以任何方式上传、发布、修改、传播或复制任何受著作权保护的材料、商标或属于其他人的专有信息。如您认为德商汇平台上的商品或其他信息侵犯了您的知识产权,请按照德商汇平台上公布的知识产权保护规则及流程处理。<br />
|
||||
八、通知<br />
|
||||
您在注册成为德商汇用户,并接受德商汇平台服务时,您应该向德商汇提供真实有效的联系方式(包括联系电话等),对于联系方式发生变更的,您有义务及时更新有关信息,并保持可被联系的状态。德商汇向您浏览界面推送的弹窗等通知形式,也作为向您发出的有效通知。德商汇将向您的上述联系方式的其中之一或其中若干向您送达各类通知,而此类通知的内容可能对您的权利义务产生重大的有利或不利影响,请您务必及时关注。您应当保证所提供的联系方式是准确、有效的,并进行实时更新。如果因提供的联系方式不确切,或不及时告知变更后的联系方式,使通知无法送达或未及时送达,由您自行承担由此可能产生的法律后果。<br />
|
||||
九、适用法律及争议解决<br />
|
||||
9.1本协议应适用中华人民共和国法律。您因使用德商汇平台服务所产生及与德商汇平台服务有关的争议,由德商汇与您协商解决。协商不成时,任何一方均可向上海市青浦区有管辖权的人民法院提起诉讼。<br />
|
||||
9.2本协议中的某些条款因故无法适用,则本协议的其他条款继续适用且无法适用的条款将会被修改,以便其能够依法适用。<br />
|
||||
9.3未明示授权的其他权利仍由德商汇保留,您在行使这些权利时须另外取得德商汇的书面许可。德商汇如果未行使前述任何权利,并不构成对该权利的放弃。<br />
|
||||
十、其他<br />
|
||||
10.1.用户在使用本软件某一特定服务时,该服务可能会另有单独的协议、相关业务规则等(以下统称为“单独协议”),您在使用该项服务前请阅读并同意相关的单独协议。<br />
|
||||
10.2.本协议生效时间为2025年1月20日。<br />
|
||||
10.3.本协议所有条款的标题仅为阅读方便,本身并无实际涵义,不能作为本协议涵义解释的依据。<br />
|
||||
10.4.本协议条款无论因何种原因部分无效或不可执行,其余条款仍有效,对双方具有约束力。<br />
|
||||
开发者:德商汇<br />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
leftPath:'/pages/mine_settings/mine_settings'
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const backPath = option.backPath;
|
||||
if(backPath && backPath === "login"){
|
||||
this.leftPath = '/pages/login/login';
|
||||
}
|
||||
if(backPath && backPath === "register"){
|
||||
this.leftPath = '/pages/register/register';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user_agreement_warp{
|
||||
background-color: $app-bj;
|
||||
overflow: hidden;
|
||||
.user_agreement_content_warp{
|
||||
padding: 40rpx;
|
||||
height: calc(100vh - 242rpx);
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<view class="mine_winning_record">
|
||||
<winningRecord />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import winningRecord from '@/components/winning_record.vue';
|
||||
|
||||
export default {
|
||||
components:{winningRecord},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mine_winning_record{
|
||||
padding: 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<view class="order_sumbit_ok_warp">
|
||||
<Header leftTitle="" left-path-type="switchTab" left-path="/pages/mine/mine"/>
|
||||
<view class="order_sumbit_ok_content">
|
||||
<view class="ok_img">
|
||||
<up-image src="/static/product/error.png" width="120" height="120" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="ok_img_msg">支付失败</view>
|
||||
</view>
|
||||
<view class="ok_but" @click="jumpHome">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpHome(){
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home',
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.order_sumbit_ok_warp{
|
||||
height: calc(100vh - 80rpx);
|
||||
text-align: center;
|
||||
.order_sumbit_ok_content{
|
||||
padding: 40rpx;
|
||||
}
|
||||
.ok_img{
|
||||
display: grid;
|
||||
.ok_img_msg{
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #222222;
|
||||
}
|
||||
}
|
||||
.ok_but{
|
||||
margin-top: 100rpx;
|
||||
background: $app-bt-bj;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
height: 46rpx;
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<view>
|
||||
<Header leftTitle="H5支付" leftPathType="switchTab" leftPath="/pages/mine/mine"/>
|
||||
<view class="payment_processing_warp">
|
||||
<up-loading-icon :show="loadingShow" color="#009A4F"></up-loading-icon>
|
||||
<view class="payment_processing_msg">{{orderMsg}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
import { queryResult } from '@/api/payment.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderNum:0,// 支付处理ID
|
||||
paymentLink:null,// H5支付处理页面
|
||||
orderMsg:"支付处理中...",
|
||||
loadingShow:true,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log("options",options);
|
||||
this.orderNum = options.orderNum || 0;
|
||||
const paymentLink = options.link;
|
||||
if(paymentLink && paymentLink !== "null"){
|
||||
this.paymentLink = paymentLink; // 解码并设置支付链接
|
||||
uni.navigateTo({
|
||||
url: `/pages/zfb_payment/zfb_payment?link=${paymentLink}` // 假设有一个专门的支付页面来处理支付链接
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.orderNum){
|
||||
this.getOrderById();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getOrderById(){
|
||||
const params={
|
||||
orderNum:this.orderNum,
|
||||
};
|
||||
console.log("params",params);
|
||||
const resp = await queryResult(params);
|
||||
console.log("queryResult resp",resp);
|
||||
if(resp && resp.bizcode === 100){
|
||||
const data = resp.data || {};
|
||||
if(data.state === 0){ // 订单不存在
|
||||
this.loadingShow = false;
|
||||
this.orderMsg = "订单不存在";
|
||||
}else if(data.state === 1){// 支付中
|
||||
this.orderMsg = "支付处理中...";
|
||||
}else if(data.state === 2){// 支付成功
|
||||
this.loadingShow = false;
|
||||
this.orderMsg = "支付成功";
|
||||
this.jumpWayOk();
|
||||
}else if(data.state === 3){// 支付失败
|
||||
this.loadingShow = false;
|
||||
this.orderMsg = "支付失败";
|
||||
this.jumpWayError();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 跳转到支付成功页面
|
||||
jumpWayOk(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/order_submit_ok/order_submit_ok",
|
||||
})
|
||||
},
|
||||
// 跳转到支付失败页面
|
||||
jumpWayError(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/order_submit_error/order_submit_error",
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.payment_processing_warp{
|
||||
text-align: center;
|
||||
margin-top: 200rpx;
|
||||
.payment_processing_msg{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="paymentLink"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
paymentLink:''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log("options",options);
|
||||
this.paymentLink = decodeURIComponent(options.link); // 解码并设置支付链接
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 390 KiB |
|
After Width: | Height: | Size: 763 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 296 B |
|
After Width: | Height: | Size: 552 B |
|
After Width: | Height: | Size: 998 B |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 218 KiB |
|
After Width: | Height: | Size: 383 KiB |
|
After Width: | Height: | Size: 760 B |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 798 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,3 @@
|
||||
## 1.0.0(2024-10-10)
|
||||
1.0.0
|
||||
1.0.0
|
||||
@@ -0,0 +1,536 @@
|
||||
<template>
|
||||
<!-- 幸运轮盘容器 -->
|
||||
<view class="lucky-wheel-container" :style="containerStyle">
|
||||
<!-- 轮盘背景 -->
|
||||
<view class="lucky-wheel-bg">
|
||||
<slot v-if="$slots && $slots.bg" name="bg" />
|
||||
</view>
|
||||
<!-- 轮盘主体 -->
|
||||
<view class="lucky-wheel" :style="wheelStyle">
|
||||
<view class="lucky-wheel-wrap">
|
||||
<!-- 遍历奖项,创建每个扇形区域 -->
|
||||
<view v-for="(item, index) in prizes" :key="index" class="prize-item"
|
||||
:style="[getPrizeItemStyle(index)]">
|
||||
<view class="prize-content" :style="[getCorrectAngle(index)]">
|
||||
<!-- 扇形背景 -->
|
||||
<view class="prize-content-bg">
|
||||
<image v-if="getPrizeBgImage(index)" :src="getPrizeBgImage(index)"
|
||||
style="width: 100%;height: 100%;" />
|
||||
</view>
|
||||
<slot :item="item" :index="index">
|
||||
<text class="prize-name">{{ item.name }}</text>
|
||||
<view class="prize-pro">
|
||||
<image :src="item.iconUrl" style="width: 98rpx;height: 70rpx;"></image>
|
||||
<!-- <view class="prize-pro-txt">{{item.parValue}}</view> -->
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 指针 -->
|
||||
<view class="pointer">
|
||||
<view v-if="$slots && $slots.pointer" class="pointer-heart">
|
||||
<slot name="pointer" class="pointer-heart" />
|
||||
</view>
|
||||
<view v-else class="pointer-triangle pointer-heart" @click="$emit('run')"></view>
|
||||
</view>
|
||||
<!-- 添加闪光灯容器 -->
|
||||
<view class="lights-container">
|
||||
<view v-for="(light, index) in lights" :key="index" class="light" :style="[getLightStyle(index)]">
|
||||
<image v-if="lightImgs.length > 0" :src="getCurrentImage(index)"
|
||||
style="width: 100%;height: 100%;position: absolute;left: 0;right: 0;" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* LuckyWheel 组件属性定义
|
||||
* @property {Array} prizes - 奖项列表
|
||||
* @property {Number} [size=600] - 轮盘大小
|
||||
* @property {String} [customStyle] - 轮盘自定义样式
|
||||
* @property {Object} [styleOpt] - 样式选项
|
||||
* @property {String} [innerStyle="width: 85%;height:85%"] - 内部样式
|
||||
* @property {Number} [turns=10] - 旋转圈数
|
||||
* @property {Number} [duration=5000] - 旋转持续时间(毫秒)
|
||||
* @property {Number} [lightNormalSpeed=1000] - 正常闪光灯速度
|
||||
* @property {Number} [lighFastSpeed=50] - 快速闪光灯速度
|
||||
* @property {String} [lightSize="26rpx"] - 闪光灯大小
|
||||
* @property {Array} [lightColors=['#FF0000', '#FFFF00']] - 闪光灯颜色列表
|
||||
* @property {Array} [lightImgs=[]] - 闪光灯图片列表
|
||||
* @property {Array} [prizeBgImages=[]] - 扇形背景图数组
|
||||
*/
|
||||
export default {
|
||||
name: 'LuckyWheel',
|
||||
props: {
|
||||
prizes: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
size: {
|
||||
type: Number,
|
||||
default: 600,
|
||||
},
|
||||
customStyle: {
|
||||
type: String,
|
||||
},
|
||||
styleOpt: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
prizeBgColors: ['#fff0a3', '#fffce6','#fdba64'],
|
||||
borderColor: '#ffd752',
|
||||
})
|
||||
},
|
||||
innerStyle: {
|
||||
type: String,
|
||||
default: `width: 85%;height:85%`
|
||||
},
|
||||
turns: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
duration: {
|
||||
type: Number,
|
||||
default: 5000,
|
||||
},
|
||||
lightNormalSpeed: {
|
||||
type: Number,
|
||||
default: 1000
|
||||
},
|
||||
lighFastSpeed: {
|
||||
type: Number,
|
||||
default: 50
|
||||
},
|
||||
lightSize: {
|
||||
type: String,
|
||||
default: `26rpx`
|
||||
},
|
||||
lightColors: {
|
||||
type: Array,
|
||||
default: () => ['#FF0000', '#FFFF00']
|
||||
},
|
||||
lightImgs: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
prizeBgImages: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rotating: false, // 是否正在旋转
|
||||
rotationAngle: 0, // 当前旋转角度
|
||||
// 设置指针默认指向的位置,现在是默认指向2个扇形之间的边线上
|
||||
rotateAngle: 0,
|
||||
rotateTransition: '',
|
||||
animationInterval: null,
|
||||
lights: [], // 用于存储闪光灯信息
|
||||
currentAnimationStep: 0,
|
||||
lightConfig: {
|
||||
animationSpeed: 1000, // 初始动画速度,单位毫秒
|
||||
totalLights: 0, // 总灯数,将在 mounted 中设置
|
||||
},
|
||||
lotteryIndex:null,// 中奖下标
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 计算轮盘样式
|
||||
containerStyle() {
|
||||
let {
|
||||
size,
|
||||
customStyle
|
||||
} = this;
|
||||
size = /\d$/.test(size) ? size + 'rpx' : size;
|
||||
return `width: ${size}; height: ${size}; ${customStyle}`;
|
||||
},
|
||||
|
||||
wheelStyle() {
|
||||
return `
|
||||
padding: ${this.styleOpt.padding};
|
||||
transform: ${this.rotateAngle};
|
||||
transition: ${this.rotateTransition};
|
||||
${this.innerStyle}
|
||||
`;
|
||||
},
|
||||
|
||||
getCorrectAngle() {
|
||||
return index => {
|
||||
const style = {
|
||||
transform: `skewY(${90 - 360 / this.prizes.length}deg) skewX(0deg) rotate(${180 / this.prizes.length}deg)`
|
||||
}
|
||||
if (this.prizes.length == 2) {
|
||||
if (index == 0) {
|
||||
style['transform'] = `rotate(90deg)`
|
||||
style['bottom'] = 0
|
||||
} else {
|
||||
style['transform'] = `rotate(0deg)`
|
||||
style['left'] = 0
|
||||
style['bottom'] = '-50%'
|
||||
}
|
||||
|
||||
}
|
||||
return style
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 计算每个奖项扇形的样式
|
||||
getPrizeItemStyle(index) {
|
||||
const style = {
|
||||
transform: `rotate(${(360 / this.prizes.length) * index}deg) skewX(0deg) skewY(${360 / this.prizes.length - 90}deg)`,
|
||||
}
|
||||
if (this.prizes.length == 2) {
|
||||
style['transform'] = index == 0 ? 0 : `rotate(270deg)`
|
||||
style['top'] = 0
|
||||
}
|
||||
// 只有在没有背景图片时才设置背景色
|
||||
if (!this.getPrizeBgImage(index)) {
|
||||
style.backgroundColor = `${this.styleOpt.prizeBgColors[index % this.styleOpt.prizeBgColors.length]}`;
|
||||
}
|
||||
return style
|
||||
},
|
||||
// 开始旋转
|
||||
startRotation(index) {
|
||||
if (this.rotating) return;
|
||||
const duration = this.duration;
|
||||
const length = this.prizes.length;
|
||||
// const index = 4;
|
||||
|
||||
const rotateAngle = this.rotationAngle + this.turns * 360 + 360 - (180 / length + (360 / length) * index) -
|
||||
(this.rotationAngle % 360);
|
||||
console.log("rotateAngle",rotateAngle);
|
||||
this.rotationAngle = rotateAngle;
|
||||
this.rotateAngle = `rotate(${rotateAngle}deg)`;
|
||||
this.rotateTransition = `transform ${duration}ms cubic-bezier(0.250, 0.460, 0.455, 0.995)`;
|
||||
this.rotating = true;
|
||||
|
||||
// 加速闪光灯动画
|
||||
this.accelerateLightAnimation();
|
||||
|
||||
// console.log("this.lotteryIndex",this.lotteryIndex);
|
||||
setTimeout(() => {
|
||||
this.$emit('done');
|
||||
this.rotating = false;
|
||||
this.stopSpinningAnimation();
|
||||
// 恢复正常速度
|
||||
this.resetLightAnimation();
|
||||
}, duration + 500);
|
||||
},
|
||||
|
||||
accelerateLightAnimation() {
|
||||
this.stopLightAnimation();
|
||||
this.lightConfig.animationSpeed = this.lighFastSpeed;
|
||||
this.startLightAnimation();
|
||||
},
|
||||
|
||||
resetLightAnimation() {
|
||||
this.stopLightAnimation();
|
||||
this.lightConfig.animationSpeed = this.lightNormalSpeed;
|
||||
this.startLightAnimation();
|
||||
},
|
||||
|
||||
stopSpinningAnimation() {
|
||||
clearInterval(this.animationInterval);
|
||||
// cancelAnimationFrame(this.animationInterval);
|
||||
},
|
||||
// 对外暴露的启动方法
|
||||
// run(index) {
|
||||
// this.startRotation(index);
|
||||
// },
|
||||
run(index) {
|
||||
this.startRotation(index);
|
||||
},
|
||||
// 设置次数
|
||||
setCount(count){
|
||||
console.log("count",count);
|
||||
this.lotteryIndex = count;
|
||||
},
|
||||
// 初始化闪光灯
|
||||
initLights() {
|
||||
this.lightConfig.totalLights = this.prizes.length * 2;
|
||||
this.lights = Array(this.lightConfig.totalLights).fill().map(() => ({}));
|
||||
},
|
||||
// 获取闪光灯样式
|
||||
getLightStyle(index) {
|
||||
const angle = (360 / this.lights.length) * index - 90;
|
||||
const radius = 44.5; // 使用 50% 作为半径
|
||||
const radian = angle * (Math.PI / 180);
|
||||
const x = 50 + radius * Math.cos(radian);
|
||||
const y = 50 + radius * Math.sin(radian);
|
||||
const style = {
|
||||
left: `${x}%`,
|
||||
top: `${y}%`,
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: this.lightSize,
|
||||
height: this.lightSize
|
||||
};
|
||||
if (this.lightImgs.length === 0) {
|
||||
style.backgroundColor = this.getCurrentColor(index)
|
||||
style.boxShadow = `0 0 5px ${this.getCurrentColor(index)}`
|
||||
}
|
||||
return style;
|
||||
},
|
||||
getCurrentColor(colorIndex) {
|
||||
if (this.lightImgs.length > 0) return ''; // 如果有图片,不返回颜色
|
||||
const totalSteps = this.lightColors.length;
|
||||
const currentStep = this.currentAnimationStep % totalSteps;
|
||||
const currentColorIndex = (colorIndex + currentStep) % totalSteps;
|
||||
return this.lightColors[currentColorIndex];
|
||||
},
|
||||
getCurrentImage(colorIndex) {
|
||||
if (this.lightImgs.length === 0) return ''; // 如果没有图片,返回空字符串
|
||||
const totalSteps = this.lightImgs.length;
|
||||
const currentStep = this.currentAnimationStep % totalSteps;
|
||||
const currentImageIndex = (colorIndex + currentStep) % totalSteps;
|
||||
return this.lightImgs[currentImageIndex];
|
||||
},
|
||||
startLightAnimation() {
|
||||
this.animationInterval = setInterval(() => {
|
||||
this.currentAnimationStep++;
|
||||
// 强制更新视图
|
||||
this.$forceUpdate();
|
||||
}, this.lightConfig.animationSpeed);
|
||||
},
|
||||
stopLightAnimation() {
|
||||
if (this.animationInterval) {
|
||||
clearInterval(this.animationInterval);
|
||||
this.animationInterval = null;
|
||||
}
|
||||
},
|
||||
// 新增:获取扇形背景图
|
||||
getPrizeBgImage(index) {
|
||||
if (this.prizeBgImages.length === 0) {
|
||||
// 如果没有提供背景图,返回 null
|
||||
return null;
|
||||
}
|
||||
return this.prizeBgImages[index % this.prizeBgImages.length];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initLights();
|
||||
this.startLightAnimation();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.stopSpinningAnimation();
|
||||
this.stopLightAnimation();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/* 轮盘容器样式 */
|
||||
.lucky-wheel-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.lucky-wheel-bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.lucky-wheel-d {
|
||||
position: absolute;
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 0;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.wheel-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.wheel-image-1 {
|
||||
animation: blink-1 1000ms infinite linear;
|
||||
}
|
||||
|
||||
.wheel-image-2 {
|
||||
animation: blink-2 1000ms infinite linear;
|
||||
}
|
||||
|
||||
@keyframes blink-1 {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-2 {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 轮盘主体样式 */
|
||||
.lucky-wheel {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
transition-property: transform;
|
||||
transition-timing-function: cubic-bezier(0.250, 0.460, 0.455, 0.995);
|
||||
}
|
||||
|
||||
.lucky-wheel-wrap {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 奖项扇形样式 */
|
||||
.prize-item {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
/* 奖项内容样式 */
|
||||
.prize-content {
|
||||
position: absolute;
|
||||
padding-top: 16rpx;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: -50%;
|
||||
bottom: -50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.prize-content-bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* 奖项图片样式 */
|
||||
.prize-image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* 奖项名称样式 */
|
||||
.prize-name {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #DA402B;
|
||||
// color: #FFFFFF;
|
||||
}
|
||||
|
||||
.prize-pro {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.prize-pro-txt {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-weight: 400;
|
||||
font-size: 14rpx;
|
||||
color: #E26241;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 指针样式 */
|
||||
.pointer {
|
||||
position: absolute;
|
||||
// top: 50%;
|
||||
top:47%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pointer-triangle {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 20px solid transparent;
|
||||
border-right: 20px solid transparent;
|
||||
border-bottom: 40px solid #ff0000; /* 红色三角形 */
|
||||
/* 删除 transform: rotate(180deg); 这一行 */
|
||||
}
|
||||
|
||||
.pointer-heart {
|
||||
animation: heart 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes heart {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.lights-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.light {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"id": "dengbo-lotteryWheel",
|
||||
"displayName": "uniapp抽奖-转盘",
|
||||
"version": "1.0.0",
|
||||
"description": "uniapp抽奖-转盘",
|
||||
"keywords": [
|
||||
"抽奖",
|
||||
"转盘",
|
||||
"闪光灯",
|
||||
"跑马灯"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
},
|
||||
"dcloudext": {
|
||||
"type": "component-vue",
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "y"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
},
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "u",
|
||||
"app-uvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "u",
|
||||
"微信浏览器(Android)": "u",
|
||||
"QQ浏览器(Android)": "u"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "u",
|
||||
"Edge": "u",
|
||||
"Firefox": "u",
|
||||
"Safari": "u"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "u",
|
||||
"阿里": "u",
|
||||
"百度": "u",
|
||||
"字节跳动": "u",
|
||||
"QQ": "u",
|
||||
"钉钉": "u",
|
||||
"快手": "u",
|
||||
"飞书": "u",
|
||||
"京东": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
# dengbo-lotteryWheel 组件
|
||||
|
||||
dengbo-lotteryWheel 是一个用于创建抽奖转盘的 uniapp 组件。它提供了一个可自定义的转盘界面,支持动画效果和奖品展示。
|
||||
|
||||
## 属性
|
||||
|
||||
| 属性名 | 类型 | 默认值 | 描述 |
|
||||
|--------|------|--------|------|
|
||||
| prizeList | Array | [] | 奖品列表,每个奖品对象应包含 `icon` 和 `name` 属性 |
|
||||
| rotateTime | Number | 5 | 转盘旋转时间(秒) |
|
||||
| rotateDeg | Number | 0 | 转盘旋转的角度 |
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名 | 描述 |
|
||||
|--------|------|
|
||||
| rotateEnd | 转盘停止旋转时触发 |
|
||||
|
||||
## 示例
|
||||
|
||||
## 使用方法
|
||||
|
||||
```
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="lottery">
|
||||
<dengbo-lotteryWheel :prizes="prizes" :size="626" :duration="5000" @run="onWheelClick"
|
||||
@done="onWheelDone" ref="luckyWheel" :lightImgs="lightImages" customStyle="borderRadius: 50%;">
|
||||
<template v-slot:bg>
|
||||
<image src="/static/tzbj.png" style="width: 100%; height: 100%" />
|
||||
</template>
|
||||
<template v-slot:pointer>
|
||||
<image src="/static/tan.png" style="width: 212rpx" mode="widthFix" @click="startWheel"/>
|
||||
</template>
|
||||
</dengbo-lotteryWheel>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lightImages: ['/static/tpoint1.png', '/static/tpoint2.png'],
|
||||
prizes: [{
|
||||
name: '积分',
|
||||
image: '/static/thb.png',
|
||||
pro: '50积分',
|
||||
},
|
||||
{
|
||||
name: '积分',
|
||||
image: '/static/thb.png',
|
||||
pro: '100积分',
|
||||
},
|
||||
{
|
||||
name: '优惠券',
|
||||
image: '/static/thb.png',
|
||||
pro: '15元优惠券',
|
||||
},
|
||||
{
|
||||
name: '家用电器',
|
||||
image: '/static/thb.png',
|
||||
pro: '微波炉',
|
||||
},
|
||||
{
|
||||
name: '谢谢参与',
|
||||
image: '/static/thb.png',
|
||||
pro: '15元优惠券',
|
||||
},
|
||||
{
|
||||
name: '办公用品',
|
||||
image: '/static/thb.png',
|
||||
pro: '机械键盘',
|
||||
},
|
||||
{
|
||||
name: '生活用品',
|
||||
image: '/static/thb.png',
|
||||
pro: '化妆刷',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
startWheel() {
|
||||
this.$refs.luckyWheel.run(2);
|
||||
},
|
||||
onWheelClick() {
|
||||
console.log('用户点击了转盘');
|
||||
this.$refs.luckyWheel.run(2);
|
||||
},
|
||||
onWheelDone(prize) {
|
||||
console.log('抽奖结束,中奖奖品:', prize);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.lottery {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 626rpx;
|
||||
height: 626rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 确保 `prizeList` 中的奖品数量与组件中的扇形数量匹配。
|
||||
- `rotateDeg` 决定了转盘最终停止的位置,您可以根据需要计算这个值以控制中奖结果。
|
||||
- 可以通过修改组件的 CSS 来自定义转盘的外观。
|
||||