删除、修改

This commit is contained in:
zpc 2025-06-16 14:59:04 +08:00
parent 8da5ac8b62
commit caa18dffcb
76 changed files with 1090 additions and 7537 deletions

View File

@ -118,7 +118,7 @@ export default {
if (item.ttype == 2) {
/* 一番赏 */
this.to({
url: '/pages/shouye/detail',
url: '/pages/main/detail',
query: {
goods_id: item.goods_id
}
@ -128,7 +128,7 @@ export default {
/* 无限赏 */
if (item.ttype == 3) {
this.to({
url: '/pages/shouye/detail_wuxian',
url: '/pages/main/detail_wuxian',
query: {
goods_id: item.goods_id
}
@ -492,7 +492,7 @@ export default {
routerNavigateBack(delta)
.catch(() => {
// 如果返回失败,则回到首页
routerNavigateTo('/pages/shouye/index', {}, 'switchTab');
routerNavigateTo('/pages/main/index', {}, 'switchTab');
});
},
@ -516,7 +516,7 @@ export default {
routerNavigateBack(num)
.catch(() => {
// 如果返回失败,则回到首页
routerNavigateTo('/pages/shouye/index', {}, 'reLaunch');
routerNavigateTo('/pages/main/index', {}, 'reLaunch');
});
}, time * 1000)
},

View File

@ -12,24 +12,24 @@ const wx_version = "117";
// 白名单页面(不需要登录即可访问)
export const whiteList = [
"pages/shouye/index", // 首页
"pages/main/index", // 首页
"pages/index/index",
"pages/shouye/detail", // 详情页
"pages/shouye/huanxiang", // 换箱页面
"pages/mall/index", // 商城首页
"pages/shouye/detail_wuxian", // 无限详情页
"pages/main/detail", // 详情页
"pages/main/huanxiang", // 换箱页面
"pages/shangcheng/index", // 商城首页
"pages/main/detail_wuxian", // 无限详情页
"pages/kit/kit", // 盒柜页面
"pages/infinite/index", // 福利首页
"pages/user/index", // 用户中心
"pages/users/index", // 用户中心
"pages/infinite/daily_check_in", // 每日签到
"pages/infinite/bonus_house", // 福利屋
"pages/other/prize_draw", // 每日奖品抽取
"pages/shouye/danye", // 单页
"pages/main/danye", // 单页
"pages/guize/guize", // 规则页面
"pages/shouye/dada_ranking", // 达达排行榜
"pages/shouye/invite_ranking", // 邀请排行榜
"pages/user/login", // 登录页面
"pages/shouye/slots",
"pages/main/dada_ranking", // 达达排行榜
"pages/main/invite_ranking", // 邀请排行榜
"pages/users/login", // 登录页面
"pages/main/slots",
"pages/other/web-pay-order", // 网页支付订单
"pages/other/web-pay-success", // 网页支付成功
"pages/other/about"// 其它页面
@ -259,7 +259,7 @@ class ConfigManager {
if (res.confirm) {
console.log('开始重启');
wx.restartMiniProgram({
path: "/pages/shouye/index"
path: "/pages/main/index"
});
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
//updateManager.applyUpdate();

View File

@ -41,7 +41,7 @@ const testing = {
// 根据环境变量选择对应配置
let currentEnv = production;//production;//testing;//production_wz;
let currentEnv = testing;//production;//testing;//production_wz;
// 衍生配置
const config = {
...currentEnv,

View File

@ -7,7 +7,7 @@ const tabBarLinks = [
'/pages/index/index',
'/pages/product/category',
'/pages/cart/cart',
'/pages/user/index/index',
'/pages/users/index/index',
'/pages/shop/index'
];
@ -15,7 +15,7 @@ const tabBarLinks = [
const shareLinks = [
'/pages/plus/assemble/fight-group-detail/fight-group-detail',
'/pages/plus/bargain/haggle/haggle',
'/pages/user/invite/invite',
'/pages/users/invite/invite',
'/pages/product/detail/detail',
'/pages/plus/seckill/detail/detail',
'/pages/plus/assemble/detail/detail',

View File

@ -45,7 +45,7 @@ class AppPlatform extends BasePlatform {
});
// uni.showTabBar({})
uni.switchTab({
url: '/pages/mall/index'
url: '/pages/shangcheng/index'
});
// uni.tos
} else {
@ -58,7 +58,7 @@ class AppPlatform extends BasePlatform {
visible: true,
});
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
}
})
@ -219,7 +219,7 @@ class AppPlatform extends BasePlatform {
show: true,
title: '商品退换货',
icon: 'my/huan.svg',
path: '/pages/shouye/danye?advert=29',
path: '/pages/main/danye?advert=29',
handler: this.navigateToPath.bind(this)
};
for (let i = 0; i < baseMenuList.length; i++) {
@ -227,10 +227,12 @@ class AppPlatform extends BasePlatform {
if (menu.id == 3) {
if (!this.getIsCheck("user_menu_3")) {
menuList.push(menu);
}
} if (menu.id == 5) {
} else if (menu.id == 5) {
if (!this.getIsCheck("user_menu_5")) {
menuList.push(menu);
continue;
}
} else {
menuList.push(menu);
@ -336,11 +338,11 @@ class AppPlatform extends BasePlatform {
console.log("AppLaunch", res);
if (!res.isCheck) {
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
} else {
uni.switchTab({
url: '/pages/mall/index'
url: '/pages/shangcheng/index'
});
}
});

View File

@ -31,7 +31,7 @@ class BasePlatform {
async appData() {
await this.loadCacheData();
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
}
@ -138,7 +138,7 @@ class BasePlatform {
show: true,
title: '我的收藏',
icon: 'my/s3.png',
path: '/package/mine/collect',
path: '/pages/users/collect',
handler: this.navigateToPath.bind(this)
},
{
@ -146,7 +146,7 @@ class BasePlatform {
show: true,
title: '优惠券',
icon: 'my/s4.png',
path: '/pages/user/coupon',
path: '/pages/users/coupon',
handler: this.navigateToPath.bind(this)
},
{
@ -154,7 +154,7 @@ class BasePlatform {
show: true,
title: '邀请好友',
icon: 'my/s5.png',
path: '/pages/user/tui-guang',
path: '/pages/users/tui-guang',
handler: this.navigateToPath.bind(this)
},
{
@ -182,7 +182,7 @@ class BasePlatform {
show: true,
title: '注销账号',
icon: 'my/s10.png',
path: '/pages/user/cancel-account-page',
path: '/pages/users/cancel-account-page',
handler: this.navigateToPath.bind(this)
}),
m.push({

View File

@ -172,7 +172,7 @@ class H5Platform extends BasePlatform {
// if (window.location.pathname == "/" || window.location.pathname == "/pages/index/index") {
// uni.switchTab({
// url: '/pages/shouye/index'
// url: '/pages/main/index'
// });
// }
}

View File

@ -219,7 +219,7 @@ class MiniProgramPlatform extends BasePlatform {
// if (options != null && options.path == "pages/index/index") {
// uni.switchTab({
// url: '/pages/shouye/index'
// url: '/pages/main/index'
// });
// }
}
@ -228,7 +228,7 @@ class MiniProgramPlatform extends BasePlatform {
console.log("getAccountInfoSync",t);
await this.loadCacheData();
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
// this.getConfig().then(res => {
// console.log(res, 'res');
@ -296,7 +296,7 @@ class MiniProgramPlatform extends BasePlatform {
uni.removeStorageSync('token');
uni.removeStorageSync('userinfo');
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
}
}

View File

@ -266,12 +266,12 @@ class RequestManager {
setTimeout(() => {
// #ifdef H5
uni.navigateTo({
url: '/pages/user/bangdingweb'
url: '/pages/users/bangdingweb'
})
// #endif
// #ifdef MP-WEIXIN
uni.navigateTo({
url: '/pages/user/bangding'
url: '/pages/users/bangding'
})
// #endif
}, 1500)
@ -305,7 +305,7 @@ class RequestManager {
var currentParams = currentPage.options || {};
// 只有非登录页面才保存重定向信息
if (currentRoute && currentRoute !== 'pages/user/login') {
if (currentRoute && currentRoute !== 'pages/users/login') {
// 构建完整的重定向URL
var redirectPath = '/' + currentRoute;
@ -337,7 +337,7 @@ class RequestManager {
uni.removeStorageSync('token');
uni.removeStorageSync('userinfo');
// 使用新的路由守卫方法进行跳转
RouterManager.navigateTo('/pages/user/login', {}, 'navigateTo')
RouterManager.navigateTo('/pages/users/login', {}, 'navigateTo')
.catch(err => {
console.error('登录页面跳转失败:', err);
});

View File

@ -46,13 +46,13 @@ export function navigateBack(delta = 1) {
// 如果页面栈不足,直接返回首页
if (pages.length <= 1) {
return navigateTo('/pages/shouye/index', {}, 'reLaunch')
return navigateTo('/pages/main/index', {}, 'reLaunch')
.then(resolve)
.catch(reject);
}
// 查看前一个页面是否是登录页
if (pages.length > 1 && pages[pages.length - 2].route === 'pages/user/login') {
if (pages.length > 1 && pages[pages.length - 2].route === 'pages/users/login') {
// 如果前一个页面是登录页,则返回两步
uni.navigateBack({
delta: 2,
@ -108,7 +108,7 @@ export function routerTo(options) {
// 使用navigateTo而非redirectTo保留页面栈
uni.navigateTo({
url: '/pages/user/login',
url: '/pages/users/login',
success: () => {
console.log('跳转到登录页面成功,保存的重定向地址:', url);
},

View File

@ -91,7 +91,7 @@
var data = {
title: `快来领取${userInfo.nickname}分享的${this.ruleData.num}赏币的${this.ruleData.title}`,
imageUrl: this.ruleData.level_img,
path: '/pages/user/index' +
path: '/pages/users/index' +
this.$c.qs({
ou_coupon_id: this.ruleData.id
})

View File

@ -12,7 +12,7 @@ export default {
// 使kong.png
imageSrc: {
type: String,
default: '/static/common/kong.png'
default: '/static/app-plus/no-data.png'
},
//
message: {

View File

@ -1,510 +0,0 @@
<template>
<view class="marquee_box" @touchstart='touchstartFn' @touchend='touchendFn'>
<block v-show="isShow">
<view class="" v-if="direction=='right'||direction=='left'">
<view v-if="broadcastType=='text'" class="marquee_container"
:style="'background:'+broadcastStylees.back_color+';'">
<view v-if="broadcastIconIsDisplay" class="broadIcon"
:style="'background:'+broadcastStylees.back_color+';font-size:28rpx;'">
<text class="iconfont icon-guangbozheng-"></text>
<text style="margin-left:12rpx;">{{broadcast_tit}}:</text>
</view>
<view class="boradcast_text_left_rig"
:class='[direction=="left"?"marquee_text_left":direction=="right"?"marquee_text_right":"",animation_paused?"animation_pausedcss":""]'
:style="'--marqueeWidth--:'+(-broadcastStylees.width_mal)+'px;--speed--:'+broadcastStylees.time+'s;width:'+broadcastStylees.width_mal+'px;'">
<view v-for="(item,index) in broadcastDataes" @click.stop="click_event(index)" :key="index"
:style="'color:'+broadcastStylees.text_color+';margin-left:'+(index!=0?item.starspos:0)+'px;font-size:'+broadcastStylees.font_size+'rpx;'">
{{item.text}}
</view>
</view>
</view>
<view v-if="broadcastType=='mould'" class="mould">
<view class="" style="width: 100%;position: relative;overflow: hidden;"
:style="'height:'+viewHeight+'rpx;'">
<view class="broadcastTopBtm dsf"
:class="[direction=='left' && doamini?'broadcastDataTopBtmDatacss_let':direction=='right'?'broadcastDataTopBtmDatacss_rig':'',animation_paused?'animation_pausedcss':'']"
:style="'--scrollWidth--:'+(-(scrlloWidth/2))+'px;--scrollSpeed2--:'+(scrlloWidth/broadcastStyle.speed)+'s;width:'+(scrlloWidth*2)+'px;'">
<view ref="mouldRef" class="bml01" style="display: flex;justify-content: space-between;">
<slot />
<!-- <slot /> -->
</view>
</view>
</view>
</view>
</view>
<view v-if="direction=='top'||direction=='bottom'" class="broadcastTopBtm"
:style="'font-size:'+broadcastStyle.font_size+'rpx;color:'+broadcastStyle.text_color+';background:'+broadcastStyle.back_color+';height:'+viewHeight+'rpx;--scrollHeight--:'+(-broadcastTopBtmHeight/2)+'px;--scrollSpeed--:'+((broadcastTopBtmHeight/2)/broadcastStyle.speed)+'s;'">
<view v-if="broadcastType=='text'"
:class="[direction=='top'?'broadcastDataTopBtmDatacss_top':direction=='bottom'?'broadcastDataTopBtmDatacss_bottom':'',animation_paused?'animation_pausedcss':'']">
<view v-for="(item,index) in broadcastDataTopBtmDataes" :key="index" @click.stop="click_event()"
class="bdbd_item">
{{item}}
</view>
</view>
<view v-if="broadcastType=='mould'"
:class="[direction=='top'?'broadcastDataTopBtmDatacss_top':direction=='bottom'?'broadcastDataTopBtmDatacss_bottom':'',animation_paused?'animation_pausedcss':'']">
<slot />
<!-- <slot /> -->
</view>
</view>
</block>
</view>
</template>
<script>
/**
* author:G.bro
* date:20200513
* * **/
export default {
data() {
return {
broadcastDataes: [],
broadcastDataTopBtmDataes: [],
broadcastStylees: {},
broadcastTopBtmHeight: 0,
scrlloWidth: 0,
animation_paused: false,
qualifications: true,
isShow: false,
doamini:false
}
},
props: {
doamin:{
type: Boolean
},
broadcastType: {
type: String,
default: 'text' //mould
},
imgdata: {
type: Array
},
broadcastData: {
type: Array
},
broadcastStyle: {
type: Object,
default () {
return {
speed: 90, //3
font_size: "28", //(rpx)
text_color: "#fff", //
back_color: "#815CD4", //
}
}
},
broadcastIconIsDisplay: { //
type: Boolean,
default: false
},
// broadcast_icon: {
// type: String,
// default: ''
// },
broadcast_tit: {
type: String,
default: '今日热点'
},
direction: {
type: String,
default: 'left'
},
viewHeight: {
type: Number,
default: 200
},
touchEvent: {
type: true,
default: false
}
},
watch: {
broadcastData(v) {
console.log(v, '---')
if (v.length) {
this.isShow = true;
this.initialization();
}
},
imgdata(v) {
console.log(v, '---')
this.isShow = true;
this.initialization();
},
doamin(v){
let that = this
console.log(v)
setTimeout(()=>{
that.doamini = v
},1000)
}
},
created() {
this.initialization();
},
mounted() {
// if(this.broadcastType=='text'){
// let assist = { ...this.broadcastStyle};
// const querys = uni.createSelectorQuery().in(this)
// querys.select('.boradcast_text_left_rig').boundingClientRect(rect => {
// assist.width_mal = rect.width;
// assist.time = rect.width/assist.speed;
// that.broadcastStylees=assist;
// }).exec()
// }
},
methods: {
initialization() {
let that = this;
if (that.broadcastType == "text") {
if (that.direction == "right" || that.direction == "left") {
that.initial_let_rig();
} else {
let arr = [...that.broadcastData];
arr = arr.concat(arr);
that.broadcastDataTopBtmDataes = arr;
}
}
if (that.direction == "top" || that.direction == "bottom") {
that.$nextTick(() => {
let dir = `.broadcastDataTopBtmDatacss_${that.direction}`
const query2 = uni.createSelectorQuery().in(that);
query2.select(dir).boundingClientRect(rect => {
that.broadcastTopBtmHeight = rect.height;
console.log(rect, '==rect.height')
if (that.viewHeight - rect.height > 10) {
that.qualifications = false;
that.animation_paused = true;
that.broadcastDataTopBtmDataes.splice(that.broadcastDataTopBtmDataes
.length / 2, that.broadcastDataTopBtmDataes
.length - 1);
}
}).exec();
})
}
if (that.direction == "left" || that.direction == "right") {
this.$nextTick(() => {
try {
if (that.broadcastType == 'mould') {
const query = uni.createSelectorQuery().in(that)
query.select('.bml01').boundingClientRect(rect => {
// console.log(rect)
that.scrlloWidth = rect.width;
// console.log(rect, '===================rect.width')
}).exec()
}
} catch (e) {
that.scrlloWidth = that.$refs.mouldRef.$el.clientWidth * 2
}
})
}
},
touchendFn(e) {
if (this.touchEvent && this.qualifications) {
this.animation_paused = false;
}
},
touchstartFn(e) {
if (this.touchEvent && this.qualifications) {
this.animation_paused = true;
}
},
initial_let_rig() {
let broadcastData = [...this.broadcastData];
console.log(this.direction, 'this.direction')
if (this.direction == "right") {
broadcastData.reverse();
}
let ititdata = broadcastData.map((item) => {
return {
"text": item,
"starspos": uni.getSystemInfoSync().windowWidth - 103
}
}),
assist = {
...this.broadcastStyle
},
this_width = 0,
spacing = 0,
speed = (assist.speed * assist.font_size); //m
for (let i in ititdata) {
this_width += ititdata[i].text.length * assist.font_size;
if (i != ititdata.length - 1) {
spacing += ititdata[i].starspos
}
}
let total_length = (this_width / 2) + spacing; //
assist.time = total_length / speed; /**滚动时间*/
assist.width_mal = total_length;
this.broadcastDataes = ititdata;
this.broadcastStylees = assist;
},
click_event(index) {
let i;
if (index > ((broadcastDataTopBtmDataes.length / 2) - 1)) {
i = index - (broadcastDataTopBtmDataes.length / 2);
} else {
i = index
}
this.$emit("changeEvent", {
i,
msg: `你点击了${i+1}`
});
}
}
}
</script>
<style>
/* app端有可能要加上 */
/* page {
overflow: hidden;
width: 100%;
} */
.marquee_box {
width: 100%;
overflow: hidden;
position: inherit;
height: auto;
}
.mould {
width: 750rpx;
overflow: hidden;
position: inherit;
}
.dsf {
display: flex;
justify-content: space-between;
}
.broadIcon {
/* width: 60rpx; */
padding: 0 22rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
left: 0;
top: 0;
color: #fff;
z-index: 999;
line-height: 60rpx;
}
.marquee_container {
position: relative;
width: 100%;
height: 60rpx;
}
.marquee_text_left {
display: flex;
white-space: nowrap;
animation-name: around_left;
animation-duration: var(--speed--);
animation-iteration-count: infinite;
animation-timing-function: linear;
line-height: 60rpx;
position: absolute;
}
@keyframes around_left {
from {
left: 100%;
}
to {
left: var(--marqueeWidth--);
}
}
.marquee_text_right {
display: flex;
white-space: nowrap;
animation-name: around_right;
animation-duration: var(--speed--);
animation-iteration-count: infinite;
animation-timing-function: linear;
line-height: 60rpx;
position: absolute;
}
@keyframes around_right {
from {
right: 100%;
}
to {
right: var(--marqueeWidth--);
}
}
.marquee_tit {
height: 60rpx;
line-height: 60rpx;
}
.broadcastTopBtm {
padding: 12rx;
overflow: hidden;
position: relative;
}
.broadcastDataTopBtmDatacss_top {
width: 100%;
animation-name: around_top;
animation-duration: var(--scrollSpeed--);
animation-iteration-count: infinite;
animation-timing-function: linear;
position: absolute;
left: 0;
}
@keyframes around_top {
from {
top: 0%;
}
to {
top: var(--scrollHeight--);
}
}
.broadcastDataTopBtmDatacss_bottom {
width: 100%;
animation-name: around_Bottom;
animation-duration: var(--scrollSpeed--);
animation-iteration-count: infinite;
animation-timing-function: linear;
position: absolute;
left: 0;
}
@keyframes around_Bottom {
from {
bottom: 0%;
}
to {
bottom: var(--scrollHeight--);
}
}
.broadcastDataTopBtmDatacss_let {
width: 100%;
animation-name: around_let;
animation-duration: var(--scrollSpeed2--);
animation-iteration-count: infinite;
animation-timing-function: linear;
position: absolute;
left: 0;
top: 0;
}
.broadcastDataTopBtmDatacss_rig {
width: 100%;
animation-name: around_rig;
animation-duration: var(--scrollSpeed2--);
animation-iteration-count: infinite;
animation-timing-function: linear;
position: absolute;
right: 0%;
top: 0;
display: flex;
justify-content: flex-end;
}
.animation_pausedcss {
animation-play-state: paused;
}
@keyframes around_let {
from {
left: 0%;
}
to {
left: var(--scrollWidth--);
}
}
@keyframes around_rig {
from {
right: 0%;
}
to {
right: var(--scrollWidth--);
}
}
.bdbd_item {
padding: 0 12rpx;
line-height: 60rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
@font-face {
font-family: "iconfont";
src: url('//at.alicdn.com/t/font_1686137_9el2ov99ag.eot?t=1589197045289');
/* IE9 */
src: url('//at.alicdn.com/t/font_1686137_9el2ov99ag.eot?t=1589197045289#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAANIAAsAAAAAByAAAAL7AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAqCJIIbATYCJAMICwYABCAFhG0HNxtIBhHVmxnIfiTYMS7bb8koPCedCeJJj2/e7iZfYqkjkZzk9lw0oCspm5uha1SEYUrOg//lO9IN4UL4FQBGHE6b4vPv8pzmojHnedQFGG8NaG9cCySQAgnMG8ZuIniA2yGAP8kUIg0ateiALwbQTwAZMXRwX3wLLgzGifoi2A1TDbIKC1+1WF0CVvLvy0fKxRcUlgYkthnUcAB13sA47XgOPSgBwXIGwJkFGigEDEiHRlMrtAwVovGPQoZ0OFa2wJs6nkf5h/3jgYDYgMxAABJ1/jMJsPBRMxUARq/vB7iTzgYmPjQ5vv+S6E4b/P2XXBBxLwYELI3pvDFm/XqMs27QknXgrK82yepoddiXOXTJhi3NTe/e7XznTqcNG7ZujLoN2Drexulwy99hXacl0UZCzNW77p1WfV52MOpyx+O3nVuFt1qs+xziN+DL8Q0BU2N17J84FTs1YMOXE/2dXf8DTwV62/5bne0/dmdranzv25uGonfvtepore/p0pXugqw9N2SpuKsuTSuYO7vtjzV1oka1azMqsm50/SYtYxvHNug6blqbRuGpQccDpjYpGzCwauyCmnETJpadjJjwO6teaETz1uHNQjPqfmhPHQC8q/q2Lvj3vyF17cvZvUOqvvkGGAAePO36jTu8q4ZhFvC9Q7PAnxYMzDOxCKjUI/MNs6JfzoECneta8QC2cJ5MVUe9VkzwJerlLD4kZdD4kkk01EJYBFAJG19q4U8BjWcHEME4NGL8gHzmaxBCOQlFMBehCeUy0VAfwyKaz7AJFQ1/OknEkgFki5dUfUYt6MD8IFnaPdKKEtk3DFfVnBdx2gv5TF4Yu6EcXXFHXmLE+Q6TiAfPtMGi7Ya1EhxMGa10UeSY+943XamztDWK+oxa0IH5QbK0e1pcVOXzNwxX1dyRM+J8IZ+pcRi7YQBxle+Dch5ln/MdJhEPnmmDRTNghSGCo7lTRitdnBA45t4o5IfKu+2V298tAfwBGiWwuSZo8KX3YOgfkRnbpgEA') format('woff2'),
url('//at.alicdn.com/t/font_1686137_9el2ov99ag.woff?t=1589197045289') format('woff'),
url('//at.alicdn.com/t/font_1686137_9el2ov99ag.ttf?t=1589197045289') format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('//at.alicdn.com/t/font_1686137_9el2ov99ag.svg?t=1589197045289#iconfont') format('svg');
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-guangbozheng-:before {
content: "\e640";
}
</style>

View File

@ -1,286 +0,0 @@
<template>
<view style="" class="zcq">
<view class="danmu-li" v-for="(item,index) in listData" :class="item.type" :style="[item.style]" :key="index">
<view class="danmu-inner">
<view class="user-box">
<view class="user-img">
<view class="img-box">
<image :src="item.headimg"></image>
</view>
</view>
<!-- <view class="user-text cl1">
人名
</view> -->
<view class="user-status cl1">
{{item.item}}
<!-- <span :style="'color:'+ item.color"> {{item.title}}</span> -->
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
//rightToLeft leftToRight leftBottom
type: {
type: String,
default: 'rightToLeft'
},
minTime: {
type: Number,
default: 5
},
maxTime: {
type: Number,
default: 10
},
minTop: {
type: Number,
default: 0
},
maxTop: {
type: Number,
default: 50
},
hrackH: { //
type: Number,
default: 40
},
noStacked: { //()
type: Array,
default () {
return []
}
}
},
data() {
return {
listData: []
}
},
mounted() {
this.hrackNum = Math.floor((this.maxTop - this.minTop) / this.hrackH);
},
methods: {
add(obj) {
let data = {
item: obj.item,
title: obj.title,
color: obj.color,
id: Date.parse(new Date()),
time: Math.ceil(Math.floor(Math.random() * (this.maxTime - this.minTime + 1) + this.minTime)),
type: this.type,
headimg: obj.headimg
}
if (this.type === 'leftBottom') {
let objData = {
item: data.item,
title: data.title,
color: data.color,
type: 'leftBottomEnter',
style: {
transition: `all 0.5s`,
animationDuration: `0.5s`,
transform: `translateX(0%)`,
bottom: `${this.minTop}px`
}
}
let listLen = this.listData.length;
let hrackNum = this.hrackNum;
for (let i in this.listData) {
if (this.listData[i].status === 'reuse') { //
this.$set(this.listData, i, objData);
} else if (this.listData[i].status === 'reset') { //
this.listData[i].style.transition = 'none';
this.listData[i].style.bottom = 0;
this.listData[i].status = 'reuse';
} else if (this.listData[i].status === 'recycle') { //
this.listData[i].type = 'leftBottomExit';
this.listData[i].status = 'reset';
} else {
this.listData[i].style.bottom = parseInt(this.listData[i].style.bottom) + this.hrackH + 'px';
}
if (parseInt(this.listData[i].style.bottom) >= (this.maxTop - this.hrackH) && this.listData[i]
.status !== 'reset') { //
this.listData[i].status = 'recycle';
}
}
if (listLen < hrackNum + 2) {
this.listData.push(objData);
}
} else if (this.type === 'rightToLeft' || this.type === 'leftToRight') {
let objData = this.horStacked(data);
for (let i in this.listData) {
if (this.listData[i].delTime <= Date.parse(new Date())) {
this.repaint(i, objData.type);
objData.type = '';
this.$set(this.listData, i, objData);
return
}
}
this.listData.push(objData);
}
},
horStacked(data) {
// console.log(data)
return {
item: data.item,
type: this.type,
title: data.title,
color: data.color,
style: {
animationDuration: `${data.time}s`,
top: `${Math.ceil(Math.random() * (this.maxTop - this.minTop + 1) + this.minTop)}px`,
opacity: 1
},
delTime: Date.parse(new Date()) + data.time * 1200,
headimg: data.headimg
}
},
repaint(index, type) {
setTimeout(() => {
this.listData[index].type = type;
}, 100)
}
}
}
</script>
<style>
</style>
<style lang="scss">
.zcq {
top: 0rpx;
z-index: 99;
left: 0rpx;
box-sizing: border-box;
// font-family: 'zcq';
// border: 1px solid red;
position: absolute;
width: 750rpx;
height: 300rpx;
pointer-events: none;
}
@keyframes leftBottomEnter {
0% {
transform: translateY(100%);
opacity: 0;
}
100% {
transform: translateY(0%);
opacity: 1;
}
}
@keyframes leftBottomExit {
0% {
transform: translateY(0%);
opacity: 1;
}
100% {
transform: translateY(-200%);
opacity: 0;
}
}
@keyframes leftToRight {
0% {
transform: translateX(-100%);
// opacity: 0;
}
100% {
transform: translateX(100%);
// opacity: 1;
}
}
@keyframes rightToLeft {
0% {
transform: translateX(100%);
opacity: 0.5;
}
100% {
transform: translateX(-100%);
opacity: 1;
}
}
.danmu-li {
position: absolute;
width: 100%;
opacity: 0;
transform: translateX(100%);
animation-timing-function: linear;
&.leftBottomEnter {
animation-name: leftBottomEnter;
}
&.leftBottomExit {
animation-name: leftBottomExit;
animation-fill-mode: forwards;
}
&.rightToLeft {
animation-name: rightToLeft;
}
&.leftToRight {
animation-name: leftToRight;
}
.danmu-inner {
display: inline-block;
.user-box {
display: flex;
padding: 3rpx 40rpx 3rpx 10rpx;
background: linear-gradient(90deg, #5CEFE3 0%, rgba(92,239,227,0) 100%);
border-radius: 32rpx;
align-items: center;
// border: 1px solid rgba(204, 204, 204, 1);
.user-img {
.img-box {
display: flex;
image {
width: 58rpx;
height: 58rpx;
background: rgba(55, 55, 55, 1);
border-radius: 50%;
}
}
}
.user-status {
margin-left: 10rpx;
white-space: nowrap;
font-size: 28rpx;
font-weight: 400;
color: rgba(255, 255, 255, 1);
}
.user-text {
margin-left: 10rpx;
// white-space: nowrap;
font-size: 28rpx;
font-weight: 400;
width: 80rpx;
color: rgba(255, 255, 255, 1);
}
}
}
}
</style>

View File

@ -1,15 +0,0 @@
#如何使用
###js
```javascript
import lffBarrage from '@/components/lff-barrage/lff-barrage.vue'
components:{lffBarrage},
methods:{
colrdo(){ //插入一条弹幕
this.$refs.lffBarrage.add({item:'你好呀小伙子'});
}
}
```
###HTML
```html
<lff-barrage ref="lffBarrage"></lff-barrage>
```

View File

@ -219,7 +219,7 @@ export default {
}
});
} else {
this.$customRouter.navigateTo('/pages/shouye/index', {}, 'switchTab');
this.$customRouter.navigateTo('/pages/main/index', {}, 'switchTab');
}
}
},

View File

@ -57,7 +57,7 @@
icon: '/static/tabbar/chousang.png',
actIcon: '/static/tabbar/chousang_sel.png',
title: '首页',
path: '/pages/shouye/index'
path: '/pages/main/index'
},
{
id: 2,
@ -85,7 +85,7 @@
icon: '/static/tabbar/mine.png',
actIcon: '/static/tabbar/mine_sel.png',
title: '我的',
path: '/pages/user/index'
path: '/pages/users/index'
}
]
@ -95,7 +95,7 @@
icon: '/static/tabbar/chousang.png',
actIcon: '/static/tabbar/chousang_sel.png',
title: '首页',
path: '/pages/shouye/index'
path: '/pages/main/index'
},
{
id: 2,
@ -123,7 +123,7 @@
icon: '/static/tabbar/mine.png',
actIcon: '/static/tabbar/mine_sel.png',
title: '我的',
path: '/pages/user/index'
path: '/pages/users/index'
}
]

View File

@ -1,58 +0,0 @@
Component({
data: {
selected: 0,
color: "#C6C6C6",
selectedColor: "#333333",
list: [{
"index": 0,
"pagePath": "/pages/shouye/index",
"iconPath": "/static/tab/n1.png",
"selectedIconPath": "/static/tab/s1.png",
"text": "首页"
},
{
"index": 2,
"pagePath": "/pages/mall/index",
"iconPath": "/static/tab/n5.png",
"selectedIconPath": "/static/tab/s5.png",
"text": "商城"
},
{
"index": 3,
"pagePath": "/pages/kit/kit",
"iconPath": "/static/tab/n3.png",
"selectedIconPath": "/static/tab/s3.png",
"text": "盒柜"
},
{
"index": 1,
"pagePath": "/pages/infinite/index",
"iconPath": "/static/tab/n2.png",
"selectedIconPath": "/static/tab/s2.png",
"text": "福利"
},
{
"index": 4,
"pagePath": "/pages/user/index",
"iconPath": "/static/tab/n4.png",
"selectedIconPath": "/static/tab/s4.png",
"text": "我的"
}
]
},
attached() {},
methods: {
switchTab(e) {
const data = e.currentTarget.dataset
const url = data.path
console.log(e, data, url, data.index)
wx.switchTab({
url
})
// console.log('aaaaaaaa', this.selected, data.index);
this.setData({
selected: data.index
})
}
}
})

View File

@ -1,3 +0,0 @@
{
"component": true
}

View File

@ -1,10 +0,0 @@
<!--miniprogram/custom-tab-bar/index.wxml-->
<view class="tab-bar">
<view class="tab-bar-border"></view>
<view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{item.index}}" bindtap="switchTab"
style="display: {{item.index === -1 ? 'none' : 'flex'}}">
<image src="{{selected === item.index ? item.selectedIconPath : item.iconPath}}"></image>
<view style="color: {{selected === item.index ? selectedColor : color}}">{{item.text}}
</view>
</view>
</view>

View File

@ -1,42 +0,0 @@
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
box-sizing: content-box;
height: 44px;
background: #FFFFFF;
display: flex;
padding-top: 10px;
box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.5);
padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar-border {
background-color: #404241;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 1px;
transform: scaleY(0.5);
}
.tab-bar-item {
flex: 1;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: relative;
}
.tab-bar-item image {
width: 48rpx;
height: 48rpx;
}
.tab-bar-item view {
font-size: 10px;
}

View File

@ -1,213 +0,0 @@
<!--
* @Date: 2024-01-17 11:00:11
* @LastEditTime: 2024-01-17 17:28:11
* @Description: content
-->
<template>
<view class="content">
<uni-nav-bar
left-icon="left"
title="领券中心"
color="#fff"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
></uni-nav-bar>
<mescroll-body
ref="mescrollRef"
@init="mescrollInit"
@down="downCallback"
@up="getList"
:down="downOption"
:up="upOption"
>
<view
class="list-item common_bg"
v-for="(item, i) in listData"
:key="i"
:style="{
backgroundImage: ``
}"
:class="{
dis: item.is_find == 1
}"
>
<view class="money">
¥
<text>{{ item.price }}</text>
</view>
<view class="info">
<view class="title">{{ item.title }}</view>
<view class="time">领取后有效期{{ item.effective_day }}</view>
</view>
<view
v-if="item.is_find != 1"
class="btn"
@click="$c.noDouble(getCoupon, item)"
>
立即领取
</view>
<view v-else class="btn">已领取</view>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
// (, )
downOption: {
auto: false
},
// (, )
upOption: {
auto: true,
page: {
size: 10 // ,10
}
},
listData: [],
optData: ''
}
},
onLoad(options) {
this.optData = options
},
methods: {
getCoupon(item) {
this.req({
url: 't_coupon_ling',
data: {
coupon_id: item.id
},
success: res => {
if (res.status == 1) {
this.$c.toast({
title: res.msg,
duration: 500,
success: () => {
this.mescroll.resetUpScroll()
this.mescroll.scrollTo(0, 0)
}
})
}
}
})
},
/**
* @description: 获取列表
* @param {*} num
* @param {*} size
* @return {*}
*/
getList({ num, size }) {
this.req({
url: 't_coupon_list',
data: {
page: num,
coupon_id: this.optData.coupon_id
},
Loading: true,
success: res => {
if (res.status == 1) {
if (num == 1) {
this.listData = []
}
this.listData = this.listData.concat(res.data.list)
this.mescroll.endByPage(res.data.list.length, res.data.last_page)
}
}
})
}
}
}
</script>
<style lang="scss">
.content {
padding: 0 0 30rpx;
.list-item {
width: 710rpx;
box-sizing: border-box;
padding: 40rpx 30rpx 40rpx 10rpx;
display: flex;
align-items: center;
margin: 0 auto 20rpx;
.money {
width: 160rpx;
text-align: center;
// background: #f00;
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
text {
font-size: 42rpx;
}
}
.info {
flex: 1;
padding-left: 20rpx;
.title {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.time {
margin-top: 20rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
}
.btn {
width: 130rpx;
height: 50rpx;
background: linear-gradient(90deg, #2dcbff 0%, #ff95fb 100%);
border-radius: 25rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #222222;
}
&.dis {
filter: grayscale(1);
.btn {
color: #ccc;
background: none;
border: 1px solid #ccc;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,312 +0,0 @@
<!--
* @Date: 2023-11-14 10:09:45
* @LastEditTime: 2023-12-08 16:50:43
* @Description: content
-->
<template>
<view class="content">
<uni-nav-bar title="签到任务" color="#000000" left-icon="left" backgroundColor="transparent" :border="false"
:statusBar="true" :fixed="true" @clickLeft="$c.back()"></uni-nav-bar>
<view class="" style="width: 686rpx; height: 328rpx; background-color: #D8D8D8; border-radius: 16rpx; margin: 56rpx auto 0;">
</view>
<view class="page-hd">
<view class="title">签到任务</view>
<view class="icon" @click="$refs.rulePop.getRule(16, '签到规则')">
<image :src="$img('/static/img/info.png')" lazy-load></image>
</view>
</view>
<view v-if="signData" class="sign-box common_bg" :style="{
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
}">
<view class="day">{{ i + 1 }}</view>
<view class="icon">
<!-- <image
v-if="i + 1 <= signData.days"
:src="$img('/static/img/1_coin.png')"
lazy-load
></image> -->
<image src="/static/common/signImg.png" lazy-load></image>
</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
}">
<view class="item-l column justify-center">
<view class="day">第七天</view>
<view class="num">{{ item }}{{$config.getAppSetting('currency1_name')}}</view>
</view>
<view class="icon relative">
<image src="/static/common/signImg.png" lazy-load></image>
<image src="/static/common/signImg.png" lazy-load></image>
</view>
</view>
</template>
</view>
<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')})`
}">
<image class="coin-img" :src="$img('/static/img/signJinbi.png')" mode=""></image>
<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>
</view>
</uni-popup>
<rule-pop ref="rulePop"></rule-pop>
</view>
</template>
<script>
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()
}
}
})
},
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;
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: 30rpx 40rpx 40rpx;
margin: 30rpx auto 0;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
.sign-item {
width: 150rpx;
height: 165rpx;
background: #ff873a;
border-radius: 20rpx;
display: flex;
flex-flow: column nowrap;
justify-content: space-evenly;
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;
}
.icon {
width: 50rpx;
height: 50rpx;
}
.num {
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
}
&.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;
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%);
}
}
}
</style>

View File

@ -1,399 +0,0 @@
<template>
<view class="content">
<uni-nav-bar
left-icon="left"
title="我的收藏"
color="#000000"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
></uni-nav-bar>
<!-- 顶部标签栏 -->
<scroll-view class="tab" scroll-x>
<view
class="tab-item"
v-for="(item, i) in tabList"
:key="i"
:class="{ active: tabCur === i }"
@click="tabChange(i)"
>
{{ item.title }}
</view>
</scroll-view>
<!-- 列表区域 -->
<mescroll-body
ref="mescrollRef"
@init="mescrollInit"
@down="downCallback"
@up="getList"
:down="downOption"
:up="upOption"
>
<view class="list" v-if="listData.length > 0">
<view
class="list-item"
v-for="(item, i) in listData"
:key="i"
@click="toDetail(item)"
>
<view class="pic">
<image
class="pic-img"
:src="item.imgurl"
mode="aspectFill"
lazy-load
></image>
</view>
<view
class="tag"
:style="{ backgroundImage: `url(${$img1('common/label1.png')})` }"
>
<text>{{ tabList[tabCur].title }}</text>
</view>
<view class="title ellipsis">{{ item.goods_title }}</view>
<view class="price-box">
<view class="price">
¥<text>{{ item.goods_price }}</text>
</view>
<view v-if="item.stock" class="stock">
<view class="stock-num"
>{{ item.surplus_stock }}/{{ item.stock }}</view
>
<image
class="stock-icon"
:src="$img1('index/box.png')"
lazy-load
></image>
</view>
</view>
</view>
</view>
<!-- 空状态 -->
<view class="empty-state" v-if="listData.length === 0 && !isLoading">
<image
class="empty-image"
:src="$img1('common/empty.png')"
mode="aspectFit"
></image>
<text class="empty-text">暂无收藏内容</text>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
//
downOption: {
auto: false,
},
//
upOption: {
auto: true,
page: {
size: 10, //
},
noMoreSize: 5, // ,5
empty: {
use: false, // 使
},
},
tabList: [], //
tabCur: 0, //
listData: [], //
isLoading: true, //
};
},
created() {
//
this.initTabList();
},
methods: {
/**
* 初始化标签列表
*/
initTabList() {
const tabList = this.$config.getGoodType();
// id0
this.tabList = tabList.filter((item) => item.id !== 0);
},
/**
* 初始化mescroll对象
* @param {Object} mescroll mescroll实例
*/
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
/**
* 下拉刷新回调
*/
downCallback() {
this.mescroll.resetUpScroll();
},
/**
* 跳转到详情页
* @param {Object} item 商品项
*/
toDetail(item) {
let url = "/pages/shouye/detail";
//
if (item.type === 2 || item.type === 8) {
url = "/pages/shouye/detail_wuxian";
} else if (item.type === 9) {
url = "/package/index/lian-ji";
}
this.$c.to({
url,
query: {
goods_id: item.goods_id,
type_text: this.tabList[this.tabCur].title,
},
});
},
/**
* 切换标签
* @param {Number} index 标签索引
*/
tabChange(index) {
if (this.tabCur === index) return;
this.tabCur = index;
this.listData = [];
this.isLoading = true;
//
this.mescroll.resetUpScroll();
this.mescroll.scrollTo(0, 0);
},
/**
* 获取收藏列表数据
* @param {Object} params 分页参数
*/
getList({ num, size }) {
this.isLoading = true;
// 使PromiseAPI
this.$request
.post("listCollect", {
page: num,
type: this.tabList[this.tabCur].id,
})
.then((res) => {
this.isLoading = false;
if (res.status === 1) {
//
if (num === 1) {
this.listData = [];
}
//
this.listData = this.listData.concat(res.data.data || []);
//
this.mescroll.endByPage(
res.data.data ? res.data.data.length : 0,
res.data.last_page || 1
);
} else {
this.mescroll.endErr();
uni.showToast({
title: res.msg || "加载失败",
icon: "none",
});
}
})
.catch((err) => {
this.isLoading = false;
this.mescroll.endErr();
uni.showToast({
title: "网络请求失败",
icon: "none",
});
console.error(err);
});
},
},
};
</script>
<style lang="scss">
.content {
background-color: #f7f7f7;
min-height: 100vh;
//
.tab {
white-space: nowrap;
padding: 15rpx 0;
.tab-item {
width: 88rpx;
height: 40rpx;
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 30rpx;
background-color: #ffffff;
font-size: 20rpx;
border-radius: 8rpx;
color: #333333;
transition: all 0.2s;
&:last-child {
margin-right: 30rpx;
}
&.active {
background-color: #e6f791;
font-weight: 500;
}
}
}
//
.list {
padding: 15rpx 30rpx 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.list-item {
width: 330rpx;
height: 487rpx;
margin-top: 30rpx;
position: relative;
background-color: #ffffff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
.pic {
width: 100%;
height: 332rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #f5f5f5;
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
.pic-img {
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0 0;
}
}
.tag {
position: absolute;
z-index: 1;
top: 12rpx;
left: 12rpx;
width: 68rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
background-size: 100% 100%;
text {
font-size: 14rpx;
color: #ffffff;
}
}
.title {
padding: 20rpx 20rpx 0;
font-size: 20rpx;
color: #333333;
line-height: 1.4;
height: 56rpx;
}
.price-box {
padding: 20rpx 20rpx 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
bottom: 0;
left: 0;
right: 0;
.price {
font-size: 16rpx;
color: #333333;
text {
font-size: 24rpx;
font-weight: 500;
}
}
.stock {
display: flex;
align-items: center;
.stock-num {
font-size: 24rpx;
color: #cccccc;
}
.stock-icon {
width: 26rpx;
height: 26rpx;
margin-left: 6rpx;
}
}
}
}
}
//
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
.empty-image {
width: 200rpx;
height: 200rpx;
margin-bottom: 20rpx;
}
.empty-text {
font-size: 28rpx;
color: #999;
}
}
//
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
</style>

View File

@ -1,146 +0,0 @@
<!--
* @Date: 2023-11-17 11:44:58
* @LastEditTime: 2023-11-30 18:08:33
* @Description: content
-->
<template>
<view class="content">
<uni-nav-bar
left-icon="left"
title="道具卡"
color="#fff"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
></uni-nav-bar>
<mescroll-body
ref="mescrollRef"
@init="mescrollInit"
@down="downCallback"
@up="getList"
:down="downOption"
:up="upOption"
>
<view
class="card-item"
v-for="(item, i) in listData"
:key="i">
<view class="icon">
<image src="/static/common/cardIcon.png"></image>
</view>
<view class="card-r">
<view class="title">{{item.title}}</view>
<view class="desc">抽赏时可选择重新抽赏</view>
</view>
<view class="card-num">×1</view>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
// (, )
downOption: {
auto: false
},
// (, )
upOption: {
auto: true,
page: {
size: 10 // ,10
}
},
listData: []
}
},
methods: {
/**
* @description: 获取列表
* @param {*} num
* @param {*} size
* @return {*}
*/
getList({ num, size }) {
this.req({
url: 'item_card_list',
data: {
page: num
},
success: res => {
if (res.status == 1) {
if (num == 1) {
this.listData = []
}
this.listData = this.listData.concat(res.data.list)
this.mescroll.endByPage(res.data.list.length, res.data.last_page)
}
}
})
}
}
}
</script>
<style lang="scss">
.content {
padding: 0 0 30rpx;
.card-item {
width: 710rpx;
margin: 20rpx auto 0;
box-sizing: border-box;
padding: 30rpx 40rpx;
display: flex;
align-items: center;
background: #3B3941;
.icon {
width: 100rpx;
height: 58rpx;
}
.card-r {
width: 300rpx;
box-sizing: border-box;
margin-left: 30rpx;
.title {
font-weight: bold;
font-size: 40rpx;
color: #B07AF3;
}
.desc {
margin-top: 10rpx;
word-wrap: break-word;
word-break: break-all;
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
}
.card-num {
flex: 1;
text-align: right;
font-size: 36rpx;
font-family: YouSheBiaoTiHei;
font-weight: 400;
color: #ffffff;
}
}
.common_bg {
}
}
</style>

View File

@ -1,622 +0,0 @@
<!--
* @Date: 2023-12-20 17:33:04
* @LastEditTime: 2024-01-17 11:30:11
* @Description: content
-->
<template>
<view class="content">
<uni-nav-bar
title="提取记录"
color="#fff"
leftIcon="left"
backgroundColor="transparent"
:border="false"
:statusBar="true"
:fixed="true"
@clickLeft="$c.back()"
></uni-nav-bar>
<mescroll-body
ref="mescrollRef"
@init="mescrollInit"
@down="downCallback"
@up="getList"
:down="downOption"
:up="upOption"
>
<!-- <view class="row">
<view class="left">
<view class="title-color">提取金额</view>
</view>
</view>
<view class="input-box">
<input v-model.number="money" placeholder="输入提取金额" />
</view>
<view class="tip">
荷包金额剩余: {{ userInfo.money2 }}
<text @click="doAll">全部提出</text>
</view>
<view class="row">
<view class="left">
<view class="title-color">提取方式</view>
</view>
<view class="right">
<view
class="type"
v-for="(item, i) in tiType"
:key="i"
@click="changeTiType(i)"
>
<view class="check icon">
<image
v-if="tiTypeCur == i"
:src="$img('/static/img/check1_act.png')"
lazy-load
></image>
<image
v-else
:src="$img('/static/img/check1.png')"
lazy-load
></image>
</view>
{{ item.title }}
</view>
</view>
</view>
<template v-if="tiType[tiTypeCur].id == 2">
<view class="input-box">
<view class="label">姓名:</view>
<input v-model="name" placeholder="请输入姓名" />
</view>
<view class="input-box">
<view class="label">账号:</view>
<input v-model="account" placeholder="请输入账号" />
</view>
</template>
<template v-if="tiType[tiTypeCur].id == 3">
<view class="input-box">
<view class="label">开户行:</view>
<input v-model="bank" placeholder="请输入开户行" />
</view>
<view class="input-box">
<view class="label">姓名:</view>
<input v-model="name" placeholder="请输入姓名" />
</view>
<view class="input-box">
<view class="label">账号:</view>
<input v-model="account" placeholder="请输入账号" />
</view>
</template>
<view v-if="pageData" class="tip">
<text>{{ pageData.withdraw_money }}</text>
起提,每笔手续费需付
<text>{{ pageData.withdraw_money_sxf }}</text>
荷包金额,当日最高可提取
<text>{{ pageData.max_money }}</text>
</view>
<view @click="isAgree = !isAgree" class="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>
<view class="agree-r">
我已阅读并同意
<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>
<view class="submit" @click="$c.noDouble(doSubmit)">立即提取</view>
<view class="row">
<view class="left">
<view class="title-color">提取记录</view>
</view>
</view> -->
<view class="log">
<view class="log-item" v-for="(item, i) in listData" :key="i">
<view class="item-l">
<view class="title">
{{ item.status_text }}
<text v-if="item.reason">({{ item.reason }})</text>
</view>
<view class="time">{{ item.addtime }}</view>
</view>
<view class="item-money">{{ item.tal_money }}</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
// (, )
downOption: {
auto: false
},
// (, )
upOption: {
auto: true,
page: {
size: 15 // ,10
}
},
money: '',
qrCode: '',
name: '',
account: '',
bank: '',
listData: [],
userInfo: uni.getStorageSync('userinfo'),
qrCodePath: '',
tiType: [
{
id: 2,
title: '支付宝'
},
{
id: 3,
title: '银行卡'
}
],
tiTypeCur: 0,
pageData: '',
lastTi: {},
isAgree: false
}
},
onShow() {
this.getUserInfo()
},
methods: {
changeTiType(i) {
this.tiTypeCur = i
const curId = this.tiType[i].id
const target = this.lastTi[curId]
if (target) {
this.name = target.name
this.account = target.number
this.bank = target.bank
} else {
this.name = ''
this.account = ''
}
},
downCallback() {
this.money = ''
this.mescroll.resetUpScroll()
this.mescroll.scrollTo(0, 0)
this.getUserInfo()
},
/**
* @description: 获取列表
* @param {*} num
* @param {*} size
* @return {*}
*/
getList({ num, size }) {
this.req({
url: 'withdraw_log',
data: {
page: num
},
Loading: true,
success: res => {
if (res.status == 1) {
if (num == 1) {
this.listData = []
}
this.pageData = res.data
this.listData = this.listData.concat(res.data.list)
this.mescroll.endByPage(res.data.list.length, res.data.last_page)
let lastTi = {}
if (res.data.zhifubao)
lastTi[res.data.zhifubao.type] = res.data.zhifubao
if (res.data.yinhangka)
lastTi[res.data.yinhangka.type] = res.data.yinhangka
this.lastTi = lastTi
this.changeTiType(this.tiTypeCur)
}
}
})
},
doSubmit() {
if (!this.money) {
this.$c.toast({
title: '请输入金额'
})
return
}
if (!this.name) {
this.$c.toast({
title: '姓名不能为空'
})
return
}
if (!this.account) {
this.$c.toast({
title: '账号不能为空'
})
return
}
if (this.tiType[this.tiTypeCur].id == 3) {
if (!this.bank) {
this.$c.toast({
title: '开户行不能为空'
})
return
}
}
if (!this.isAgree) {
return this.$c.toast({
title: '请阅读并同意《用户协议》和《隐私政策》'
})
}
this.req({
url: 'withdraw',
data: {
money: this.money,
type: this.tiType[this.tiTypeCur].id,
name: this.name,
number: this.account,
bank: this.bank
},
success: res => {
if (res.status == 1) {
this.$c.toast({
title: res.msg,
duration: 1500,
success: () => {
this.getUserInfo()
this.downCallback()
}
})
}
}
})
},
upImg() {
let that = this
uni.chooseImage({
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
count: 1,
success: ({ tempFilePaths, tempFiles }) => {
uni.uploadFile({
url: that.siteBaseUrl + 'picture',
filePath: tempFilePaths[0],
name: 'file',
success: e => {
let res = JSON.parse(e.data)
if (res.status == 1) {
this.qrCode = res.data.imgurl
this.qrCodePath = res.data.path
}
}
})
},
fail: error => {}
})
},
doAll() {
this.money = this.userInfo.money2 * 1
},
getUserInfo() {
this.req({
url: 'user',
data: {},
success: res => {
if (res.status == 1) {
this.userInfo = res.data.userinfo
uni.setStorageSync('userinfo', res.data.userinfo)
}
}
})
}
}
}
</script>
<style lang="scss">
.content {
padding: 0 30rpx 30rpx;
.row {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
.left {
display: flex;
align-items: center;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
.title-color {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
}
.desc {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
}
.right {
display: flex;
align-items: center;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
.to-rule {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #d0d1ff;
}
.right-icon {
width: 32rpx;
height: 32rpx;
}
.type {
display: flex;
align-items: center;
.check {
width: 40rpx;
height: 32rpx;
margin-right: 10rpx;
}
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
.type + .type {
margin-left: 40rpx;
}
}
}
.input-box {
margin-top: 30rpx;
height: 80rpx;
border: 1px solid #d0d1ff;
box-sizing: border-box;
padding: 0 20rpx;
display: flex;
align-items: center;
.label {
padding: 0 20rpx;
// border-right: 1rpx solid #ccc;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #fff;
}
input {
flex: 1;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #fff;
}
}
.tip {
margin-top: 10rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
text {
padding: 0 10rpx;
color: #d0d1ff;
}
}
.pic {
margin-top: 30rpx;
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
border: 1rpx solid #d0d1ff;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
.up {
width: 100%;
height: 100%;
position: relative;
&::before,
&::after {
content: '';
width: 4rpx;
height: 40rpx;
background: #d0d1ff;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
&::after {
transform: translate(-50%, -50%) rotate(90deg);
}
}
}
.agree {
display: flex;
padding: 40rpx 0 0;
.icon {
width: 32rpx;
height: 32rpx;
}
.agree-r {
flex: 1;
word-wrap: break-word;
word-break: break-all;
padding-left: 20rpx;
line-height: 32rpx;
font-size: 26rpx;
color: #9d9d9d;
text {
color: #d0d1ff;
}
}
}
.submit {
margin: 30rpx 0 0;
width: 100%;
height: 80rpx;
background: linear-gradient(90deg, #2dcbff 0%, #ff95fb 100%);
border-radius: 40rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #222222;
}
.log {
padding: 1rpx 10rpx 0;
.log-item {
padding: 30rpx 0;
display: flex;
align-items: center;
border-bottom: 1rpx solid #333;
.item-l {
flex: 1;
padding-right: 30rpx;
.title {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
text {
font-size: 24rpx;
padding-left: 20rpx;
}
}
.time {
margin-top: 6rpx;
font-size: 25rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #cccccc;
}
}
.item-money {
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
}
}
}
</style>

View File

@ -7,27 +7,29 @@
"^detail-preview-popup$": "@/components/detail-preview-popup/detail-preview-popup.vue",
"^banner$": "@/components/banner/banner.vue"
},
"pages": [{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "pages/shouye/index",
},
{
"path": "pages/main/index",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/shouye/detail",
"path": "pages/main/detail",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/shouye/detail_wuxian",
"path": "pages/main/detail_wuxian",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#222222",
@ -35,7 +37,7 @@
}
},
{
"path": "pages/shouye/rili",
"path": "pages/main/rili",
"style": {
"navigationBarTitleText": "预售日历",
"navigationBarBackgroundColor": "#161616",
@ -43,16 +45,15 @@
}
},
{
"path": "pages/shouye/bangdan",
"path": "pages/main/bangdan",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#161616",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/shouye/huanxiang",
"path": "pages/main/huanxiang",
"style": {
"navigationBarTitleText": "换箱",
"navigationBarBackgroundColor": "#222222",
@ -61,7 +62,7 @@
}
},
{
"path": "pages/user/login",
"path": "pages/users/login",
"style": {
"navigationBarTitleText": "登录",
"navigationBarBackgroundColor": "#FFFFFF",
@ -69,7 +70,7 @@
}
},
{
"path": "pages/user/bangding",
"path": "pages/users/bangding",
"style": {
"navigationBarTitleText": "绑定手机号",
"navigationBarBackgroundColor": "#FFFFFF",
@ -77,14 +78,14 @@
}
},
{
"path": "pages/user/index",
"path": "pages/users/index",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/user/xfjl",
"path": "pages/users/xfjl",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "消费记录",
@ -92,7 +93,7 @@
}
},
{
"path": "pages/user/hsjl",
"path": "pages/users/hsjl",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "打包记录",
@ -100,7 +101,7 @@
}
},
{
"path": "pages/user/fhjl",
"path": "pages/users/fhjl",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "发货记录",
@ -108,7 +109,7 @@
}
},
{
"path": "pages/user/order",
"path": "pages/users/order",
"style": {
"navigationBarBackgroundColor": "#222222",
"navigationBarTitleText": "订单详情",
@ -117,7 +118,7 @@
}
},
{
"path": "pages/user/jf_jl",
"path": "pages/users/jf_jl",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "积分记录",
@ -125,14 +126,13 @@
}
},
{
"path": "pages/user/vip",
"path": "pages/users/vip",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "会员中心",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/guize/guize",
"style": {
@ -142,7 +142,7 @@
}
},
{
"path": "pages/user/my_coupon",
"path": "pages/users/my_coupon",
"style": {
"navigationBarTitleText": "欧气券",
"navigationBarBackgroundColor": "#222222",
@ -151,13 +151,13 @@
}
},
{
"path": "pages/user/bi_jl",
"path": "pages/users/bi_jl",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/user/wuliu_detail",
"path": "pages/users/wuliu_detail",
"style": {
"navigationBarTitleText": "查看物流",
"navigationBarBackgroundColor": "#222222",
@ -166,16 +166,15 @@
}
},
{
"path": "pages/user/tui-guang",
"path": "pages/users/tui-guang",
"style": {
"navigationBarTitleText": "邀请好友",
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/user/change",
"path": "pages/users/change",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#222222",
@ -191,7 +190,7 @@
}
},
{
"path": "pages/mall/index",
"path": "pages/shangcheng/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
@ -199,7 +198,7 @@
}
},
{
"path": "pages/user/coupon",
"path": "pages/users/coupon",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
@ -207,7 +206,7 @@
}
},
{
"path": "pages/shouye/ranking",
"path": "pages/main/ranking",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
@ -215,14 +214,13 @@
}
},
{
"path": "pages/user/bangdingweb",
"path": "pages/users/bangdingweb",
"style": {
"navigationBarTitleText": "绑定手机号"
}
},
{
"path": "pages/shouye/invite_ranking",
"path": "pages/main/invite_ranking",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
@ -252,8 +250,9 @@
"style": {
"navigationStyle": "custom"
}
}, {
"path": "pages/shouye/dada_ranking",
},
{
"path": "pages/main/dada_ranking",
"style": {
"navigationStyle": "custom"
}
@ -265,7 +264,7 @@
}
},
{
"path": "pages/shouye/danye",
"path": "pages/main/danye",
"style": {
"navigationStyle": "custom"
}
@ -289,7 +288,7 @@
}
},
{
"path": "pages/shouye/slots",
"path": "pages/main/slots",
"style": {
"navigationStyle": "custom"
}
@ -307,7 +306,7 @@
}
},
{
"path": "pages/user/recharge-page",
"path": "pages/users/recharge-page",
"style": {
"navigationStyle": "custom"
}
@ -319,13 +318,13 @@
}
},
{
"path": "pages/shouye/prize-wheel-demo",
"path": "pages/main/prize-wheel-demo",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/shouye/canvas-prize-demo",
"path": "pages/main/canvas-prize-demo",
"style": {
"navigationStyle": "custom"
}
@ -349,7 +348,7 @@
}
},
{
"path": "pages/user/cancel-account-page",
"path": "pages/users/cancel-account-page",
"style": {
"navigationStyle": "custom"
}
@ -361,82 +360,31 @@
}
},
{
"path": "pages/user/yetx",
"path": "pages/users/yetx",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/users/collect",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/users/equity",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/other/qy-rule",
"style": {
"navigationStyle": "custom"
}
}
],
"subPackages": [{
"root": "package/index",
"pages": [{
"path": "sign",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "lian-ji",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "coupon-center",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "leitai",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}
]
},
{
"root": "package/mine",
"pages": [{
"path": "collect",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "skill-card",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "equity",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "qy-rule",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "coupon-detail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "ti-qu",
"style": {
"navigationStyle": "custom"
}
}
]
}
],
"subPackages": [],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "友达赏",
@ -456,13 +404,13 @@
"iconHeight": "24px",
"list": [
{
"pagePath": "pages/shouye/index",
"pagePath": "pages/main/index",
"iconPath": "static/tab/n1.png",
"selectedIconPath": "static/tab/c1.png",
"text": "首页"
},
{
"pagePath": "pages/mall/index",
"pagePath": "pages/shangcheng/index",
"iconPath": "static/tab/n5.png",
"selectedIconPath": "static/tab/c5.png",
"text": "商城"
@ -480,7 +428,7 @@
"text": "福利"
},
{
"pagePath": "pages/user/index",
"pagePath": "pages/users/index",
"iconPath": "static/tab/n4.png",
"selectedIconPath": "static/tab/c4.png",
"text": "我的"

View File

@ -39,7 +39,7 @@ export default {
toHome() {
// #ifdef H5 || MP
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
// #endif
},

View File

@ -52,13 +52,13 @@ export default {
return {
imageUrl: imageUrl,
title: "友达上线,来就送!",
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
path: '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID
}
},
methods: {
items(item) {
this.$c.to({
url: '/pages/shouye/detail',
url: '/pages/main/detail',
query: {
goods_id: item.id,
type_text: '积分赏'

View File

@ -693,7 +693,7 @@ export default {
},
toHome() {
this.$customRouter.navigateTo('/pages/shouye/index', {}, 'reLaunch');
this.$customRouter.navigateTo('/pages/main/index', {}, 'reLaunch');
},
applyPageTransitions() {

View File

@ -31,7 +31,7 @@ export default {
return {
imageUrl: imageUrl,
title: "友达上线,来就送!",
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
path: '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID
}
},
methods: {

View File

@ -525,7 +525,7 @@ export default {
toExpress(item) {
this.$c.to({
url: '/pages/user/wuliu_detail',
url: '/pages/users/wuliu_detail',
query: {
id: item.id
}
@ -534,7 +534,7 @@ export default {
toOrder(item) {
this.$c.to({
url: '/pages/user/order',
url: '/pages/users/order',
query: {
id: item.id
}

View File

@ -256,9 +256,9 @@ export default {
var pages = getCurrentPages()
// console.log(pages)
if (pages.length == 1 && pages[0].route == 'pages/shouye/bangdan') {
if (pages.length == 1 && pages[0].route == 'pages/main/bangdan') {
uni.redirectTo({
url: '/pages/shouye/index'
url: '/pages/main/index'
})
} else {
uni.navigateBack()

View File

@ -249,7 +249,7 @@ export default {
title: this.$config.getAppSetting("app_name") +
`${this.pageData.goods.title}系列 第${this.pageData.goods.num}`,
imageUrl: this.pageData.goods.imgurl_detail,
path: "/pages/shouye/detail" +
path: "/pages/main/detail" +
this.$c.qs({
goods_id: this.pageData.goods.id,
goods_num: this.pageData.goods.num,
@ -365,7 +365,7 @@ export default {
toCoupon() {
this.$c.to({
url: "/pages/user/coupon",
url: "/pages/users/coupon",
query: {
type: 2,
total_price: this.orderData.order_total,
@ -572,7 +572,7 @@ export default {
changeBox() {
this.$c.to({
url: "/pages/shouye/huanxiang",
url: "/pages/main/huanxiang",
query: {
id: this.pageData.goods.id,
type_text: this.optData.type_text,

View File

@ -314,7 +314,7 @@ export default {
return {
title: this.$config.getAppSetting("app_name") + `${this.pageData.goods.title}系列`,
imageUrl: this.pageData.goods.imgurl_detail,
path: '/pages/shouye/detail_wuxian' +
path: '/pages/main/detail_wuxian' +
this.$c.qs({
goods_id: this.pageData.goods.id,
goods_num: this.pageData.goods.num,
@ -476,7 +476,7 @@ export default {
toCoupon() {
this.$c.to({
url: '/pages/user/coupon',
url: '/pages/users/coupon',
query: {
type: 2,
total_price: this.orderData.order_total

View File

@ -121,7 +121,7 @@
</template>
<script>
import lffBarrage from "@/components/lff-barrage/lff-barrage.vue";
import FloatBall from "@/components/float-ball/FloatBall.vue";
import {
getAdvert,
@ -129,7 +129,7 @@
} from "../../common/server/config";
export default {
components: {
lffBarrage,
FloatBall
},
data() {
@ -207,7 +207,7 @@
imageUrl: imageUrl,
title: this.$config.getAppSetting("app_name") + ",正版潮玩手办一番赏",
path: "/pages/shouye/index?pid=" + uni.getStorageSync("userinfo").ID,
path: "/pages/main/index?pid=" + uni.getStorageSync("userinfo").ID,
};
},
computed: {
@ -340,14 +340,14 @@
},
todetails(e) {
//
let url = "/pages/shouye/detail";
let url = "/pages/main/detail";
let params = {
goods_id: e.id,
// type_text: e.type_text
};
if (e.type == 2 || e.type == 8 || e.type == 16) {
url = "/pages/shouye/detail_wuxian";
url = "/pages/main/detail_wuxian";
}
if (e.type == 9) {
@ -369,10 +369,10 @@
},
toRanking() {
this.$customRouter.navigateTo("/pages/shouye/ranking");
this.$customRouter.navigateTo("/pages/main/ranking");
},
toyaqingRanking() {
this.$customRouter.navigateTo("/pages/shouye/invite_ranking");
this.$customRouter.navigateTo("/pages/main/invite_ranking");
},
jumapSlots() {

View File

@ -52,7 +52,7 @@
</view>
<view class="bottom-btn">
<view class="invite-btn" @click="$c.nav('/pages/user/tui-guang')">
<view class="invite-btn" @click="$c.nav('/pages/users/tui-guang')">
<text>立即邀请</text>
</view>
</view>

View File

@ -206,7 +206,7 @@ export default {
uni.removeStorageSync('userinfo');
// uni.removeStorageSync('test_mode_status');
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
} else if (res.cancel) {
console.log('用户点击取消');

View File

@ -148,7 +148,7 @@ export default {
return {
imageUrl: imageUrl,
title: "友达上线,来就送!",
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
path: '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID
}
},
data() {

View File

@ -1,569 +0,0 @@
<template>
<view class="all">
<!-- 小程序登录界面 -->
<view v-if="isCanUse && isMpWeixin">
<view>
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="content">
<view>申请获取以下权限</view>
<text style="color: #979797;">获得你的公开信息</text>
</view>
<view @click="isAgree = !isAgree" class="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>
<view class="agree-r">
我已阅读并同意
<text @click.stop="$customRouter.navigateTo('/pages/guize/guize', {type: 4})">
用户协议
</text>
<text @click.stop="$customRouter.navigateTo('/pages/guize/guize', {type: 5})">
隐私政策
</text>
</view>
</view>
<view class="btn-list">
<view @click="navigateBack()" class="cancel">
拒绝
</view>
<button class="bottom center" type="primary" withCredentials="true" lang="zh_CN"
@click="getUserProfile">
<text>授权登录</text>
</button>
</view>
<view style="font-size: 20rpx;color: #979797;position: fixed;bottom: 20rpx;right:47rpx;">version:v1.0.3
</view>
</view>
</view>
<!-- H5手机号登录界面 -->
<view v-if="isCanUse && !isMpWeixin">
<view>
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="h5-login-form">
<view class="input-item">
<input type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11" class="phone-input" />
</view>
<view class="input-item code-item">
<input type="number" v-model="verifyCode" placeholder="请输入验证码" maxlength="6"
class="code-input" />
<view @click="sendVerifyCode" class="send-code-btn" :class="{ disabled: countdown > 0 }">
{{ countdown > 0 ? countdown + '秒' : '发送验证码' }}
</view>
</view>
<view @click="isAgree = !isAgree" class="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>
<view class="agree-r">
我已阅读并同意
<text @click.stop="$platform.getUserAgreement()">
用户协议
</text>
<text @click.stop="$platform.getPrivacyAgreement()">
隐私政策
</text>
</view>
</view>
<view class="btn-list">
<view @click="navigateBack()" class="cancel">
拒绝
</view>
<view class="bottom center" @click="phoneLogin">
<text>登录</text>
</view>
</view>
</view>
<view style="font-size: 20rpx;color: #979797;position: fixed;bottom: 20rpx;right:47rpx;">version:v1.0.3
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2,
SessionKey: '',
OpenId: '',
nickName: null,
avatarUrl: null,
isCanUse: uni.getStorageSync('isCanUse') || true, //true
code: '',
isAgree: false,
// H5
isMpWeixin: false, //
mobile: '', //
verifyCode: '', //
countdown: 0, //
timer: null, //
codeSent: false //
}
},
onLoad(option) {
//
// #ifdef MP
this.isMpWeixin = true;
// #endif
//
if (option != null) {
if (option.code != null) {
}
}
},
onUnload() {
//
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
//
navigateBack() {
uni.navigateBack({
delta: 1,
fail: () => {
//
this.$customRouter.navigateTo('/pages/shouye/index', {}, 'switchTab');
}
});
},
//===
getUserProfile(e) {
if (!this.isAgree) {
return uni.showToast({
title: '请阅读并同意《用户协议》和《隐私政策》',
icon: 'none'
});
}
// #ifdef MP
this.wxUserProfile();
// #endif
},
//
async sendVerifyCode() {
//
if (this.countdown > 0) {
return;
}
//
if (!this.isAgree) {
return uni.showToast({
title: '请阅读并同意《用户协议》和《隐私政策》',
icon: 'none'
});
}
//
if (!this.mobile || !/^1\d{10}$/.test(this.mobile)) {
return uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
}
//
try {
const res = await this.$request.post('v2/account/sendSms', {
phone: this.mobile
});
if (res.status == 1) {
uni.showToast({
title: '验证码已发送',
icon: 'none'
});
//
this.codeSent = true;
// 使
this.countdown = res.data || 60; // 使60
this.timer = setInterval(() => {
this.countdown--;
if (this.countdown <= 0) {
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
} else {
uni.showToast({
title: res.msg || '发送失败,请稍后重试',
icon: 'none'
});
}
} catch (error) {
uni.showToast({
title: '发送验证码失败,请稍后重试',
icon: 'none'
});
console.error('发送验证码失败:', error);
}
},
//
async phoneLogin() {
//
if (!this.isAgree) {
return uni.showToast({
title: '请阅读并同意《用户协议》和《隐私政策》',
icon: 'none'
});
}
if (!this.mobile || !/^1\d{10}$/.test(this.mobile)) {
return uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
}
if (!this.verifyCode) {
return uni.showToast({
title: '请输入验证码',
icon: 'none'
});
}
//
// if (!this.codeSent) {
// return uni.showToast({
// title: '',
// icon: 'none'
// });
// }
//
try {
const res = await this.$request.post('mobileLogin', {
mobile: this.mobile,
code: this.verifyCode,
pid: uni.getStorageSync('pid')
});
if (res.status == 1) {
uni.setStorageSync('token', res.data);
this.$c.msg("登录成功");
// URL
const redirectUrl = uni.getStorageSync('redirect');
if (redirectUrl) {
//
uni.removeStorageSync('redirect');
// 使
this.handleRedirect(redirectUrl);
} else {
//
setTimeout(() => {
this.getdata();
}, 1000);
}
} else {
this.$c.msg("登录失败!" + res.msg);
}
} catch (error) {
// this.$c.msg("");
console.error('登录失败:', error);
}
},
/**
* 处理登录成功后的重定向逻辑
* @param {String} redirectUrl 重定向URL
*/
handleRedirect(redirectUrl) {
let that = this;
//
const pages = getCurrentPages();
// redirect URL
if (pages.length > 1) {
const prevPage = pages[pages.length - 2];
// ()
let prevPageUrl = '/' + prevPage.route;
if (prevPage.options && Object.keys(prevPage.options).length > 0) {
const paramStr = Object.keys(prevPage.options)
.map(key => `${key}=${prevPage.options[key]}`)
.join('&');
prevPageUrl += '?' + paramStr;
}
// redirect URLURL
const redirectUrlPath = redirectUrl.split('?')[0];
const prevPageUrlPath = prevPageUrl.split('?')[0];
if (redirectUrlPath === prevPageUrlPath) {
//
console.log('重定向URL与上一页相同直接返回');
setTimeout(() => {
uni.navigateBack();
}, 1000);
return true;
}
}
// URL
setTimeout(() => {
that.$customRouter.navigateTo(redirectUrl).catch(err => {
console.error('重定向跳转失败:', err)
//
that.$customRouter.navigateTo('/pages/user/index')
})
}, 1000);
return true;
},
async wxUserProfile() {
try {
const profileRes = await new Promise((resolve, reject) => {
uni.getUserProfile({
desc: '用于向用户发送商品',
lang: 'zh_CN',
success: resolve,
fail: reject,
complete: (e) => {
console.log(e, '用于向用户发送商品');
}
});
});
try {
const loginRes = await new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success: resolve,
fail: (e) => {
this.$c.msg("登录失败,网络错误!" + e.msg);
console.log(e, '登录失败', e);
reject(e);
},
complete: (e) => {
console.log(e, '登录');
}
});
});
try {
const res = await this.$request.post('login', {
code: loginRes.code,
nickname: '',
headimg: '',
pid: uni.getStorageSync('pid')
});
console.log(res, '登录成功');
if (res.status == 1) {
uni.setStorageSync('token', res.data);
this.$c.msg("登录成功");
// URL
const redirectUrl = uni.getStorageSync('redirect');
if (redirectUrl) {
//
uni.removeStorageSync('redirect');
// 使
this.handleRedirect(redirectUrl);
} else {
//
setTimeout(() => {
this.getdata();
}, 1000);
}
} else {
this.$c.msg("登录失败!" + res.msg);
}
} catch (error) {
console.error('请求登录失败:', error);
}
} catch (error) {
console.error('微信登录失败:', error);
}
} catch (error) {
this.$c.msg("登录失败,申请获取微信用户数据失败");
console.log(error, '获取微信用户数据失败');
}
},
async getdata() {
try {
const res = await this.$request.post('user');
if (res.status == 1 && res.data.userinfo != null && res.data.userinfo.mobile_is == 0) {
console.log("判断用户有没有手机号", res.data.userinfo.mobile_is);
// 使
this.$customRouter.navigateTo('/pages/user/bangding', {}, 'navigateTo');
} else {
// 使
this.$customRouter.navigateTo('/pages/user/index', {}, 'navigateTo');
}
} catch (error) {
console.error('获取用户数据失败:', error);
}
}
}
}
</script>
<style lang="scss">
.all {
min-height: 100vh;
background-color: #FFFFFF;
// background: url($imgurl+'common/pageBg1.png') no-repeat 0 0 / 100% auto;
}
.header {
margin: 0 0 90rpx 50rpx;
padding: 90rpx 0 0;
border-bottom: 1px solid #E8E8E8;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
border-radius: 50%;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
color: #333333;
}
.content text {
display: block;
margin-top: 28rpx;
}
// H5
.h5-login-form {
padding: 0 50rpx;
.input-item {
height: 90rpx;
border-bottom: 1px solid #E8E8E8;
margin-bottom: 40rpx;
input {
height: 100%;
width: 100%;
font-size: 28rpx;
}
}
.code-item {
display: flex;
justify-content: space-between;
align-items: center;
.code-input {
flex: 1;
}
.send-code-btn {
width: 200rpx;
height: 70rpx;
background-color: #333333;
color: #CDEF27;
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 12rpx;
&.disabled {
background-color: #cccccc;
color: #ffffff;
}
}
}
}
.agree {
display: flex;
padding: 0 50rpx;
margin: 40rpx 0;
.icon {
width: 32rpx;
height: 32rpx;
}
.agree-r {
flex: 1;
word-wrap: break-word;
word-break: break-all;
padding-left: 20rpx;
line-height: 32rpx;
font-size: 20rpx;
color: #999999;
text {
color: #333333;
}
}
}
.btn-list {
display: flex;
justify-content: space-evenly;
padding: 50rpx 0 0;
.cancel {
width: 200rpx;
height: 80rpx;
box-sizing: border-box;
border-radius: 16rpx;
font-size: 28rpx;
color: #333333;
display: flex;
justify-content: center;
align-items: center;
background-color: #CDEF27;
// filter: grayscale(1);
}
.bottom {
background: #333333;
margin: 0;
width: 416rpx;
height: 80rpx;
text-align: center;
box-sizing: border-box;
border-radius: 16rpx;
font-size: 28rpx;
color: #CDEF27;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@ -44,7 +44,7 @@ export default {
uni.navigateBack({
fail: function() {
//
that.$customRouter.navigateTo('/pages/user/index', {}, 'reLaunch');
that.$customRouter.navigateTo('/pages/users/index', {}, 'reLaunch');
}
});
},
@ -79,7 +79,7 @@ export default {
uni.navigateBack({
fail: function() {
//
that.$customRouter.navigateTo('/pages/user/index', {}, 'reLaunch');
that.$customRouter.navigateTo('/pages/users/index', {}, 'reLaunch');
}
});
}, 1000)

View File

@ -83,7 +83,7 @@
}
this.closePop();
uni.switchTab({
url: '/pages/shouye/index'
url: '/pages/main/index'
});
}
})

357
pages/users/collect.vue Normal file
View File

@ -0,0 +1,357 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" title="我的收藏" color="#000000" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar>
<!-- 顶部标签栏 -->
<scroll-view class="tab" scroll-x>
<view class="tab-item" v-for="(item, i) in tabList" :key="i" :class="{ active: tabCur === i }"
@click="tabChange(i)">
{{ item.title }}
</view>
</scroll-view>
<!-- 列表区域 -->
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="getList" :down="downOption"
:up="upOption">
<view class="list" v-if="listData.length > 0">
<view class="list-item" v-for="(item, i) in listData" :key="i" @click="toDetail(item)">
<view class="pic">
<image class="pic-img" :src="item.imgurl" mode="aspectFill" lazy-load></image>
</view>
<view class="tag" :style="{ backgroundImage: `url(${$img1('common/label1.png')})` }">
<text>{{ tabList[tabCur].title }}</text>
</view>
<view class="title ellipsis">{{ item.goods_title }}</view>
<view class="price-box">
<view class="price">
¥<text>{{ item.goods_price }}</text>
</view>
<view v-if="item.stock" class="stock">
<view class="stock-num">{{ item.surplus_stock }}/{{ item.stock }}</view>
<image class="stock-icon" :src="$img1('index/box.png')" lazy-load></image>
</view>
</view>
</view>
</view>
<!-- 空状态 -->
<view class="empty-state" v-if="listData.length === 0 && !isLoading">
<image class="empty-image" :src="$img1('common/empty.png')" mode="aspectFit"></image>
<text class="empty-text">暂无收藏内容</text>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
//
downOption: {
auto: false,
},
//
upOption: {
auto: true,
page: {
size: 10, //
},
noMoreSize: 5, // ,5
empty: {
use: false, // 使
},
},
tabList: [], //
tabCur: 0, //
listData: [], //
isLoading: true, //
};
},
created() {
//
this.initTabList();
},
methods: {
/**
* 初始化标签列表
*/
initTabList() {
const tabList = this.$config.getGoodType();
// id0
this.tabList = tabList.filter((item) => item.id !== 0);
},
/**
* 初始化mescroll对象
* @param {Object} mescroll mescroll实例
*/
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
/**
* 下拉刷新回调
*/
downCallback() {
this.mescroll.resetUpScroll();
},
/**
* 跳转到详情页
* @param {Object} item 商品项
*/
toDetail(item) {
let url = "/pages/main/detail";
//
if (item.type === 2 || item.type === 8) {
url = "/pages/main/detail_wuxian";
} else if (item.type === 9) {
url = "/package/index/lian-ji";
}
this.$c.to({
url,
query: {
goods_id: item.goods_id,
type_text: this.tabList[this.tabCur].title,
},
});
},
/**
* 切换标签
* @param {Number} index 标签索引
*/
tabChange(index) {
if (this.tabCur === index) return;
this.tabCur = index;
this.listData = [];
this.isLoading = true;
//
this.mescroll.resetUpScroll();
this.mescroll.scrollTo(0, 0);
},
/**
* 获取收藏列表数据
* @param {Object} params 分页参数
*/
getList({ num, size }) {
this.isLoading = true;
// 使PromiseAPI
this.$request
.post("listCollect", {
page: num,
type: this.tabList[this.tabCur].id,
})
.then((res) => {
this.isLoading = false;
if (res.status === 1) {
//
if (num === 1) {
this.listData = [];
}
//
this.listData = this.listData.concat(res.data.data || []);
//
this.mescroll.endByPage(
res.data.data ? res.data.data.length : 0,
res.data.last_page || 1
);
} else {
this.mescroll.endErr();
uni.showToast({
title: res.msg || "加载失败",
icon: "none",
});
}
})
.catch((err) => {
this.isLoading = false;
this.mescroll.endErr();
uni.showToast({
title: "网络请求失败",
icon: "none",
});
console.error(err);
});
},
},
};
</script>
<style lang="scss">
.content {
background-color: #f7f7f7;
min-height: 100vh;
//
.tab {
white-space: nowrap;
padding: 15rpx 0;
.tab-item {
width: 88rpx;
height: 40rpx;
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 30rpx;
background-color: #ffffff;
font-size: 20rpx;
border-radius: 8rpx;
color: #333333;
transition: all 0.2s;
&:last-child {
margin-right: 30rpx;
}
&.active {
background-color: #e6f791;
font-weight: 500;
}
}
}
//
.list {
padding: 15rpx 30rpx 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.list-item {
width: 330rpx;
height: 487rpx;
margin-top: 30rpx;
position: relative;
background-color: #ffffff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
.pic {
width: 100%;
height: 332rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #f5f5f5;
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
.pic-img {
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0 0;
}
}
.tag {
position: absolute;
z-index: 1;
top: 12rpx;
left: 12rpx;
width: 68rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
background-size: 100% 100%;
text {
font-size: 14rpx;
color: #ffffff;
}
}
.title {
padding: 20rpx 20rpx 0;
font-size: 20rpx;
color: #333333;
line-height: 1.4;
height: 56rpx;
}
.price-box {
padding: 20rpx 20rpx 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
bottom: 0;
left: 0;
right: 0;
.price {
font-size: 16rpx;
color: #333333;
text {
font-size: 24rpx;
font-weight: 500;
}
}
.stock {
display: flex;
align-items: center;
.stock-num {
font-size: 24rpx;
color: #cccccc;
}
.stock-icon {
width: 26rpx;
height: 26rpx;
margin-left: 6rpx;
}
}
}
}
}
//
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
.empty-image {
width: 200rpx;
height: 200rpx;
margin-bottom: 20rpx;
}
.empty-text {
font-size: 28rpx;
color: #999;
}
}
//
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
</style>

View File

@ -137,7 +137,7 @@
return {
title: `快来领取${userInfo.nickname}分享的${this.pageData.num}赏币的${this.pageData.level_text}`,
imageUrl: this.pageData.level_img,
path: '/pages/user/index' +
path: '/pages/users/index' +
this.$c.qs({
ou_coupon_id: this.pageData.id
})

View File

@ -1,8 +1,4 @@
<!--
* @Date: 2023-06-30 09:27:33
* @LastEditTime: 2023-12-21 11:05:07
* @Description: content
-->
<template>
<view class="content">
<uni-nav-bar left-icon="left" color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true"
@ -106,7 +102,7 @@
methods: {
toUse(item) {
if (this.pageType == 1) {
this.$customRouter.navigateTo('/pages/shouye/index', {}, 'switchTab');
this.$customRouter.navigateTo('/pages/main/index', {}, 'switchTab');
}
if (this.pageType == 2) {

View File

@ -33,7 +33,7 @@
</view>
</view>
</view>
<view class="buy" @click="$c.to({ type: 3, url: '/pages/shouye/index' })">
<view class="buy" @click="$c.to({ type: 3, url: '/pages/main/index' })">
<text>去购买</text>
</view>
@ -237,7 +237,7 @@
uni.setStorageSync('_qy_rule', this.pageData.danye_list)
this.$c.to({
url: '/package/mine/qy-rule'
url: '/pages/other/qy-rule'
})
},
@ -337,12 +337,12 @@
toPage(id) {
if (id == 1) {
this.$c.to({
url: '/pages/user/tui-guang'
url: '/pages/users/tui-guang'
})
} else {
this.$c.to({
type: 3,
url: '/pages/shouye/index'
url: '/pages/main/index'
})
}
},

View File

@ -219,13 +219,13 @@ export default {
})
},
toorder(e) {
this.$customRouter.navigateTo('/pages/shouye/detail', {
this.$customRouter.navigateTo('/pages/main/detail', {
goods_id: e,
goods_num: 1
})
},
towuliu(e) {
this.$customRouter.navigateTo('/pages/shouye/wuliu_detail', { id: e })
this.$customRouter.navigateTo('/pages/main/wuliu_detail', { id: e })
},
getlist(v) {
this.show = v

View File

@ -23,7 +23,7 @@
</view>
<view v-if="userinfo && getIsCheck()" class="lv-box align-center justify-between"
@click="$c.to({ url: '/package/mine/equity' })">
@click="$c.to({ url: '/pages/users/equity' })">
<text class="lv-box-dengji">LV.{{ userinfo.quan_yi_level.level }}</text>
<view class="lv-box-ouqi column">
<text>
@ -37,7 +37,7 @@
:strokeWidth="3"></cmd-progress>
</view>
</view>
<text class="lv-box-detail center" @click="$c.to({ url: '/package/mine/equity' })">查看详情</text>
<text class="lv-box-detail center" @click="$c.to({ url: '/pages/users/equity' })">查看详情</text>
<image style="width: 206rpx; height: 206rpx; position: absolute; top: -40rpx; right: 8rpx;"
:src="$img1('my/ou.png')">
</image>
@ -51,22 +51,22 @@
<view v-if="getIsCheck('user_money')" class="money-card">
<view class="other-num">
<view v-if="zuanshi" class="other-item" @click="$c.to({ url: '/pages/user/yetx' })">
<view v-if="zuanshi" class="other-item" @click="$c.to({ url: '/pages/users/yetx' })">
<view class="title">{{ $config.getAppSetting('balance_name') }}</view>
<view class="flex row">
<view class="num" style="">{{ formatNumber(userinfo.money) }}</view>
<image @click.stop="$c.to({ url: '/pages/user/recharge-page' })"
<image @click.stop="$c.to({ url: '/pages/users/recharge-page' })"
:src="$img1('my/ic_recharge.png')" style="width: 83rpx; height: 48rpx; margin-left: 10rpx;"
mode=""></image>
</view>
</view>
<view class="other-item" @click="$c.to({ url: '/pages/user/bi_jl' })">
<view class="other-item" @click="$c.to({ url: '/pages/users/bi_jl' })">
<view class="title">{{ $config.getAppSetting('currency1_name') }}</view>
<view class="num" style="color: #333333;">{{ formatNumber(userinfo.integral) }}
</view>
</view>
<view class="other-item" @click="$c.to({ url: '/pages/user/jf_jl' })">
<view class="other-item" @click="$c.to({ url: '/pages/users/jf_jl' })">
<view class="title">{{ $config.getAppSetting('currency2_name') }}</view>
<view class="num" style="color: #333333;">{{ formatNumber(userinfo.money2) }}
</view>
@ -187,7 +187,7 @@ export default {
return {
imageUrl: imageUrl,
title: "友达赏,正版潮玩手办一番赏",
path: '/pages/user/index?pid=' + uni.getStorageSync('userinfo').ID
path: '/pages/users/index?pid=' + uni.getStorageSync('userinfo').ID
}
},
onShow() {
@ -209,13 +209,13 @@ export default {
toChange() {
var user = uni.getStorageSync('userinfo');
if (user == null || user == "" || this.userinfo == '') {
uni.setStorageSync('redirect', '/pages/user/index');
this.$c.nav("/pages/user/login")
uni.setStorageSync('redirect', '/pages/users/index');
this.$c.nav("/pages/users/login")
return;
}
this.$c.to({
url: '/pages/user/change'
url: '/pages/users/change'
})
},
getIsCheck(tag) {
@ -238,7 +238,7 @@ export default {
duration: 500,
success: () => {
this.$c.to({
url: '/package/mine/coupon-detail',
url: '/pages/users/coupon-detail',
query: {
id: coupon_id
}
@ -247,7 +247,7 @@ export default {
})
} else if (res.status == 2222) {
this.$c.to({
url: '/package/mine/coupon-detail',
url: '/pages/users/coupon-detail',
query: {
id: coupon_id
}
@ -294,17 +294,17 @@ export default {
fail: error => { }
})
},
getlist(index) {
this.show = index
},
todetail(a) {
if (a.type == 2) {
this.$customRouter.navigateTo('/pages/shouye/detail_wuxian', {
this.$customRouter.navigateTo('/pages/main/detail_wuxian', {
goods_id: a.goods_id
});
} else {
this.$customRouter.navigateTo('/pages/shouye/detail', {
this.$customRouter.navigateTo('/pages/main/detail', {
goods_id: a.goods_id,
goods_num: a.num
});
@ -334,12 +334,12 @@ export default {
toPage(id) {
if (id == 1) {
this.$c.to({
url: '/pages/user/tui-guang'
url: '/pages/users/tui-guang'
})
} else {
this.$c.to({
type: 3,
url: '/pages/shouye/index'
url: '/pages/main/index'
})
}
},

562
pages/users/login.vue Normal file
View File

@ -0,0 +1,562 @@
<template>
<view class="all">
<!-- 小程序登录界面 -->
<view v-if="isCanUse && isMpWeixin">
<view>
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="content">
<view>申请获取以下权限</view>
<text style="color: #979797;">获得你的公开信息</text>
</view>
<view @click="isAgree = !isAgree" class="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>
<view class="agree-r">
我已阅读并同意
<text @click.stop="$customRouter.navigateTo('/pages/guize/guize', { type: 4 })">
用户协议
</text>
<text @click.stop="$customRouter.navigateTo('/pages/guize/guize', { type: 5 })">
隐私政策
</text>
</view>
</view>
<view class="btn-list">
<view @click="navigateBack()" class="cancel">
拒绝
</view>
<button class="bottom center" type="primary" withCredentials="true" lang="zh_CN"
@click="getUserProfile">
<text>授权登录</text>
</button>
</view>
<view style="font-size: 20rpx;color: #979797;position: fixed;bottom: 20rpx;right:47rpx;">version:v1.0.3
</view>
</view>
</view>
<!-- H5手机号登录界面 -->
<view v-if="isCanUse && !isMpWeixin">
<view>
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="h5-login-form">
<view class="input-item">
<input type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11" class="phone-input" />
</view>
<view class="input-item code-item">
<input type="number" v-model="verifyCode" placeholder="请输入验证码" maxlength="6"
class="code-input" />
<view @click="sendVerifyCode" class="send-code-btn" :class="{ disabled: countdown > 0 }">
{{ countdown > 0 ? countdown + '秒' : '发送验证码' }}
</view>
</view>
<view @click="isAgree = !isAgree" class="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>
<view class="agree-r">
我已阅读并同意
<text @click.stop="$platform.getUserAgreement()">
用户协议
</text>
<text @click.stop="$platform.getPrivacyAgreement()">
隐私政策
</text>
</view>
</view>
<view class="btn-list">
<view @click="navigateBack()" class="cancel">
拒绝
</view>
<view class="bottom center" @click="phoneLogin">
<text>登录</text>
</view>
</view>
</view>
<view style="font-size: 20rpx;color: #979797;position: fixed;bottom: 20rpx;right:47rpx;">version:v1.0.3
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2,
SessionKey: '',
OpenId: '',
nickName: null,
avatarUrl: null,
isCanUse: uni.getStorageSync('isCanUse') || true, //true
code: '',
isAgree: false,
// H5
isMpWeixin: false, //
mobile: '', //
verifyCode: '', //
countdown: 0, //
timer: null, //
codeSent: false //
}
},
onLoad(option) {
//
// #ifdef MP
this.isMpWeixin = true;
// #endif
//
if (option != null) {
if (option.code != null) {
}
}
},
onUnload() {
//
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
//
navigateBack() {
uni.navigateBack({
delta: 1,
fail: () => {
//
this.$customRouter.navigateTo('/pages/main/index', {}, 'switchTab');
}
});
},
//===
getUserProfile(e) {
if (!this.isAgree) {
return uni.showToast({
title: '请阅读并同意《用户协议》和《隐私政策》',
icon: 'none'
});
}
// #ifdef MP
this.wxUserProfile();
// #endif
},
//
async sendVerifyCode() {
//
if (this.countdown > 0) {
return;
}
//
if (!this.isAgree) {
return uni.showToast({
title: '请阅读并同意《用户协议》和《隐私政策》',
icon: 'none'
});
}
//
if (!this.mobile || !/^1\d{10}$/.test(this.mobile)) {
return uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
}
//
try {
const res = await this.$request.post('v2/account/sendSms', {
phone: this.mobile
});
if (res.status == 1) {
uni.showToast({
title: '验证码已发送',
icon: 'none'
});
//
this.codeSent = true;
// 使
this.countdown = res.data || 60; // 使60
this.timer = setInterval(() => {
this.countdown--;
if (this.countdown <= 0) {
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
} else {
uni.showToast({
title: res.msg || '发送失败,请稍后重试',
icon: 'none'
});
}
} catch (error) {
uni.showToast({
title: '发送验证码失败,请稍后重试',
icon: 'none'
});
console.error('发送验证码失败:', error);
}
},
//
async phoneLogin() {
//
if (!this.isAgree) {
return uni.showToast({
title: '请阅读并同意《用户协议》和《隐私政策》',
icon: 'none'
});
}
if (!this.mobile || !/^1\d{10}$/.test(this.mobile)) {
return uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
}
if (!this.verifyCode) {
return uni.showToast({
title: '请输入验证码',
icon: 'none'
});
}
//
try {
const res = await this.$request.post('mobileLogin', {
mobile: this.mobile,
code: this.verifyCode,
pid: uni.getStorageSync('pid')
});
if (res.status == 1) {
uni.setStorageSync('token', res.data);
this.$c.msg("登录成功");
// URL
const redirectUrl = uni.getStorageSync('redirect');
if (redirectUrl) {
//
uni.removeStorageSync('redirect');
// 使
this.handleRedirect(redirectUrl);
} else {
//
setTimeout(() => {
this.getdata();
}, 1000);
}
} else {
this.$c.msg("登录失败!" + res.msg);
}
} catch (error) {
// this.$c.msg("");
console.error('登录失败:', error);
}
},
/**
* 处理登录成功后的重定向逻辑
* @param {String} redirectUrl 重定向URL
*/
handleRedirect(redirectUrl) {
let that = this;
//
const pages = getCurrentPages();
// redirect URL
if (pages.length > 1) {
const prevPage = pages[pages.length - 2];
// ()
let prevPageUrl = '/' + prevPage.route;
if (prevPage.options && Object.keys(prevPage.options).length > 0) {
const paramStr = Object.keys(prevPage.options)
.map(key => `${key}=${prevPage.options[key]}`)
.join('&');
prevPageUrl += '?' + paramStr;
}
// redirect URLURL
const redirectUrlPath = redirectUrl.split('?')[0];
const prevPageUrlPath = prevPageUrl.split('?')[0];
if (redirectUrlPath === prevPageUrlPath) {
//
console.log('重定向URL与上一页相同直接返回');
setTimeout(() => {
uni.navigateBack();
}, 1000);
return true;
}
}
// URL
setTimeout(() => {
that.$customRouter.navigateTo(redirectUrl).catch(err => {
console.error('重定向跳转失败:', err)
//
that.$customRouter.navigateTo('/pages/users/index')
})
}, 1000);
return true;
},
async wxUserProfile() {
try {
const profileRes = await new Promise((resolve, reject) => {
uni.getUserProfile({
desc: '用于向用户发送商品',
lang: 'zh_CN',
success: resolve,
fail: reject,
complete: (e) => {
console.log(e, '用于向用户发送商品');
}
});
});
try {
const loginRes = await new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success: resolve,
fail: (e) => {
this.$c.msg("登录失败,网络错误!" + e.msg);
console.log(e, '登录失败', e);
reject(e);
},
complete: (e) => {
console.log(e, '登录');
}
});
});
try {
const res = await this.$request.post('login', {
code: loginRes.code,
nickname: '',
headimg: '',
pid: uni.getStorageSync('pid')
});
console.log(res, '登录成功');
if (res.status == 1) {
uni.setStorageSync('token', res.data);
this.$c.msg("登录成功");
// URL
const redirectUrl = uni.getStorageSync('redirect');
if (redirectUrl) {
//
uni.removeStorageSync('redirect');
// 使
this.handleRedirect(redirectUrl);
} else {
//
setTimeout(() => {
this.getdata();
}, 1000);
}
} else {
this.$c.msg("登录失败!" + res.msg);
}
} catch (error) {
console.error('请求登录失败:', error);
}
} catch (error) {
console.error('微信登录失败:', error);
}
} catch (error) {
this.$c.msg("登录失败,申请获取微信用户数据失败");
console.log(error, '获取微信用户数据失败');
}
},
async getdata() {
try {
const res = await this.$request.post('user');
if (res.status == 1 && res.data.userinfo != null && res.data.userinfo.mobile_is == 0) {
console.log("判断用户有没有手机号", res.data.userinfo.mobile_is);
// 使
this.$customRouter.navigateTo('/pages/users/bangding', {}, 'navigateTo');
} else {
// 使
this.$customRouter.navigateTo('/pages/users/index', {}, 'navigateTo');
}
} catch (error) {
console.error('获取用户数据失败:', error);
}
}
}
}
</script>
<style lang="scss">
.all {
min-height: 100vh;
background-color: #FFFFFF;
// background: url($imgurl+'common/pageBg1.png') no-repeat 0 0 / 100% auto;
}
.header {
margin: 0 0 90rpx 50rpx;
padding: 90rpx 0 0;
border-bottom: 1px solid #E8E8E8;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
border-radius: 50%;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
color: #333333;
}
.content text {
display: block;
margin-top: 28rpx;
}
// H5
.h5-login-form {
padding: 0 50rpx;
.input-item {
height: 90rpx;
border-bottom: 1px solid #E8E8E8;
margin-bottom: 40rpx;
input {
height: 100%;
width: 100%;
font-size: 28rpx;
}
}
.code-item {
display: flex;
justify-content: space-between;
align-items: center;
.code-input {
flex: 1;
}
.send-code-btn {
width: 200rpx;
height: 70rpx;
background-color: #333333;
color: #CDEF27;
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 12rpx;
&.disabled {
background-color: #cccccc;
color: #ffffff;
}
}
}
}
.agree {
display: flex;
padding: 0 50rpx;
margin: 40rpx 0;
.icon {
width: 32rpx;
height: 32rpx;
}
.agree-r {
flex: 1;
word-wrap: break-word;
word-break: break-all;
padding-left: 20rpx;
line-height: 32rpx;
font-size: 20rpx;
color: #999999;
text {
color: #333333;
}
}
}
.btn-list {
display: flex;
justify-content: space-evenly;
padding: 50rpx 0 0;
.cancel {
width: 200rpx;
height: 80rpx;
box-sizing: border-box;
border-radius: 16rpx;
font-size: 28rpx;
color: #333333;
display: flex;
justify-content: center;
align-items: center;
background-color: #CDEF27;
// filter: grayscale(1);
}
.bottom {
background: #333333;
margin: 0;
width: 416rpx;
height: 80rpx;
text-align: center;
box-sizing: border-box;
border-radius: 16rpx;
font-size: 28rpx;
color: #CDEF27;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@ -166,7 +166,7 @@
return {
title: `快来领取${userInfo.nickname}分享的${item.num}赏币的${item.title}`,
imageUrl: item.level_img,
path: '/pages/user/index' +
path: '/pages/users/index' +
this.$c.qs({
ou_coupon_id: item.id
})
@ -189,7 +189,7 @@
var data = {
title: `快来领取${userInfo.nickname}分享的${item.num}赏币的${item.title}`,
imageUrl: item.level_img,
path: '/pages/user/index' +
path: '/pages/users/index' +
this.$c.qs({
ou_coupon_id: item.id
})
@ -349,7 +349,7 @@
}
this.$c.to({
url: '/package/mine/coupon-detail',
url: '/pages/users/coupon-detail',
query: {
id: item.id
}

View File

@ -149,7 +149,7 @@ export default {
return {
imageUrl: imageUrl,
title: "友达上线,来就送!",
path: '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
path: '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID
}
},
onLoad() {
@ -179,7 +179,7 @@ export default {
methods: {
yaoaing() {
uni.setClipboardData({
data: window.location.origin + '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID
data: window.location.origin + '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID
});
this.$c.msg("链接已复制,快去分享吧~")
},
@ -214,7 +214,7 @@ export default {
},
fenxiang() {
var image = this.$baseUrl + "/storage/topic/20240617/30a73c0d5061f700a66f653deeb60f6d.jpg";
var path = '/pages/shouye/index?pid=' + uni.getStorageSync('userinfo').ID;
var path = '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID;
this.$c.$fenxiang('友达赏,正版潮玩手办一番赏', '', path, image);
},

BIN
static/app-plus/no-data.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -35,7 +35,7 @@ export default {
computed: {
//
icon() {
return '/static/common/kong.png'
return '/static/app-plus/no-data.png'
if (this.option.icon != null) { // 使,
return this.option.icon
} else{