增加页面,修改邀请页面名称以及相关跳转
This commit is contained in:
@@ -1,35 +1,65 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="jf flex align-center justify-between">
|
||||
<view class="jf-l">
|
||||
<view class="jf-l-t">
|
||||
<view class="jifen u-flex u-col-center u-row-between ">
|
||||
<view class="ymf-jifen-l">
|
||||
<view class="ymf-jifen-l-t">
|
||||
当前积分
|
||||
</view>
|
||||
<view class="jf-l-b">
|
||||
<view class="ymf-jifen-l-b">
|
||||
{{num}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="jf-r">
|
||||
<view class="jf-r-t">
|
||||
<view class="jifen-r">
|
||||
<view class="jifen-r-t">
|
||||
兑换说明
|
||||
</view>
|
||||
<view class="jf-r-b">
|
||||
{{bili}}:1兑换,最少{{bili}}积分
|
||||
<view class="jifen-r-b">
|
||||
{{duihuanBili}}:1兑换,最少{{duihuanBili}}积分
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listTitle flex align-center">
|
||||
<view class="ymf-listTitle flex align-center">
|
||||
<u-icon name="order" color="#2e2f33" size="50"></u-icon>
|
||||
<text>
|
||||
兑换数量
|
||||
</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="list-input">
|
||||
<!-- <view>
|
||||
<image src="@/me/static/ymf/1b3d78fa5f92af069751ea64d493c0d85050b1e03cc5b-tPC378.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/390e926273eea85c894e613d42c9931ee2cd1f0a200fd-ApyNVV.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/79cbb0e34c24915f1883feaa3cf3179b0a1ceb1362a18-unU6xQ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/cb319b604e49b816971b708b1231321318e0023610d8c-I24hXU.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/cf2d172a6da494b2e577f699254a780907b7c222246d7-ehahn1.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/eaae3095c9e433fb8a015aaebbe52047009dd863ff2b9-igSItK.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/f3c60c6f31c74bdf38ba2d8993bcb443ab9bc335cc875-xfx4CJ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/c93b4cc9363d52cba140f7239516344ece9388141079a4-do8mFc.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/031da1e7f043de5d5e1ee355994a93e5ec983aca44dc-sZf0Vl_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/c4e6c5023b94de32df2f51d9ebd633790cc6125a88e4-TIyAcR_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/f7da7a8ca57f9f0d56bbb3d7be1d1c86f96304ce4b3a-iVbD8U_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/2e521eee5a8c80ea6879028ee866c5d0531bc4f1d5e48-Bh95lN_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/38cf4e97e52b50be9dcdcdc1352c497e1acc9266cd52-aUOrxn_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/73170e6a596b72538dbe743b06ef8b96e4885aff5b4c3-MsouS7_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/e9f9cb6b95c21c714015f15c372f595367aa553f443a-WpOCNo_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/f5d96faaa94cb0151a5c95db44e27b80ed6eeac5cb32-rApi2S_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/0e114b9ac6afc2b4c0f29520178be64915a111e218a8b5-mbMpg2_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/4783f7272bf31eeafbe1362605477de14b7cd3da24b0-ggkAnW_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/8dce1d3c3a8287c35bc1bf394048d57a64acfa047d4e-6wXnWE_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/ff919b6254e376cc902c89afdcc194ac2ab39c93793b-8TdL1Z_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/3c9a5848127a67f98e25176a042511b89afd31daccc2f-5EHbxD_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/6c9e57bcbcb047039a8edb30ecdd3b912bac99555a8fc-9EK0oO_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/78a020586cfbb791918b767520a8ff3c2ab9660f1ee1b-GX4zcc_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/babf535567728d84346fbb13348e94aae3ec8f82106e2-QKPJoe_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/d1e4d760358ba0733faee6bcad1e23cb4a1d6d76ba290-O3hUrf_fw240webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/dcb5a4b0b1060b569f9fc618e6e2708b584f7def1cadf-R7jpIr_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/e4330f184149f502f4948ce3b60059edaffc9c3d94ca4-B11p5c_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/fa22e2a27871e5f8841e8abb12cc4347a6b9440816068-3XsAnJ_fw658webp.webp" mode=""></image>
|
||||
</view> -->
|
||||
<view class="ymf-list">
|
||||
<view class="ymf-list-input">
|
||||
<u-input v-model="value" placeholder="请输入兑换数量" type="number" :border="true" />
|
||||
</view>
|
||||
<view class="list-btn">
|
||||
<view @click="userIntegral()" class="list-btn-s flex align-center justify-center">
|
||||
<view class="ymf-list-btn">
|
||||
<view @click="userIntegral()" class="ymf-list-btn-s flex align-center justify-center">
|
||||
提交兑换
|
||||
</view>
|
||||
</view>
|
||||
@@ -49,12 +79,12 @@
|
||||
return {
|
||||
num: 0,
|
||||
value: '',
|
||||
bili: 0,
|
||||
duihuanBili: 0,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getNum()
|
||||
this.getBili()
|
||||
this.getduihuanBili()
|
||||
},
|
||||
methods: {
|
||||
//兑换积分
|
||||
@@ -66,9 +96,9 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if (Number(this.value) < Number(this.bili)) {
|
||||
if (Number(this.value) < Number(this.duihuanBili)) {
|
||||
uni.showToast({
|
||||
title: '兑换的积分数量不能小于' + this.bili + '积分',
|
||||
title: '兑换的积分数量不能小于' + this.duihuanBili + '积分',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
@@ -95,10 +125,10 @@
|
||||
})
|
||||
},
|
||||
//获取积分兑换比例
|
||||
getBili() {
|
||||
getduihuanBili() {
|
||||
this.$u.get('/app/common/type/104').then(res => { // 积分兑换比例 104
|
||||
if (res.code === 0 && res.data) {
|
||||
this.bili = res.data.value
|
||||
this.duihuanBili = res.data.value
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -122,35 +152,35 @@
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.jf {
|
||||
.jifen {
|
||||
width: 100%;
|
||||
height: 252rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
|
||||
padding: 0 40rpx;
|
||||
|
||||
.jf-l-t {
|
||||
.ymf-jifen-l-t {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.jf-l-b {
|
||||
.ymf-jifen-l-b {
|
||||
font-size: 40rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.jf-r {
|
||||
.jifen-r {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
|
||||
.jf-r-b {
|
||||
.jifen-r-b {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listTitle {
|
||||
.ymf-listTitle {
|
||||
width: 100%;
|
||||
height: 110rpx;
|
||||
margin-top: -40rpx;
|
||||
@@ -168,19 +198,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
.ymf-list {
|
||||
width: 100%;
|
||||
|
||||
.list-input {
|
||||
.ymf-list-input {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.list-btn {
|
||||
.ymf-list-btn {
|
||||
padding: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.list-btn-s {
|
||||
.ymf-list-btn-s {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
color: #ffffff;
|
||||
|
||||
@@ -1,18 +1,48 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="jf flex align-center justify-between">
|
||||
<view class="jf-l">
|
||||
<view class="jf-l-t">
|
||||
<view class="ymf-jf flex align-center justify-between">
|
||||
<view class="ymf-jf-l">
|
||||
<view class="ymf-jf-l-t">
|
||||
当前积分
|
||||
</view>
|
||||
<view class="jf-l-b">
|
||||
<view class="ymf-jf-l-b">
|
||||
{{num}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="jf-r" @click="goNav('/me/jifen/duihuan')">
|
||||
<view class="ymf-jf-r" @click="ymfgoNav('/me/jifen/duihuan')">
|
||||
积分兑换
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<image src="@/me/static/ymf/1b3d78fa5f92af069751ea64d493c0d85050b1e03cc5b-tPC378.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/390e926273eea85c894e613d42c9931ee2cd1f0a200fd-ApyNVV.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/79cbb0e34c24915f1883feaa3cf3179b0a1ceb1362a18-unU6xQ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/cb319b604e49b816971b708b1231321318e0023610d8c-I24hXU.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/cf2d172a6da494b2e577f699254a780907b7c222246d7-ehahn1.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/eaae3095c9e433fb8a015aaebbe52047009dd863ff2b9-igSItK.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/f3c60c6f31c74bdf38ba2d8993bcb443ab9bc335cc875-xfx4CJ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/c93b4cc9363d52cba140f7239516344ece9388141079a4-do8mFc.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/031da1e7f043de5d5e1ee355994a93e5ec983aca44dc-sZf0Vl_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/c4e6c5023b94de32df2f51d9ebd633790cc6125a88e4-TIyAcR_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/f7da7a8ca57f9f0d56bbb3d7be1d1c86f96304ce4b3a-iVbD8U_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/2e521eee5a8c80ea6879028ee866c5d0531bc4f1d5e48-Bh95lN_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/38cf4e97e52b50be9dcdcdc1352c497e1acc9266cd52-aUOrxn_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/73170e6a596b72538dbe743b06ef8b96e4885aff5b4c3-MsouS7_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/e9f9cb6b95c21c714015f15c372f595367aa553f443a-WpOCNo_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/f5d96faaa94cb0151a5c95db44e27b80ed6eeac5cb32-rApi2S_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/0e114b9ac6afc2b4c0f29520178be64915a111e218a8b5-mbMpg2_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/4783f7272bf31eeafbe1362605477de14b7cd3da24b0-ggkAnW_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/8dce1d3c3a8287c35bc1bf394048d57a64acfa047d4e-6wXnWE_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/ff919b6254e376cc902c89afdcc194ac2ab39c93793b-8TdL1Z_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/3c9a5848127a67f98e25176a042511b89afd31daccc2f-5EHbxD_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/6c9e57bcbcb047039a8edb30ecdd3b912bac99555a8fc-9EK0oO_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/78a020586cfbb791918b767520a8ff3c2ab9660f1ee1b-GX4zcc_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/babf535567728d84346fbb13348e94aae3ec8f82106e2-QKPJoe_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/d1e4d760358ba0733faee6bcad1e23cb4a1d6d76ba290-O3hUrf_fw240webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/dcb5a4b0b1060b569f9fc618e6e2708b584f7def1cadf-R7jpIr_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/e4330f184149f502f4948ce3b60059edaffc9c3d94ca4-B11p5c_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/fa22e2a27871e5f8841e8abb12cc4347a6b9440816068-3XsAnJ_fw658webp.webp" mode=""></image>
|
||||
</view> -->
|
||||
<view class="listTitle flex align-center">
|
||||
<u-icon name="order" color="#2e2f33" size="50"></u-icon>
|
||||
<text>
|
||||
@@ -20,8 +50,8 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<scroll-view @scrolltolower="scrolltolower" :refresher-enabled="refresherTriggered"
|
||||
@scrolltoupper="scrolltoupper" scroll-y="true"
|
||||
<scroll-view :refresher-enabled="refresherTriggered"
|
||||
@scrolltoupper="ymfscrolltoupper" scroll-y="true"
|
||||
style="width: 100%;height: 100%;background-color: #ffffff;padding-bottom: 30rpx;">
|
||||
<view class="list-item flex align-center justify-center" v-for="(item,index) in list" :key="index">
|
||||
<view class="list-item-box flex align-center justify-between">
|
||||
@@ -73,37 +103,37 @@
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getNum()
|
||||
this.getList()
|
||||
this.ymfgetNum()
|
||||
this.ymfgetList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getNum()
|
||||
this.ymfgetNum()
|
||||
},
|
||||
methods: {
|
||||
goNav(url) {
|
||||
ymfgoNav(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
//上拉刷新
|
||||
scrolltoupper() {
|
||||
ymfscrolltoupper() {
|
||||
this.page = 1
|
||||
this.refresherTriggered = true
|
||||
this.getList()
|
||||
this.ymfgetList()
|
||||
},
|
||||
//加载更多
|
||||
scrolltolower() {
|
||||
ymfscrolltoupper() {
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loading'
|
||||
this.page += 1
|
||||
this.getList()
|
||||
this.ymfgetList()
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
|
||||
},
|
||||
//获取积分明细
|
||||
getList() {
|
||||
ymfgetList() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
@@ -128,7 +158,7 @@
|
||||
})
|
||||
},
|
||||
//获取当前积分
|
||||
getNum() {
|
||||
ymfgetNum() {
|
||||
this.$Request.getT('/app/integral/selectByUserId').then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code === 0) {
|
||||
@@ -147,25 +177,25 @@
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.jf {
|
||||
.ymf-jf {
|
||||
width: 100%;
|
||||
height: 252rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
|
||||
padding: 0 40rpx;
|
||||
|
||||
.jf-l-t {
|
||||
.ymf-jf-l-t {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.jf-l-b {
|
||||
.ymf-jf-l-b {
|
||||
font-size: 40rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.jf-r {
|
||||
.ymf-jf-r {
|
||||
padding: 20rpx 40rpx;
|
||||
border-radius: 40rpx;
|
||||
color: #ff7581;
|
||||
|
||||
245
me/jifen/new/create-zhuanye-fenshen.vue
Normal file
245
me/jifen/new/create-zhuanye-fenshen.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<view class="u-p-30">
|
||||
<view class="box u-m-t-20 u-relative">
|
||||
<view class="u-flex">
|
||||
<view class="color-000 font-bold u-font-40">
|
||||
专家模式
|
||||
</view>
|
||||
<view class="pro u-m-l-20">
|
||||
<view>Pro</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-flex u-m-t-40">
|
||||
<view class="u-relative">
|
||||
<view class="line-b u-relative u-font-48 font-bold">更像更美</view>
|
||||
<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">上传 10-20 张照片</view>
|
||||
</view>
|
||||
<view class="u-m-l-60 u-relative">
|
||||
<view class="line-b u-relative u-font-48 font-bold">排队时间短</view>
|
||||
<view class="u-absolute u-m-t-20 color-999" style="top: 100%;">
|
||||
VIP专属通道</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex" style="margin-top: 100rpx;">
|
||||
<view class="" style="color: rgb(239,176,84);">包含以下权益:</view>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-40">
|
||||
<view class="u-relative">
|
||||
<view class="line-b u-relative font-bold">
|
||||
<text class="u-font-48 ">30+ </text>
|
||||
<text class="u-m-l-10">模板</text>
|
||||
</view>
|
||||
<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">价值¥40</view>
|
||||
</view>
|
||||
<view class="u-m-l-60 u-relative">
|
||||
<view class="line-b u-relative font-bold">
|
||||
<image src="/static/zuan.png" style="width: 40rpx;height: 30rpx;" mode=""></image>
|
||||
<text class="u-font-48">10</text>
|
||||
<text class="u-m-l-10">赠送</text>
|
||||
</view>
|
||||
<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">
|
||||
可解锁付费模板</view>
|
||||
</view>
|
||||
<view class="u-relative u-m-l-60">
|
||||
<view class="line-b u-relative font-bold">
|
||||
<text class="u-font-48 ">1</text>
|
||||
<text class="u-m-l-10">次重置</text>
|
||||
</view>
|
||||
<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">可重置数字分身</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between" style="margin-top: 130rpx;margin-bottom: 30rpx;">
|
||||
<view class="u-flex u-relative">
|
||||
<view class="zhuan-img zhuan-img1 u-absolute">
|
||||
<image src="/static/1.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="zhuan-img zhuan-img2 u-absolute">
|
||||
<image src="/static/1.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="zhuan-img zhuan-img3 u-absolute">
|
||||
<image src="/static/1.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-relative" >
|
||||
<view class="zhekou u-absolute">
|
||||
<text class="" style="text-decoration: line-through;">¥29.9</text><text>限时特惠</text>
|
||||
</view>
|
||||
<my-button @click="$u.route('/pages/control-fenshen/ceate-fenshen')"> <text>¥ {{config1.model_train_price/100}} 马上生成</text></my-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<image src="@/me/static/ymf/1b3d78fa5f92af069751ea64d493c0d85050b1e03cc5b-tPC378.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/390e926273eea85c894e613d42c9931ee2cd1f0a200fd-ApyNVV.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/79cbb0e34c24915f1883feaa3cf3179b0a1ceb1362a18-unU6xQ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/cb319b604e49b816971b708b1231321318e0023610d8c-I24hXU.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/cf2d172a6da494b2e577f699254a780907b7c222246d7-ehahn1.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/eaae3095c9e433fb8a015aaebbe52047009dd863ff2b9-igSItK.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/f3c60c6f31c74bdf38ba2d8993bcb443ab9bc335cc875-xfx4CJ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/c93b4cc9363d52cba140f7239516344ece9388141079a4-do8mFc.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/031da1e7f043de5d5e1ee355994a93e5ec983aca44dc-sZf0Vl_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/c4e6c5023b94de32df2f51d9ebd633790cc6125a88e4-TIyAcR_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/f7da7a8ca57f9f0d56bbb3d7be1d1c86f96304ce4b3a-iVbD8U_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/2e521eee5a8c80ea6879028ee866c5d0531bc4f1d5e48-Bh95lN_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/38cf4e97e52b50be9dcdcdc1352c497e1acc9266cd52-aUOrxn_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/73170e6a596b72538dbe743b06ef8b96e4885aff5b4c3-MsouS7_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/e9f9cb6b95c21c714015f15c372f595367aa553f443a-WpOCNo_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/f5d96faaa94cb0151a5c95db44e27b80ed6eeac5cb32-rApi2S_fw1200.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/0e114b9ac6afc2b4c0f29520178be64915a111e218a8b5-mbMpg2_fw1200.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/4783f7272bf31eeafbe1362605477de14b7cd3da24b0-ggkAnW_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/8dce1d3c3a8287c35bc1bf394048d57a64acfa047d4e-6wXnWE_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/ff919b6254e376cc902c89afdcc194ac2ab39c93793b-8TdL1Z_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/3c9a5848127a67f98e25176a042511b89afd31daccc2f-5EHbxD_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/6c9e57bcbcb047039a8edb30ecdd3b912bac99555a8fc-9EK0oO_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/78a020586cfbb791918b767520a8ff3c2ab9660f1ee1b-GX4zcc_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/babf535567728d84346fbb13348e94aae3ec8f82106e2-QKPJoe_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/d1e4d760358ba0733faee6bcad1e23cb4a1d6d76ba290-O3hUrf_fw240webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/dcb5a4b0b1060b569f9fc618e6e2708b584f7def1cadf-R7jpIr_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/e4330f184149f502f4948ce3b60059edaffc9c3d94ca4-B11p5c_fw658webp.webp" mode=""></image>
|
||||
<image src="@/me/static/ymf/fa22e2a27871e5f8841e8abb12cc4347a6b9440816068-3XsAnJ_fw658webp.webp" mode=""></image>
|
||||
</view>
|
||||
<!-- <view class="box u-m-t-20">
|
||||
<view class="u-flex">
|
||||
<view class="font-bold ">数字分身兑换码</view>
|
||||
<image src="/static/gift1.png" class="u-m-l-6" style="width: 40rpx;height: 30rpx;" mode=""></image>
|
||||
</view>
|
||||
<view class="u-m-t-20 u-flex">
|
||||
<view class="u-flex-1 input-border u-flex u-p-l-30">
|
||||
<u-input placehoder="请输入数字分身礼包码"></u-input>
|
||||
</view>
|
||||
<view class="border duihuan u-m-l-20">
|
||||
确认兑换
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo:uni.getStorageSync('userInfo'),
|
||||
config1:uni.getStorageSync('config')
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
let userInfo=uni.getStorageSync('userInfo')
|
||||
if(userInfo){
|
||||
this.userInfo =userInfo
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$api({
|
||||
url: "user/info"
|
||||
}).then(res => {
|
||||
this.userInfo = res.data
|
||||
uni.setStorageSync('userInfo', res.data)
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
toFree(){
|
||||
this.$u.route('/pages/control-fenshen/free-create-fenshen')
|
||||
// if(!this.userInfo.tried){
|
||||
// this.$u.route('/pages/control-fenshen/free-create-fenshen')
|
||||
// }else{
|
||||
// this.$refs.uToast.show({
|
||||
// title:"您已经不是首次创建分身了"
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.line-b::after {
|
||||
background-color: rgb(250, 195, 40);
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: block;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 12rpx;
|
||||
height: 12rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 2px solid rgb(222, 219, 212);
|
||||
padding: 30rpx;
|
||||
border-radius: 30rpx;
|
||||
background-color: rgb(255, 241, 242);
|
||||
}
|
||||
|
||||
.zhekou {
|
||||
top: -20rpx;
|
||||
right: 6rpx;
|
||||
z-index: 10;
|
||||
color: #fff;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 50rpx 50rpx 0 50rpx;
|
||||
font-size: 20rpx;
|
||||
line-height: 40rpx;
|
||||
background-color: rgb(255, 64, 28);
|
||||
}
|
||||
|
||||
.tuijian {
|
||||
background-color: rgb(34, 34, 34);
|
||||
color: #fff;
|
||||
position: absolute;right: -2px;
|
||||
top: -2px;
|
||||
border-radius: 0 30rpx 0 30rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
.zhuan-img{
|
||||
width: 120rpx;
|
||||
height: 160rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
image{
|
||||
width: 120rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
}
|
||||
.input-border{
|
||||
border: 1px solid rgb(33, 33, 33);
|
||||
height: 92rpx;
|
||||
line-height: 92rpx;
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
.duihuan{
|
||||
border: 1px solid #999;
|
||||
border-radius: 100rpx;
|
||||
color: #999;
|
||||
height: 92rpx;
|
||||
padding: 0 30rpx;
|
||||
line-height: 92rpx;
|
||||
}
|
||||
.zhuan-img1{
|
||||
z-index: 3;
|
||||
}
|
||||
.zhuan-img2{
|
||||
width: 120rpx;
|
||||
height: 140rpx;
|
||||
z-index: 2;
|
||||
left: 66rpx;
|
||||
transform: rotateZ(15deg);
|
||||
}
|
||||
.zhuan-img3{
|
||||
z-index: 1;
|
||||
width: 100rpx;
|
||||
height: 120rpx;
|
||||
z-index: 1;
|
||||
left: 140rpx;
|
||||
margin-top: 30rpx;
|
||||
transform: rotateZ(30deg);
|
||||
}
|
||||
</style>
|
||||
458
me/jifen/new/fenshen-detail.vue
Normal file
458
me/jifen/new/fenshen-detail.vue
Normal file
@@ -0,0 +1,458 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-navbar title="我的数字分身"></u-navbar>
|
||||
<u-swiper @change="change" @click="swiperClick" :current="current" border-radius="0" :list="list" height="1000"
|
||||
mode="number" :autoplay="false"></u-swiper>
|
||||
<view class="u-m-t-40">
|
||||
<view class="u-flex u-row-center">
|
||||
<view style="width: 360rpx;">
|
||||
<view class="" style="filter: opacity(0.5);" v-if="data.mainPhoto==swiperCurrent">
|
||||
<my-button type="cancel">
|
||||
<view class="u-flex">
|
||||
<u-icon name="edit-pen"></u-icon>
|
||||
<text class="u-m-l-10">换成这张</text>
|
||||
</view>
|
||||
</my-button>
|
||||
</view>
|
||||
<my-button @click="huan" type="cancel" v-else>
|
||||
<view class="u-flex">
|
||||
<u-icon name="edit-pen"></u-icon>
|
||||
<text class="u-m-l-10">换成这张</text>
|
||||
</view>
|
||||
</my-button>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 240rpx;">
|
||||
|
||||
</view>
|
||||
<view class="fixed_b u-flex u-row-right">
|
||||
<view class="u-flex">
|
||||
<view class="u-flex u-m-r-30 u-relative" @click="share">
|
||||
<u-icon name="share" size="40"></u-icon>
|
||||
<view class="u-m-l-6 font-bold">分享</view>
|
||||
<view class="u-flex u-absolute yaoqing">
|
||||
<view class="u-m-r-6 u-line-1">邀请好友制作分身</view>
|
||||
<image style="width: 36rpx;height: 32rpx;" src="" mode=""></image>
|
||||
<view class="u-m-l-6 ">+20</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-relative" @click="download">
|
||||
<view class="u-absolute zuan u-flex">
|
||||
<image src="" mode=""></image>
|
||||
<view>-2</view>
|
||||
</view>
|
||||
<u-icon name="download" size="40"></u-icon>
|
||||
<view class="u-m-l-6 font-bold">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="share fixed u-flex u-row-right u-flex-col"
|
||||
style="z-index: 990; left: 0;right: 0;top: 0;bottom: 0;background-color: rgba(0, 0, 0, .5);">
|
||||
<view class="u-m-b-60">
|
||||
<view class="u-flex" style="border-radius: 30rpx;overflow: hidden;">
|
||||
<image style="width: 630rpx;height: 730rpx;" :src="src" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-fff w-full u-p-30" style="border-radius: 30rpx 30rpx 0 0;">
|
||||
<view class="u-flex u-row-right">
|
||||
<u-icon name="close" @click="toggle('show')"></u-icon>
|
||||
</view>
|
||||
<view class="u-m-t-30 color-000 u-text-center font-bold">生成分享图</view>
|
||||
<view class=" u-m-t-40 u-flex u-row-center" style="padding-bottom: 60rpx;">
|
||||
<view class="u-flex u-flex-col u-row-center" @click="ondown(src)">
|
||||
<view class="u-flex u-row-center"
|
||||
style="width: 100rpx;height: 100rpx; background-color: rgb(240, 240, 240);border-radius: 50%;">
|
||||
<u-icon name="download" size="60" color="#000"></u-icon>
|
||||
</view>
|
||||
<view class="u-m-t-10 color-999">保存到相册</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<image src="@/me/static/ymf/1b3d78fa5f92af069751ea64d493c0d85050b1e03cc5b-tPC378.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/390e926273eea85c894e613d42c9931ee2cd1f0a200fd-ApyNVV.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/79cbb0e34c24915f1883feaa3cf3179b0a1ceb1362a18-unU6xQ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/cb319b604e49b816971b708b1231321318e0023610d8c-I24hXU.jpg" mode=""></image>
|
||||
<image src="@/me/static/ymf/cf2d172a6da494b2e577f699254a780907b7c222246d7-ehahn1.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/eaae3095c9e433fb8a015aaebbe52047009dd863ff2b9-igSItK.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/f3c60c6f31c74bdf38ba2d8993bcb443ab9bc335cc875-xfx4CJ.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/c93b4cc9363d52cba140f7239516344ece9388141079a4-do8mFc.png" mode=""></image>
|
||||
<image src="@/me/static/ymf/031da1e7f043de5d5e1ee355994a93e5ec983aca44dc-sZf0Vl_fw1200.jpg" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/c4e6c5023b94de32df2f51d9ebd633790cc6125a88e4-TIyAcR_fw1200.jpg" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/f7da7a8ca57f9f0d56bbb3d7be1d1c86f96304ce4b3a-iVbD8U_fw1200.jpg" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/2e521eee5a8c80ea6879028ee866c5d0531bc4f1d5e48-Bh95lN_fw1200.jpg" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/38cf4e97e52b50be9dcdcdc1352c497e1acc9266cd52-aUOrxn_fw1200.webp" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/73170e6a596b72538dbe743b06ef8b96e4885aff5b4c3-MsouS7_fw1200.jpg" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/e9f9cb6b95c21c714015f15c372f595367aa553f443a-WpOCNo_fw1200.webp" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/f5d96faaa94cb0151a5c95db44e27b80ed6eeac5cb32-rApi2S_fw1200.webp" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/0e114b9ac6afc2b4c0f29520178be64915a111e218a8b5-mbMpg2_fw1200.jpg" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/4783f7272bf31eeafbe1362605477de14b7cd3da24b0-ggkAnW_fw658webp.webp" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/8dce1d3c3a8287c35bc1bf394048d57a64acfa047d4e-6wXnWE_fw658webp.webp" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/ff919b6254e376cc902c89afdcc194ac2ab39c93793b-8TdL1Z_fw658webp.webp" mode="">
|
||||
</image>
|
||||
<image src="@/me/static/ymf/3c9a5848127a67f98e25176a042511b89afd31daccc2f-5EHbxD_fw658webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/6c9e57bcbcb047039a8edb30ecdd3b912bac99555a8fc-9EK0oO_fw658webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/78a020586cfbb791918b767520a8ff3c2ab9660f1ee1b-GX4zcc_fw658webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/babf535567728d84346fbb13348e94aae3ec8f82106e2-QKPJoe_fw658webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/d1e4d760358ba0733faee6bcad1e23cb4a1d6d76ba290-O3hUrf_fw240webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/dcb5a4b0b1060b569f9fc618e6e2708b584f7def1cadf-R7jpIr_fw658webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/e4330f184149f502f4948ce3b60059edaffc9c3d94ca4-B11p5c_fw658webp.webp"
|
||||
mode=""></image>
|
||||
<image src="@/me/static/ymf/fa22e2a27871e5f8841e8abb12cc4347a6b9440816068-3XsAnJ_fw658webp.webp"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<my-pop ref="myPop1" :borderRadius="32" :closeable="false">
|
||||
<view>
|
||||
<view class="u-flex color-000 font-bold u-row-center">
|
||||
<view>下载需消耗</view>
|
||||
<view class="u-flex">
|
||||
<image src="" style="width: 40rpx;height: 32rpx;" mode=""></image>
|
||||
</view>
|
||||
<view>2</view>
|
||||
</view>
|
||||
<view class="u-m-t-20 u-font-24 u-text-center color-999">
|
||||
钻石余额:{{userInfo.diamond}}
|
||||
</view>
|
||||
<view class="u-m-t-40 u-p-l-30 u-p-r-30 u-flex">
|
||||
<view class="u-flex-1 u-p-r-16">
|
||||
<my-button type="cancel" @click="cancel1">取消</my-button>
|
||||
</view>
|
||||
<view class="u-flex-1 u-p-l-16">
|
||||
<my-button @click="confirm1">确认</my-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-30 u-flex u-row-center u-font-24 u-p-b-40">
|
||||
<view class="u-flex">
|
||||
<u-checkbox-group width="34rpx" shape="circle" :active-color="config.color.main">
|
||||
<u-checkbox v-model="checked1" :disabled="false"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view class="color-999 u-m-l-20">不再提醒</view>
|
||||
</view>
|
||||
</view>
|
||||
</my-pop>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let isdownloadIng = false
|
||||
import config from '@/common/config/config.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
show: false,
|
||||
imgs: [],
|
||||
id: '',
|
||||
config,
|
||||
swiperCurrent: '',
|
||||
isCole: false,
|
||||
nowSel: '',
|
||||
list: [],
|
||||
data: '',
|
||||
checked1: uni.getStorageSync('tips3'),
|
||||
userInfo: uni.getStorageSync('userInfo')
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
userInfo: {
|
||||
deep: true, //深度监听设置为 true
|
||||
handler: function(newV, oldV) {
|
||||
uni.setStorageSync('userInfo', newV)
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = uni.getStorageSync('userInfo')
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.id = opt.id || undefined
|
||||
if (this.id) {
|
||||
this.$api({
|
||||
url: 'model/info/' + this.id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
this.data = res.data
|
||||
this.nowSel = res.data.modelAvartars[0].imageUrl
|
||||
this.swiperCurrent = res.data.modelAvartars[0].imageUrl
|
||||
this.list = res.data.modelAvartars.map(v => {
|
||||
return {
|
||||
...v,
|
||||
image: v.smallUrl
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
this.current = e
|
||||
},
|
||||
cancel1() {
|
||||
this.$refs.myPop1.close()
|
||||
},
|
||||
confirm1() {
|
||||
uni.setStorageSync('tips3', this.checked1)
|
||||
const item = this.list.find(v => v.imageUrl == this.swiperCurrent)
|
||||
this.$refs.myPop1.close()
|
||||
this.$api({
|
||||
url: 'model/download/' + item.id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.userInfo.diamond = this.userInfo.diamond - 2
|
||||
this.ondown(res.data)
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: res.code == 200 ? 'success' : 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/* open和close方法一般用不到,但是在一些特殊场景会用到,
|
||||
* 比如预览图片时你需要覆盖 NavigationBar和 TabBar,
|
||||
* 或者在app中需要预览图片时覆盖住原生组件,比如video或者map等,
|
||||
* 你可以根据open和close去做一些操作,例如隐藏导航栏或者隐藏一些原生组件等
|
||||
*/
|
||||
open() { //监听组件显示 (隐藏TabBar和NavigationBar,隐藏video原生组件)
|
||||
// uni.hideTabBar()
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: '#000000', // 设置前景色为黑色
|
||||
// backgroundColor: '#000000', // 设置背景色为黑色
|
||||
// })
|
||||
// this.videoShow = false
|
||||
},
|
||||
close() { //监听组件隐藏 (显示TabBar和NavigationBar,显示video原生组件)
|
||||
// uni.showTabBar()
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: '#ffffff', // 设置前景色为白色
|
||||
// backgroundColor: '#000000', // 设置背景色为黑色
|
||||
// })
|
||||
// this.videoShow = true
|
||||
},
|
||||
swiperClick(e) {
|
||||
console.log(e);
|
||||
const _this = this
|
||||
const arr = this.list.map(v => {
|
||||
return v.imageUrl
|
||||
})
|
||||
console.log(arr);
|
||||
this.imgs = arr
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$nextTick(() => {
|
||||
this.$refs.previewImage.open(arr[e]); // 传入当前选中的图片地址(小程序必须添加$nextTick,解决组件首次加载无图)
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$refs.previewImage.open(arr[e]); // 传入当前选中的图片地址
|
||||
// #endif
|
||||
return
|
||||
uni.previewImage({
|
||||
urls: _this.list,
|
||||
current: 0,
|
||||
longPressActions: {
|
||||
itemList: ['发送给朋友', '保存图片', '收藏'],
|
||||
success: function(data) {
|
||||
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log(err.errMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
change(e) {
|
||||
console.log(e);
|
||||
this.current = e
|
||||
this.swiperCurrent = this.list[e].imageUrl
|
||||
},
|
||||
share() {
|
||||
const item = this.list.find(v => v.imageUrl == this.swiperCurrent)
|
||||
this.$api({
|
||||
url: 'model/share/' + item.id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.downloadFile({
|
||||
url: res.data,
|
||||
success: (res1) => {
|
||||
wx.showShareImageMenu({
|
||||
path: res1.tempFilePath
|
||||
})
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// this.src = res.data
|
||||
// this.show = true
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: res.code == 200 ? 'success' : 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
download() {
|
||||
if (this.userInfo.diamond < 2) {
|
||||
return this.$refs.uToast.show({
|
||||
title: '钻石不足,请充值!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
const item = this.list.find(v => v.imageUrl == this.swiperCurrent)
|
||||
if (this.checked1) {
|
||||
this.$api({
|
||||
url: 'model/download/' + item.id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.userInfo.diamond = this.userInfo.diamond - 2
|
||||
this.ondown(res.data)
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: res.code == 200 ? 'success' : 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$refs.myPop1.open()
|
||||
}
|
||||
|
||||
},
|
||||
huan() {
|
||||
console.log(this.swiperCurrent);
|
||||
const item = this.list.find(v => v.imageUrl == this.swiperCurrent)
|
||||
this.$api({
|
||||
url: 'model/change-main-photo/' + this.data.id + '/' + item.id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
this.data.mainPhoto = item.imageUrl
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: res.code == 200 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.$api({
|
||||
url: "user/info"
|
||||
}).then(res => {
|
||||
uni.setStorageSync('userInfo', res.data)
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
ondown(url) {
|
||||
let that = this
|
||||
if (isdownloadIng) {
|
||||
that.$refs.uToast.show({
|
||||
position: 'top',
|
||||
title: '保存中,请勿重复点击!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '保存中……'
|
||||
})
|
||||
isdownloadIng = true
|
||||
uni.downloadFile({
|
||||
url,
|
||||
success(res) {
|
||||
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success(res) {
|
||||
console.log('保存成功')
|
||||
uni.hideLoading()
|
||||
that.$refs.uToast.show({
|
||||
title: '保存成功',
|
||||
type: 'success'
|
||||
})
|
||||
isdownloadIng = false
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res)
|
||||
uni.hideLoading()
|
||||
that.$refs.uToast.show({
|
||||
title: '保存失败',
|
||||
type: 'error'
|
||||
})
|
||||
isdownloadIng = false
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeKey(key, val) {
|
||||
this[key] = val
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed_b {
|
||||
padding-bottom: 80rpx;
|
||||
padding-top: 60rpx;
|
||||
border-top: 1px solid rgb(244, 244, 244);
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.hd {
|
||||
border-radius: 4rpx;
|
||||
font-size: 20rpx;
|
||||
border: 2px solid #333;
|
||||
}
|
||||
|
||||
.yaoqing {
|
||||
padding: 10rpx 10rpx;
|
||||
bottom: 120%;
|
||||
right: 20rpx;
|
||||
border: 1px solid #333;
|
||||
border-radius: 40rpx 40rpx 0 40rpx;
|
||||
font-size: 24rpx;
|
||||
background-color: $my-main-color;
|
||||
}
|
||||
|
||||
.zuan {
|
||||
padding: 10rpx 10rpx;
|
||||
bottom: 120%;
|
||||
right: 20rpx;
|
||||
border: 1px solid #333;
|
||||
border-radius: 40rpx 40rpx 0 40rpx;
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user