Merge branch 'main' of http://123.207.203.228:3000/shang/yfs
# Conflicts: # pages/user/index.vue
This commit is contained in:
commit
a5ba270d08
|
|
@ -8,6 +8,10 @@ import RequestManager from '@/common/request.js'
|
|||
let configData = null;
|
||||
let isLoading = false;
|
||||
let loadPromise = null;
|
||||
const defaultConfig = {
|
||||
"good_type": [{ "value": 0, "sort_order": 0, "is_show": 1, "name": "全部", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 1, "sort_order": 1, "is_show": 0, "name": "一番赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 2, "sort_order": 2, "is_show": 1, "name": "无限赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 3, "sort_order": 3, "is_show": 0, "name": "擂台赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 5, "sort_order": 4, "is_show": 0, "name": "积分赏", "pay_wechat": 0, "pay_balance": 0, "pay_currency": 0, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 0 }, { "value": 6, "sort_order": 5, "is_show": 1, "name": "全局赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 8, "sort_order": 6, "is_show": 1, "name": "领主赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 9, "sort_order": 7, "is_show": 1, "name": "连击赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 10, "sort_order": 8, "is_show": 0, "name": "商城赏", "pay_wechat": 1, "pay_balance": 0, "pay_currency": 0, "pay_currency2": 1, "pay_coupon": 0, "is_deduction": 0 }, { "value": 11, "sort_order": 9, "is_show": 0, "name": "自制赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }],
|
||||
"app_setting": { "key": "app_setting", "app_name": "友达赏", "purchase_popup": "1", "exchange_times": "2", "balance_name": "钻石", "balance_icon": "https://mh.shhuanmeng.com/app/icons/20250322/3d823aaa01e96aeeafc39cbb2d579612.jpg", "currency1_name": "货币", "currency1_icon": "https://mh.shhuanmeng.com/app/icons/20250322/8188634352e7f9edf5a2a42329b7c2c9.jpg", "currency2_name": "积分1", "currency2_icon": "", "win_audio": "https://mh.shhuanmeng.com/static/web/static/mp3/open.mp3", "update_time": 1742716262 }
|
||||
};
|
||||
|
||||
// 配置类
|
||||
class ConfigManager {
|
||||
|
|
@ -77,14 +81,22 @@ class ConfigManager {
|
|||
* @param {any} defaultValue 默认值,当键不存在时返回
|
||||
* @returns {any} 配置值
|
||||
*/
|
||||
static get(key, defaultValue = null) {
|
||||
static get(key) {
|
||||
if (!configData) {
|
||||
console.warn('配置数据尚未加载,获取本地缓存中。。。');
|
||||
configData = uni.getStorageSync("configData");
|
||||
if (configData != null) {
|
||||
if (configData != null && configData != "") {
|
||||
return configData;
|
||||
}
|
||||
return defaultValue;
|
||||
configData = defaultConfig;
|
||||
// wx.restartMiniProgram({
|
||||
// success(res) {
|
||||
// console.log('重启小程序成功', res);
|
||||
// },
|
||||
// fail(err) {
|
||||
// console.error('重启小程序失败', err);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
return key in configData ? configData[key] : defaultValue;
|
||||
}
|
||||
|
|
@ -96,7 +108,8 @@ class ConfigManager {
|
|||
static getGoodType() {
|
||||
let goodType = this.get('good_type');
|
||||
if (goodType != null) {
|
||||
return goodType.map(item => {
|
||||
// goodType数组过滤,只保留is_show=1的项目
|
||||
return goodType.filter(item => item.is_show === 1).map(item => {
|
||||
return {
|
||||
id: item.value,
|
||||
title: item.name
|
||||
|
|
@ -106,6 +119,18 @@ class ConfigManager {
|
|||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定盒子类型
|
||||
* @param {Number} type 盒子类型
|
||||
* @returns {Object} 盒子类型对象
|
||||
*/
|
||||
static getGoodTypeFind(type) {
|
||||
let goodType = this.get('good_type');
|
||||
if (goodType != null) {
|
||||
return goodType.find(item => item.value == type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新配置数据
|
||||
* @returns {Promise} 返回刷新完成的Promise
|
||||
|
|
|
|||
497
components/order-confirm-popup/order-confirm-popup.vue
Normal file
497
components/order-confirm-popup/order-confirm-popup.vue
Normal file
|
|
@ -0,0 +1,497 @@
|
|||
<template>
|
||||
<uni-popup ref="popup" type="bottom">
|
||||
<view class="buy-pop relative">
|
||||
<view class="buy-pop-hd">
|
||||
<view class="" style="width: 60rpx"></view>
|
||||
<text class="" style="font-size: 28rpx">确认订单</text>
|
||||
<view class="close icon" @click="$emit('close')">
|
||||
<image :src="$img('/static/img/close2.png')" style="width: 24rpx; height: 24rpx" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="buy-card">
|
||||
<view class="buy-info">
|
||||
<view class="pic flex">
|
||||
<image class="img100" :src="orderData.goods.imgurl_detail"></image>
|
||||
</view>
|
||||
|
||||
<view class="info-r">
|
||||
<view class="title hang1">
|
||||
{{ orderData.goods.title }}
|
||||
</view>
|
||||
|
||||
<view class="type">类型:明信片</view>
|
||||
|
||||
<template v-if="orderData.goods.is_shou_zhe == 1 && orderData.goods.shou_zhe_price * 1 > 0">
|
||||
<view class="price-num">
|
||||
<view class="price">
|
||||
<template v-if="pageData.goods.type != 5">¥</template>
|
||||
<text>{{ orderData.goods.shou_zhe_price }}</text>
|
||||
<template v-if="pageData.goods.type == 5">积分</template>
|
||||
(首抽5折)
|
||||
</view>
|
||||
|
||||
<view class="num">×{{ 1 }}</view>
|
||||
</view>
|
||||
|
||||
<view v-if="orderData.goods.prize_num > 1" class="price-num">
|
||||
<view class="price">
|
||||
<template v-if="pageData.goods.type != 5">¥</template>
|
||||
<text>{{ orderData.goods.price }}</text>
|
||||
<template v-if="pageData.goods.type == 5">积分</template>
|
||||
</view>
|
||||
|
||||
<view class="num">
|
||||
×{{ orderData.goods.prize_num * 1 - 1 }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view v-else class="price-num">
|
||||
<view class="price">
|
||||
<template v-if="pageData.goods.type != 5">¥</template>
|
||||
<text>{{ orderData.goods.price }}</text>
|
||||
<template v-if="pageData.goods.type == 5">{{currencyName2}}</template>
|
||||
</view>
|
||||
|
||||
<view class="num">×{{ orderData.goods.prize_num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template v-if="pageData.goods.type != 5">
|
||||
<view class="card-row" @click="$emit('to-coupon')">
|
||||
<view class="title">优惠券</view>
|
||||
|
||||
<view class="row-r">
|
||||
{{ couponData && orderData.coupon_price > 0 ? `-${couponData.price}` : "未选择" }}
|
||||
|
||||
<view class="icon">
|
||||
<image :src="$img1('common/right1.png')" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view v-if="pageData.goods.type == 6 && !getBtnXianShi()"> </view>
|
||||
<template v-else>
|
||||
<view class="pay-type" v-if="pay_currency" @click="changePayMethod('useIntegral')">
|
||||
<view class="title flex align-center">
|
||||
使用{{ currencyName }}{{deduction_name}}¥{{ orderData.use_integral_money }}
|
||||
<text
|
||||
style="color: #676767; font-size: 16rpx; margin-left: 10rpx;">(剩余:{{ orderData.integral }})</text>
|
||||
</view>
|
||||
|
||||
<view class="icon">
|
||||
<image v-if="useIntegral" :src="$img1('common/check_act.png')" lazy-load></image>
|
||||
<image v-else :src="$img1('common/check.png')" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pay-type" v-if="pay_balance" @click="changePayMethod('useMoney')">
|
||||
<view class="title flex align-center">
|
||||
使用{{ balanceName }}{{deduction_name}}¥{{ orderData.use_money }}
|
||||
<text style="color: #676767; font-size: 16rpx; margin-left: 10rpx;">
|
||||
(剩余:{{ orderData.money }})</text>
|
||||
</view>
|
||||
|
||||
<view class="icon">
|
||||
<image v-if="useMoney" :src="$img1('common/check_act.png')" lazy-load></image>
|
||||
<image v-else :src="$img1('common/check.png')" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pay-type" v-if="pay_currency2" @click="changePayMethod('useMoney2')">
|
||||
<view class="title flex align-center">
|
||||
使用{{ currencyName2 }}{{deduction_name}}¥{{ (orderData.use_score/100).toFixed(2) }} <text style="color: #676767; font-size: 16rpx; margin-left: 10rpx;">
|
||||
(剩余:{{ orderData.score }})</text>
|
||||
</view>
|
||||
<view class="icon">
|
||||
<image v-if="useMoney2" :src="$img1('common/check_act.png')" lazy-load></image>
|
||||
<image v-else :src="$img1('common/check.png')" lazy-load></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<view class="rule">
|
||||
<scroll-view class="rule-inner" scroll-y>
|
||||
<rich-text :nodes="sendRuleData"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="agree" @click="$emit('toggle-agree')">
|
||||
<view class="icon">
|
||||
<image v-if="isAgree" :src="$img1('common/check_act.png')" lazy-load></image>
|
||||
<image v-else :src="$img1('common/check.png')" lazy-load></image>
|
||||
</view>
|
||||
|
||||
我已满18岁,阅读并同意
|
||||
|
||||
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=4' })">
|
||||
《用户协议》
|
||||
</text>
|
||||
|
||||
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=5' })">
|
||||
《隐私政策》
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="pay-btn" @click="$emit('confirm')">
|
||||
<text>确认支付</text>
|
||||
<text>{{
|
||||
pageData.goods.type == 5 ? ` ${(orderData.use_score/100).toFixed(2)}积分` : ` ¥${orderData.price}`
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "OrderConfirmPopup",
|
||||
props: {
|
||||
// 订单数据
|
||||
orderData: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
// 页面数据
|
||||
pageData: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
// 是否使用余额
|
||||
useMoney: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//是否使用余额2
|
||||
useMoney2: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 是否使用积分
|
||||
useIntegral: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 优惠券数据
|
||||
couponData: {
|
||||
type: [Object, String],
|
||||
default: () => null
|
||||
},
|
||||
// 是否同意协议
|
||||
isAgree: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 规则数据
|
||||
sendRuleData: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 购买数量
|
||||
buyNum: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
//pageData.goods.type
|
||||
return {
|
||||
currencyName: '',
|
||||
currencyName2:'',
|
||||
balanceName: '',
|
||||
pay_balance: 1,
|
||||
pay_coupon: 1,
|
||||
pay_currency: 1,
|
||||
pay_currency2: 1,
|
||||
pay_wechat: 1,
|
||||
is_deduction: 1,
|
||||
deduction_name:''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 获取货币名称和余额名称
|
||||
this.currencyName = this.$config.getAppSetting('currency1_name') || '货币';
|
||||
this.currencyName2 = this.$config.getAppSetting('currency2_name') || '积分';
|
||||
this.balanceName = this.$config.getAppSetting('balance_name') || '余额';
|
||||
let goodType = this.$config.getGoodTypeFind(this.pageData.goods.type);
|
||||
//是否显示余额支付
|
||||
this.pay_balance = goodType.pay_balance;
|
||||
//是否显示优惠卷
|
||||
this.pay_coupon = goodType.pay_coupon;
|
||||
//是否显示货币支付
|
||||
this.pay_currency = goodType.pay_currency;
|
||||
//是否显示货币2支付
|
||||
this.pay_currency2 = goodType.pay_currency2;
|
||||
//是否显示微信支付
|
||||
this.pay_wechat = goodType.pay_wechat;
|
||||
//抵扣还是支付
|
||||
this.is_deduction=goodType.is_deduction;
|
||||
if(this.is_deduction==1){
|
||||
this.deduction_name='抵扣';
|
||||
}else{
|
||||
this.deduction_name='支付';
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 打开弹窗
|
||||
*/
|
||||
open() {
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭弹窗
|
||||
*/
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
|
||||
/**
|
||||
* 切换支付方式
|
||||
* @param {String} method 支付方式
|
||||
*/
|
||||
changePayMethod(method) {
|
||||
if(this.is_deduction==0){
|
||||
// 如果是支付模式,检查可用的支付方式数量
|
||||
let availablePayMethods = 0;
|
||||
if(this.pay_balance) availablePayMethods++;
|
||||
if(this.pay_currency) availablePayMethods++;
|
||||
if(this.pay_currency2) availablePayMethods++;
|
||||
|
||||
// 如果只有一种支付方式可用,则不允许切换
|
||||
if(availablePayMethods <= 1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.$emit('change-pay', method);
|
||||
},
|
||||
|
||||
/**
|
||||
* 检查按钮是否显示
|
||||
*/
|
||||
getBtnXianShi() {
|
||||
if (this.pageData == null || this.pageData["xuangou"] == null) {
|
||||
return true;
|
||||
}
|
||||
let xuangou = this.pageData["xuangou"];
|
||||
if (xuangou.quanju_xiangou == 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.buy-pop {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #f7f7f7;
|
||||
padding-bottom: 30rpx;
|
||||
border-radius: 16rpx 16rpx 0rpx 0rpx;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -62rpx;
|
||||
left: 0;
|
||||
width: 750rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
|
||||
.buy-pop-hd {
|
||||
padding: 20rpx 0;
|
||||
padding-left: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
.close {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card-row {
|
||||
padding: 16rpx 0;
|
||||
display: flex;
|
||||
height: 82rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.title {
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
margin-left: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.row-r {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
.icon {
|
||||
width: 10rpx;
|
||||
height: 17rpx;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.buy-card {
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx 30rpx 10rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.buy-info {
|
||||
display: flex;
|
||||
|
||||
.pic {
|
||||
width: 190rpx;
|
||||
height: 190rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.info-r {
|
||||
width: calc(100% - 190rpx);
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-between;
|
||||
padding: 10rpx 0 10rpx 30rpx;
|
||||
|
||||
.title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.type {
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.price-num {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.price {
|
||||
font-weight: 500;
|
||||
font-size: 16rpx;
|
||||
color: #333333;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pay-type {
|
||||
padding: 30rpx 24rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.rule {
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 20rpx 0 0;
|
||||
height: 160rpx;
|
||||
background: #f9f8e1;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.rule-inner {
|
||||
max-height: 120rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.agree {
|
||||
display: flex;
|
||||
margin-top: 30rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 32rpx;
|
||||
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pay-btn {
|
||||
margin: 30rpx auto 0;
|
||||
width: 686rpx;
|
||||
height: 84rpx;
|
||||
background: url($imgurl + "common/payBtn.png") no-repeat 0 0 / 100% 100%;
|
||||
display: flex;
|
||||
margin-bottom: 90rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
color: #cdef27;
|
||||
|
||||
>text:nth-child(1) {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
>text:nth-child(2) {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
components/order-confirm-popup/order-confirm-popup.vue.bak
Normal file
BIN
components/order-confirm-popup/order-confirm-popup.vue.bak
Normal file
Binary file not shown.
|
|
@ -17,12 +17,12 @@
|
|||
</view>
|
||||
|
||||
<view v-if="signData" class="sign-box common_bg" :style="{
|
||||
backgroundImage: `url(${$img('/static/img/1_sign_bg.png')})`
|
||||
}">
|
||||
backgroundImage: `url(${$img('/static/img/1_sign_bg.png')})`
|
||||
}">
|
||||
<template v-for="(item, i) in signData.sign_info">
|
||||
<view v-if="i < 6" class="sign-item" :key="i" :class="{
|
||||
act: i + 1 <= signData.days
|
||||
}">
|
||||
act: i + 1 <= signData.days
|
||||
}">
|
||||
<view class="day">{{ i + 1 }}天</view>
|
||||
|
||||
<view class="icon">
|
||||
|
|
@ -35,16 +35,16 @@
|
|||
<image src="/static/common/signImg.png" lazy-load></image>
|
||||
</view>
|
||||
|
||||
<view class="num">{{ item }}吧唧币</view>
|
||||
<view class="num">{{ item }}{{$config.getAppSetting('currency1_name')}}</view>
|
||||
</view>
|
||||
|
||||
<view v-else class="sign-item large" :key="i" :class="{
|
||||
act: i + 1 <= signData.days
|
||||
}">
|
||||
act: i + 1 <= signData.days
|
||||
}">
|
||||
<view class="item-l column justify-center">
|
||||
<view class="day">第七天</view>
|
||||
|
||||
<view class="num">{{ item }}吧唧币</view>
|
||||
<view class="num">{{ item }}{{$config.getAppSetting('currency1_name')}}</view>
|
||||
</view>
|
||||
<view class="icon relative">
|
||||
<image src="/static/common/signImg.png" lazy-load></image>
|
||||
|
|
@ -54,18 +54,18 @@
|
|||
</template>
|
||||
</view>
|
||||
|
||||
<view class="sign-btn" :class="!is_sign?'signYes':'signNo'" @click="doSign">
|
||||
<view class="sign-btn" :class="!is_sign ? 'signYes' : 'signNo'" @click="doSign">
|
||||
<template v-if="!is_sign">立即签到</template>
|
||||
<template v-else>已签到</template>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="sucPop" type="center" mask-background-color="rgba(0,0,0,0.8)">
|
||||
<view v-if="sucData" class="suc-pop common_bg center" :style="{
|
||||
backgroundImage: `url(${$img('/static/img/signBg.png')})`
|
||||
|
||||
}">
|
||||
backgroundImage: `url(${$img('/static/img/signBg.png')})`
|
||||
|
||||
}">
|
||||
<image class="coin-img" :src="$img('/static/img/signJinbi.png')" mode=""></image>
|
||||
<view class="coin-num">恭喜获得 {{ sucData.num }} 吧唧币</view>
|
||||
<view class="coin-num">恭喜获得 {{ sucData.num }} {{$config.getAppSetting('currency1_name')}}</view>
|
||||
<view class="close icon" @click="$refs.sucPop.close()">
|
||||
<image :src="$img('/static/img/zdl.png')" lazy-load></image>
|
||||
</view>
|
||||
|
|
@ -77,232 +77,232 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
signData: [],
|
||||
sucData: '',
|
||||
is_sign: 0
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
signData: [],
|
||||
sucData: '',
|
||||
is_sign: 0
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
doSign() {
|
||||
this.req({
|
||||
url: 'sign_add',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.status == 1) {
|
||||
this.sucData = res.data
|
||||
|
||||
this.$refs.sucPop.open()
|
||||
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
doSign() {
|
||||
this.req({
|
||||
url: 'sign_add',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.status == 1) {
|
||||
this.sucData = res.data
|
||||
|
||||
this.$refs.sucPop.open()
|
||||
|
||||
this.getData()
|
||||
}
|
||||
getData() {
|
||||
this.req({
|
||||
url: 'sign',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.status == 1) {
|
||||
this.signData = res.data.sign
|
||||
this.is_sign = res.data.sign.is_sign
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getData() {
|
||||
this.req({
|
||||
url: 'sign',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.status == 1) {
|
||||
this.signData = res.data.sign
|
||||
this.is_sign = res.data.sign.is_sign
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
min-height: 100vh;
|
||||
.content {
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding: 1rpx 0 40rpx;
|
||||
|
||||
.page-hd {
|
||||
padding: 20rpx 30rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-size: 60rpx;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
text-shadow: 0rpx 0rpx 12rpx rgba(255, 135, 58, 0.8);
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sign-box {
|
||||
width: 710rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 1rpx 0 40rpx;
|
||||
padding: 30rpx 40rpx 40rpx;
|
||||
margin: 30rpx auto 0;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.page-hd {
|
||||
padding: 20rpx 30rpx 0;
|
||||
.sign-item {
|
||||
width: 150rpx;
|
||||
height: 165rpx;
|
||||
background: #ff873a;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
|
||||
.title {
|
||||
font-size: 60rpx;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
.day {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
text-shadow: 0rpx 0rpx 12rpx rgba(255, 135, 58, 0.8);
|
||||
color: #dddddd;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sign-box {
|
||||
width: 710rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 40rpx 40rpx;
|
||||
margin: 30rpx auto 0;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
.num {
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.sign-item {
|
||||
width: 150rpx;
|
||||
&.act {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '已签';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: Alimama ShuHeiTi;
|
||||
font-weight: 700;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&.large {
|
||||
width: 310rpx;
|
||||
height: 165rpx;
|
||||
background: #ff873a;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-evenly;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
|
||||
.day {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #dddddd;
|
||||
.item-l {
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
align-items: center;
|
||||
|
||||
.num {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
width: 120rpx;
|
||||
height: 100rpx;
|
||||
|
||||
.num {
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
&.act {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '已签';
|
||||
>image:nth-child(1) {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: Alimama ShuHeiTi;
|
||||
font-weight: 700;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
left: 10rpx;
|
||||
bottom: 10rpx;
|
||||
transform: rotate(-28deg);
|
||||
}
|
||||
|
||||
>image:nth-child(2) {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.large {
|
||||
width: 310rpx;
|
||||
height: 165rpx;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.item-l {
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
align-items: center;
|
||||
|
||||
.num {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 120rpx;
|
||||
height: 100rpx;
|
||||
|
||||
>image:nth-child(1) {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
bottom: 10rpx;
|
||||
transform: rotate(-28deg);
|
||||
}
|
||||
|
||||
>image:nth-child(2) {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sign-btn {
|
||||
margin: 40rpx auto 0;
|
||||
width: 400rpx;
|
||||
height: 122rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
background: url($imgurl+'common/jixuchou.png') no-repeat 0 0 / 100% 100%;
|
||||
}
|
||||
|
||||
.signYes {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.signNo {
|
||||
color: #FFFFFF;
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.suc-pop {
|
||||
width: 100vw;
|
||||
height: 642rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.coin-img {
|
||||
width: 345rpx;
|
||||
height: 345rpx;
|
||||
}
|
||||
|
||||
.coin-num {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.close {
|
||||
width: 378rpx;
|
||||
height: 80rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 40rpx;
|
||||
transform: translate(-50%, 200%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sign-btn {
|
||||
margin: 40rpx auto 0;
|
||||
width: 400rpx;
|
||||
height: 122rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
background: url($imgurl+'common/jixuchou.png') no-repeat 0 0 / 100% 100%;
|
||||
}
|
||||
|
||||
.signYes {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.signNo {
|
||||
color: #FFFFFF;
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.suc-pop {
|
||||
width: 100vw;
|
||||
height: 642rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.coin-img {
|
||||
width: 345rpx;
|
||||
height: 345rpx;
|
||||
}
|
||||
|
||||
.coin-num {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.close {
|
||||
width: 378rpx;
|
||||
height: 80rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 40rpx;
|
||||
transform: translate(-50%, 200%);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
1052
pages/mall/index.vue
1052
pages/mall/index.vue
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -52,7 +52,7 @@
|
|||
</view>
|
||||
|
||||
<!-- <view class="other-item" @click="$c.to({ url: '/pages/user/jf_jl' })">
|
||||
<view class="num" style="color: #333333;">{{ userinfo.score || 0 }}</view>
|
||||
<view class="num" style="color: #333333;">{{ userinfo.money2 || 0 }}</view>
|
||||
<view class="title">{{$config.getAppSetting('currency2_name')}}</view>
|
||||
</view> -->
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user