更新
This commit is contained in:
parent
28d9667b4e
commit
1fbd070b6d
752
App.vue
752
App.vue
@ -1,365 +1,437 @@
|
|||||||
<script>
|
<script>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import {
|
// #ifdef APP-PLUS
|
||||||
checkLogin
|
import { initEvent } from "@/utils/uniMPevent.js";
|
||||||
} from "./libs/login";
|
let jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
import {
|
// #endif
|
||||||
HTTP_REQUEST_URL
|
import {
|
||||||
} from './config/app';
|
checkLogin
|
||||||
import {
|
} from "./libs/login";
|
||||||
getconfig,
|
import {
|
||||||
history
|
HTTP_REQUEST_URL
|
||||||
} from '@/api/public.js'
|
} from './config/app';
|
||||||
import Routine from './libs/routine.js';
|
import {
|
||||||
import Cache from '@/utils/cache';
|
getconfig,
|
||||||
export default {
|
history
|
||||||
globalData: {
|
} from '@/api/public.js'
|
||||||
spid: 0,
|
import Routine from './libs/routine.js';
|
||||||
code: 0,
|
import Cache from '@/utils/cache';
|
||||||
isLogin: false,
|
export default {
|
||||||
userInfo: {},
|
globalData: {
|
||||||
MyMenus: [],
|
spid: 0,
|
||||||
balance_func_status: 0, //余额开关
|
code: 0,
|
||||||
recharge_switch: 0, // 充值开关
|
isLogin: false,
|
||||||
store_user_min_recharge: 0, //最小充值
|
userInfo: {},
|
||||||
yue_pay_status: 0, //余额支付开关
|
MyMenus: [],
|
||||||
alipay_open: 0, //支付宝支付开关
|
balance_func_status: 0, //余额开关
|
||||||
routine_logo: '', //首页logo
|
recharge_switch: 0, // 充值开关
|
||||||
share_pic: '',
|
store_user_min_recharge: 0, //最小充值
|
||||||
site_logo: '',
|
yue_pay_status: 0, //余额支付开关
|
||||||
site_name: '', //名称
|
alipay_open: 0, //支付宝支付开关
|
||||||
fid: '', //一级分类id
|
routine_logo: '', //首页logo
|
||||||
uid: '',
|
share_pic: '',
|
||||||
hide_mer_status: 0,
|
site_logo: '',
|
||||||
member_status: 0,
|
site_name: '', //名称
|
||||||
copy_command_status: 0, //是否开启自动获取剪切板内容
|
fid: '', //一级分类id
|
||||||
arrival_notice: 0, //是否开启到货通知
|
uid: '',
|
||||||
is_phone_login: 0,
|
hide_mer_status: 0,
|
||||||
auto_arrival: 0,
|
member_status: 0,
|
||||||
mer_location: 0,
|
copy_command_status: 0, //是否开启自动获取剪切板内容
|
||||||
statusBarHeight: 0,
|
arrival_notice: 0, //是否开启到货通知
|
||||||
mer_location: 0,
|
is_phone_login: 0,
|
||||||
store_street_theme: 1,
|
auto_arrival: 0,
|
||||||
sys_intention_agree: '',
|
mer_location: 0,
|
||||||
copyright_status: '',
|
statusBarHeight: 0,
|
||||||
copyright_context: '',
|
mer_location: 0,
|
||||||
copyright_image: '',
|
store_street_theme: 1,
|
||||||
open_update_info: 0,
|
sys_intention_agree: '',
|
||||||
recommend_switch: 0,
|
copyright_status: '',
|
||||||
svip_switch_status: 0,
|
copyright_context: '',
|
||||||
community_reply_status: 0,
|
copyright_image: '',
|
||||||
community_reply_auth: 0,
|
open_update_info: 0,
|
||||||
margin_ico_switch: 0,
|
recommend_switch: 0,
|
||||||
margin_ico: '',
|
svip_switch_status: 0,
|
||||||
community_app_switch: [],
|
community_reply_status: 0,
|
||||||
first_avatar_switch: "",
|
community_reply_auth: 0,
|
||||||
wechat_phone_switch: "",
|
margin_ico_switch: 0,
|
||||||
navigation: {},
|
margin_ico: '',
|
||||||
imgColor: '',
|
community_app_switch: [],
|
||||||
...uni.getStorageSync('GLOBAL_DATA') || {}
|
first_avatar_switch: "",
|
||||||
},
|
wechat_phone_switch: "",
|
||||||
onLaunch: function(option) {
|
navigation: {},
|
||||||
uni.hideTabBar();
|
imgColor: '',
|
||||||
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
...uni.getStorageSync('GLOBAL_DATA') || {}
|
||||||
this.globalData.uid = this.$store.state.app.uid
|
},
|
||||||
let that = this;
|
onLaunch: function(option) {
|
||||||
// #ifdef MP
|
uni.hideTabBar();
|
||||||
if (HTTP_REQUEST_URL == '') {
|
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||||
console.error(
|
this.globalData.uid = this.$store.state.app.uid;
|
||||||
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
|
|
||||||
);
|
// #ifdef APP-PLUS
|
||||||
return false;
|
//初始化uniMP小程序发送的事件以及其他操作
|
||||||
}
|
initEvent();
|
||||||
if (option.query.hasOwnProperty('scene')) {
|
// #endif
|
||||||
switch (option.scene) {
|
|
||||||
//扫描小程序码
|
//#ifdef APP-PLUS
|
||||||
case 1047:
|
this.checknetwork()
|
||||||
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
|
||||||
that.globalData.code = val;
|
jpushModule.setLoggerEnable(true);
|
||||||
that.globalData.uid = val
|
jpushModule.initJPushService()
|
||||||
break;
|
jpushModule.addConnectEventListener(result => {
|
||||||
//长按图片识别小程序码
|
let connectEnable = result.connectEnable
|
||||||
case 1048:
|
// console.log("jpush连接", connectEnable)
|
||||||
that.globalData.code = option.query.scene;
|
})
|
||||||
break;
|
|
||||||
//手机相册选取小程序码
|
|
||||||
case 1049:
|
// 设置别名
|
||||||
that.globalData.code = option.query.scene;
|
// jpushModule.setAlias({
|
||||||
break;
|
// 'alias': uni.getStorageSync('userId'),
|
||||||
//直接进入小程序
|
// 'sequence': 1
|
||||||
case 1001:
|
// })
|
||||||
that.globalData.spid = option.query.scene;
|
//
|
||||||
break;
|
// jpushModule.addTagAliasListener(result => {
|
||||||
}
|
// let code = result.code
|
||||||
}
|
// let sequence = result.sequence
|
||||||
// #endif
|
// let tags = result.tags
|
||||||
// 获取导航高度;
|
// let tag = result.tag
|
||||||
uni.getSystemInfo({
|
// let tagEnable = result.tagEnable
|
||||||
success: function(res) {
|
// let alias = result.alias
|
||||||
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
// console.log(alias, '别名')
|
||||||
}
|
// })
|
||||||
});
|
// 通知事件回调
|
||||||
// #ifdef MP
|
jpushModule.addNotificationListener(result => {
|
||||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
let notificationEventType = result.notificationEventType
|
||||||
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
|
let messageID = result.messageID
|
||||||
const version = uni.getSystemInfoSync().SDKVersion
|
let title = result.title
|
||||||
if (Routine.compareVersion(version, '2.21.2') >= 0) {
|
let content = result.content
|
||||||
that.$Cache.set('MP_VERSION_ISNEW', true)
|
let extras = result.extras
|
||||||
} else {
|
|
||||||
that.$Cache.set('MP_VERSION_ISNEW', false)
|
console.log("通知", result)
|
||||||
}
|
|
||||||
// #endif
|
if (result.extras.type == 'ORDER_CREATE') {
|
||||||
that.getConfigData();
|
if (this.audioTeam.length > 0) {
|
||||||
},
|
this.audioTeam.push(result.extras.type);
|
||||||
onShow() {
|
} else {
|
||||||
let that = this
|
this.audio()
|
||||||
that.$store.commit('SETUUID', uni.getStorageSync('uuid') || that.randomString());
|
this.audioTeam.push(result.extras.type);
|
||||||
// 记录H5和公众号
|
}
|
||||||
if (this.$store.state.app.token) {
|
|
||||||
// 浏览记录
|
|
||||||
// #ifdef H5
|
}
|
||||||
history({
|
// 点击事件
|
||||||
page: location.pathname + location.search,
|
if (notificationEventType == 'notificationOpened') {
|
||||||
}).then(() => {});
|
uni.navigateTo({
|
||||||
//#endif
|
url: result.extras.route
|
||||||
};
|
})
|
||||||
// #ifndef H5
|
}
|
||||||
setTimeout(() => {
|
})
|
||||||
if (that.globalData.copy_command_status == 1) {
|
|
||||||
uni.getClipboardData({
|
// jpushModule.addCustomMessageListener(result => {
|
||||||
success: function(res) {
|
// let messageID = result.messageID
|
||||||
if (/^(\/@[1-9]{1}).*\*\//.test(res.data)) {
|
// let content = result.content
|
||||||
that.$store.commit("PARSE_PWD", res.data)
|
// let extras = result.extras
|
||||||
}
|
// console.log("自定义消息", result)
|
||||||
},
|
// })
|
||||||
fail: function(res) {
|
//#endif
|
||||||
// 内容获取失败
|
|
||||||
}
|
let that = this;
|
||||||
})
|
// #ifdef MP
|
||||||
}
|
if (HTTP_REQUEST_URL == '') {
|
||||||
}, 1500)
|
console.error(
|
||||||
// #endif
|
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
|
||||||
},
|
);
|
||||||
methods: {
|
return false;
|
||||||
randomString(len) {
|
}
|
||||||
// len = len || 32;
|
if (option.query.hasOwnProperty('scene')) {
|
||||||
// var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
|
switch (option.scene) {
|
||||||
// var maxPos = $chars.length;
|
//扫描小程序码
|
||||||
// var pwd = '';
|
case 1047:
|
||||||
// for (var i = 0; i < len; i++) {
|
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
||||||
// pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
|
that.globalData.code = val;
|
||||||
// }
|
that.globalData.uid = val
|
||||||
let pwd = (Date.now()).toString()
|
break;
|
||||||
uni.setStorageSync('uuid', pwd)
|
//长按图片识别小程序码
|
||||||
return pwd;
|
case 1048:
|
||||||
},
|
that.globalData.code = option.query.scene;
|
||||||
setOpenShare: function(data) {
|
break;
|
||||||
let that = this;
|
//手机相册选取小程序码
|
||||||
let href = location.href;
|
case 1049:
|
||||||
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
|
that.globalData.code = option.query.scene;
|
||||||
.globalData.uid;
|
break;
|
||||||
if (that.$wechat.isWeixin()) {
|
//直接进入小程序
|
||||||
let configAppMessage = {
|
case 1001:
|
||||||
desc: data.share_info,
|
that.globalData.spid = option.query.scene;
|
||||||
title: data.share_title,
|
break;
|
||||||
link: href,
|
}
|
||||||
imgUrl: data.share_pic
|
}
|
||||||
};
|
// #endif
|
||||||
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
|
// 获取导航高度;
|
||||||
configAppMessage);
|
uni.getSystemInfo({
|
||||||
}
|
success: function(res) {
|
||||||
},
|
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
||||||
// 获取配置
|
}
|
||||||
getConfigData() {
|
});
|
||||||
getconfig().then(res => {
|
// #ifdef MP
|
||||||
uni.$emit('update', res.data)
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
this.$store.commit('GLOBAL_DATA', res.data);
|
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
|
||||||
this.globalData.balance_func_status = res.data.balance_func_status
|
const version = uni.getSystemInfoSync().SDKVersion
|
||||||
this.globalData.recharge_switch = res.data.recharge_switch
|
if (Routine.compareVersion(version, '2.21.2') >= 0) {
|
||||||
this.globalData.routine_logo = res.data.routine_logo
|
that.$Cache.set('MP_VERSION_ISNEW', true)
|
||||||
this.globalData.share_pic = res.data.share_pic
|
} else {
|
||||||
this.globalData.community_reply_status = res.data.community_reply_status
|
that.$Cache.set('MP_VERSION_ISNEW', false)
|
||||||
this.globalData.site_logo = res.data.site_logo
|
}
|
||||||
this.globalData.login_logo = res.data.login_logo
|
// #endif
|
||||||
this.globalData.site_name = res.data.site_name
|
that.getConfigData();
|
||||||
this.globalData.store_user_min_recharge = res.data.store_user_min_recharge
|
},
|
||||||
this.globalData.yue_pay_status = res.data.yue_pay_status
|
onShow() {
|
||||||
this.globalData.sys_intention_agree = res.data.sys_intention_agree
|
let that = this
|
||||||
this.globalData.mer_intention_open = res.data.mer_intention_open
|
that.$store.commit('SETUUID', uni.getStorageSync('uuid') || that.randomString());
|
||||||
this.globalData.alipay_open = res.data.alipay_open
|
// 记录H5和公众号
|
||||||
this.globalData.hide_mer_status = res.data.hide_mer_status
|
if (this.$store.state.app.token) {
|
||||||
this.globalData.mer_location = res.data.mer_location
|
// 浏览记录
|
||||||
this.globalData.procudt_increase_status = res.data.procudt_increase_status
|
// #ifdef H5
|
||||||
this.globalData.auto_arrival = res.data.sys_extension_type
|
history({
|
||||||
this.globalData.member_status = res.data.member_status
|
page: location.pathname + location.search,
|
||||||
this.globalData.copy_command_status = res.data.copy_command_status
|
}).then(() => {});
|
||||||
this.globalData.is_phone_login = res.data.is_phone_login
|
//#endif
|
||||||
this.globalData.mer_location = res.data.mer_location
|
};
|
||||||
this.globalData.store_street_theme = res.data.store_street_theme
|
// #ifndef H5
|
||||||
this.globalData.copyright_status = res.data.copyright_status
|
setTimeout(() => {
|
||||||
this.globalData.copyright_image = res.data.copyright_image
|
if (that.globalData.copy_command_status == 1) {
|
||||||
this.globalData.copyright_context = res.data.copyright_context
|
uni.getClipboardData({
|
||||||
this.globalData.open_update_info = res.data.open_update_info
|
success: function(res) {
|
||||||
this.globalData.recommend_switch = res.data.recommend_switch
|
if (/^(\/@[1-9]{1}).*\*\//.test(res.data)) {
|
||||||
this.globalData.svip_switch_status = res.data.svip_switch_status
|
that.$store.commit("PARSE_PWD", res.data)
|
||||||
this.globalData.navigation = res.data.navigation
|
}
|
||||||
this.globalData.community_app_switch = res.data.community_app_switch
|
},
|
||||||
this.globalData.community_reply_auth = res.data.community_reply_auth
|
fail: function(res) {
|
||||||
this.globalData.margin_ico_switch = res.data.margin_ico_switch
|
// 内容获取失败
|
||||||
this.globalData.first_avatar_switch = res.data.first_avatar_switch
|
}
|
||||||
this.globalData.wechat_phone_switch = res.data.wechat_phone_switch
|
})
|
||||||
this.$Cache.set('BIND_PHONE', res.data.wechat_phone_switch) //是否开启强制绑定手机号
|
}
|
||||||
this.globalData.margin_ico = res.data.margin_ico
|
}, 1500)
|
||||||
this.globalData.community_auth = res.data.community_auth
|
// #endif
|
||||||
this.$Cache.set('WECHAT_APPID', res.data.wechat_config_appid)
|
},
|
||||||
this.$store.commit("VIEW_COLOR", res.data.global_theme.theme)
|
methods: {
|
||||||
this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type)
|
randomString(len) {
|
||||||
try {
|
// len = len || 32;
|
||||||
uni.setStorageSync('SUBSCRIBE_MESSAGE', res.data.tempid);
|
// var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
|
||||||
} catch (e) {
|
// var maxPos = $chars.length;
|
||||||
// error
|
// var pwd = '';
|
||||||
}
|
// for (var i = 0; i < len; i++) {
|
||||||
// #ifdef H5
|
// pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
|
||||||
this.setOpenShare(res.data);
|
// }
|
||||||
// #endif
|
let pwd = (Date.now()).toString()
|
||||||
}).catch(err => {});
|
uni.setStorageSync('uuid', pwd)
|
||||||
}
|
return pwd;
|
||||||
},
|
},
|
||||||
onHide: function() {
|
setOpenShare: function(data) {
|
||||||
//console.log('App Hide')
|
let that = this;
|
||||||
},
|
let href = location.href;
|
||||||
watch: {
|
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
|
||||||
// 记录H5和公众号
|
.globalData.uid;
|
||||||
$route(n) {
|
if (that.$wechat.isWeixin()) {
|
||||||
if (this.$store.state.app.token) {
|
let configAppMessage = {
|
||||||
// 浏览记录
|
desc: data.share_info,
|
||||||
history({
|
title: data.share_title,
|
||||||
page: location.pathname + location.search,
|
link: href,
|
||||||
}).then(() => {});
|
imgUrl: data.share_pic
|
||||||
}
|
};
|
||||||
},
|
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
|
||||||
}
|
configAppMessage);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 获取配置
|
||||||
|
getConfigData() {
|
||||||
|
getconfig().then(res => {
|
||||||
|
uni.$emit('update', res.data)
|
||||||
|
this.$store.commit('GLOBAL_DATA', res.data);
|
||||||
|
this.globalData.balance_func_status = res.data.balance_func_status
|
||||||
|
this.globalData.recharge_switch = res.data.recharge_switch
|
||||||
|
this.globalData.routine_logo = res.data.routine_logo
|
||||||
|
this.globalData.share_pic = res.data.share_pic
|
||||||
|
this.globalData.community_reply_status = res.data.community_reply_status
|
||||||
|
this.globalData.site_logo = res.data.site_logo
|
||||||
|
this.globalData.login_logo = res.data.login_logo
|
||||||
|
this.globalData.site_name = res.data.site_name
|
||||||
|
this.globalData.store_user_min_recharge = res.data.store_user_min_recharge
|
||||||
|
this.globalData.yue_pay_status = res.data.yue_pay_status
|
||||||
|
this.globalData.sys_intention_agree = res.data.sys_intention_agree
|
||||||
|
this.globalData.mer_intention_open = res.data.mer_intention_open
|
||||||
|
this.globalData.alipay_open = res.data.alipay_open
|
||||||
|
this.globalData.hide_mer_status = res.data.hide_mer_status
|
||||||
|
this.globalData.mer_location = res.data.mer_location
|
||||||
|
this.globalData.procudt_increase_status = res.data.procudt_increase_status
|
||||||
|
this.globalData.auto_arrival = res.data.sys_extension_type
|
||||||
|
this.globalData.member_status = res.data.member_status
|
||||||
|
this.globalData.copy_command_status = res.data.copy_command_status
|
||||||
|
this.globalData.is_phone_login = res.data.is_phone_login
|
||||||
|
this.globalData.mer_location = res.data.mer_location
|
||||||
|
this.globalData.store_street_theme = res.data.store_street_theme
|
||||||
|
this.globalData.copyright_status = res.data.copyright_status
|
||||||
|
this.globalData.copyright_image = res.data.copyright_image
|
||||||
|
this.globalData.copyright_context = res.data.copyright_context
|
||||||
|
this.globalData.open_update_info = res.data.open_update_info
|
||||||
|
this.globalData.recommend_switch = res.data.recommend_switch
|
||||||
|
this.globalData.svip_switch_status = res.data.svip_switch_status
|
||||||
|
this.globalData.navigation = res.data.navigation
|
||||||
|
this.globalData.community_app_switch = res.data.community_app_switch
|
||||||
|
this.globalData.community_reply_auth = res.data.community_reply_auth
|
||||||
|
this.globalData.margin_ico_switch = res.data.margin_ico_switch
|
||||||
|
this.globalData.first_avatar_switch = res.data.first_avatar_switch
|
||||||
|
this.globalData.wechat_phone_switch = res.data.wechat_phone_switch
|
||||||
|
this.$Cache.set('BIND_PHONE', res.data.wechat_phone_switch) //是否开启强制绑定手机号
|
||||||
|
this.globalData.margin_ico = res.data.margin_ico
|
||||||
|
this.globalData.community_auth = res.data.community_auth
|
||||||
|
this.$Cache.set('WECHAT_APPID', res.data.wechat_config_appid)
|
||||||
|
this.$store.commit("VIEW_COLOR", res.data.global_theme.theme)
|
||||||
|
this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type)
|
||||||
|
try {
|
||||||
|
uni.setStorageSync('SUBSCRIBE_MESSAGE', res.data.tempid);
|
||||||
|
} catch (e) {
|
||||||
|
// error
|
||||||
|
}
|
||||||
|
// #ifdef H5
|
||||||
|
this.setOpenShare(res.data);
|
||||||
|
// #endif
|
||||||
|
}).catch(err => {});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onHide: function() {
|
||||||
|
//console.log('App Hide')
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 记录H5和公众号
|
||||||
|
$route(n) {
|
||||||
|
if (this.$store.state.app.token) {
|
||||||
|
// 浏览记录
|
||||||
|
history({
|
||||||
|
page: location.pathname + location.search,
|
||||||
|
}).then(() => {});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||||
@import "@/uni_modules/uview-ui/index.scss";
|
@import "@/uni_modules/uview-ui/index.scss";
|
||||||
/* #ifndef APP-PLUS-NVUE || APP-NVUE */
|
/* #ifndef APP-PLUS-NVUE || APP-NVUE */
|
||||||
@import "@/plugin/animate/animate.min.css";
|
@import "@/plugin/animate/animate.min.css";
|
||||||
@import 'static/css/base.css';
|
@import 'static/css/base.css';
|
||||||
@import 'static/iconfont/iconfont.css';
|
@import 'static/iconfont/iconfont.css';
|
||||||
@import 'static/css/style.scss';
|
@import 'static/css/style.scss';
|
||||||
|
|
||||||
.bg-color-red {
|
.bg-color-red {
|
||||||
background-color: #e93323 !important;
|
background-color: #e93323 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.syspadding {
|
.syspadding {
|
||||||
padding-top: var(--status-bar-height);
|
padding-top: var(--status-bar-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-scroll-view::-webkit-scrollbar {
|
.uni-scroll-view::-webkit-scrollbar {
|
||||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||||
display: none
|
display: none
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-moz-scrollbar {
|
::-moz-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-txt {
|
.empty-txt {
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .conter img {
|
.product-con .conter img {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.open-location {
|
.open-location {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-tabbar {
|
uni-tabbar {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#endif*/
|
/*#endif*/
|
||||||
// 圆形指示点
|
// 圆形指示点
|
||||||
.circular {
|
.circular {
|
||||||
|
|
||||||
/deep/.uni-swiper-dot,
|
/deep/.uni-swiper-dot,
|
||||||
/deep/.wx-swiper-dot {
|
/deep/.wx-swiper-dot {
|
||||||
width: 10rpx;
|
width: 10rpx;
|
||||||
height: 10rpx;
|
height: 10rpx;
|
||||||
background: rgba(0, 0, 0, .4);
|
background: rgba(0, 0, 0, .4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.uni-swiper-dot-active,
|
/deep/.uni-swiper-dot-active,
|
||||||
/deep/.wx-swiper-dot-active {
|
/deep/.wx-swiper-dot-active {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 方形指示点
|
// 方形指示点
|
||||||
.square {
|
.square {
|
||||||
|
|
||||||
/deep/.uni-swiper-dot,
|
/deep/.uni-swiper-dot,
|
||||||
/deep/.wx-swiper-dot {
|
/deep/.wx-swiper-dot {
|
||||||
width: 20rpx;
|
width: 20rpx;
|
||||||
height: 5rpx;
|
height: 5rpx;
|
||||||
border-radius: 3rpx;
|
border-radius: 3rpx;
|
||||||
background: rgba(0, 0, 0, .4);
|
background: rgba(0, 0, 0, .4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.uni-swiper-dot-active,
|
/deep/.uni-swiper-dot-active,
|
||||||
/deep/.wx-swiper-dot-active {
|
/deep/.wx-swiper-dot-active {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.nodoc {
|
.nodoc {
|
||||||
|
|
||||||
/deep/.uni-swiper-dot,
|
/deep/.uni-swiper-dot,
|
||||||
/deep/.wx-swiper-dot {
|
/deep/.wx-swiper-dot {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.swiper.dot0 .uni-swiper-dots,
|
/deep/.swiper.dot0 .uni-swiper-dots,
|
||||||
/deep/.swiper.dot0 .wx-swiper-dots {
|
/deep/.swiper.dot0 .wx-swiper-dots {
|
||||||
left: 130rpx;
|
left: 130rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.swiper.dot1 .uni-swiper-dots,
|
/deep/.swiper.dot1 .uni-swiper-dots,
|
||||||
/deep/.swiper.dot1 .wx-swiper-dots {
|
/deep/.swiper.dot1 .wx-swiper-dots {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.swiper.dot2 .uni-swiper-dots,
|
/deep/.swiper.dot2 .uni-swiper-dots,
|
||||||
/deep/.swiper.dot2 .wx-swiper-dots {
|
/deep/.swiper.dot2 .wx-swiper-dots {
|
||||||
right: 130rpx;
|
right: 130rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -314,9 +314,9 @@ export function qrcode(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 生成二维码
|
// 邀请记录
|
||||||
export function merchantRecord(data) {
|
export function merchantRecord(data) {
|
||||||
return request.get(`merchantRecord`, data);
|
return request.get(`user/merchantRecord`, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
95
components/Loading.vue
Normal file
95
components/Loading.vue
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<template>
|
||||||
|
<div class="popup" v-if="isShow">
|
||||||
|
<div class="box">
|
||||||
|
<div class="loading"></div>
|
||||||
|
<p>{{str}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Loading',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
str: '初始化中',
|
||||||
|
timer: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
uni.$on('showLoading', (type, str) => {
|
||||||
|
if (type == true) {
|
||||||
|
this.isShow = true;
|
||||||
|
this.str = str;
|
||||||
|
} else {
|
||||||
|
this.isShow = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickTow(){
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.popup-enter-active,
|
||||||
|
.popup-leave-active {
|
||||||
|
transition: opacity 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-enter,
|
||||||
|
.popup-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 99999999;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
|
.box{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
color: #eee;
|
||||||
|
height: 300rpx;
|
||||||
|
width: 300rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border: 6rpx solid #eee;
|
||||||
|
border-top-color: transparent;
|
||||||
|
border-radius: 100%;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
|
animation: circle infinite 0.75s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes circle {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -38,7 +38,7 @@
|
|||||||
<!-- tab导航 -->
|
<!-- tab导航 -->
|
||||||
<view class="tabs" v-if="showTab">
|
<view class="tabs" v-if="showTab">
|
||||||
<block v-for="(item,indx) in tabsArr" :key="indx">
|
<block v-for="(item,indx) in tabsArr" :key="indx">
|
||||||
<view v-if="indx>0" style="width: 2rpx;height: 36rpx;background-color: #ECECEC;"></view>
|
<view v-if="indx>0" style="width: 3rpx;height: 36rpx;background-color: #ccc;"></view>
|
||||||
<view :class="{'tabs-item-active':item.val==currTabs}" class="tabs-item" @click="changeTab(item.val)">
|
<view :class="{'tabs-item-active':item.val==currTabs}" class="tabs-item" @click="changeTab(item.val)">
|
||||||
<view class="tabs-item-main">{{item.name}}</view>
|
<view class="tabs-item-main">{{item.name}}</view>
|
||||||
<view class="tabs-item-sub">{{item.desc}}</view>
|
<view class="tabs-item-sub">{{item.desc}}</view>
|
||||||
|
@ -13,9 +13,14 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
|
|||||||
|
|
||||||
let openPlantGrass = '-openPlantGrass-'
|
let openPlantGrass = '-openPlantGrass-'
|
||||||
|
|
||||||
|
let httpSix, httpApi;
|
||||||
|
|
||||||
// 网络接口修改此字符 小程序域名要求https
|
// 网络接口修改此字符 小程序域名要求https
|
||||||
// let httpApi = 'http://192.168.31.106:8324' //测试
|
// httpApi = 'http://192.168.31.106:8324' //测试
|
||||||
let httpApi = 'https://test.shop.lihaink.cn' //生产
|
httpApi = 'https://test.shop.lihaink.cn' //生产
|
||||||
|
|
||||||
|
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
|
||||||
|
// httpSix = 'https://new-worker.lihaink.cn'
|
||||||
|
|
||||||
// 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
|
// 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
|
||||||
// let wsApi = 'ws://192.168.3.20:8324'
|
// let wsApi = 'ws://192.168.3.20:8324'
|
||||||
@ -35,6 +40,7 @@ module.exports = {
|
|||||||
// 聊天长连接地址
|
// 聊天长连接地址
|
||||||
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
|
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
|
||||||
// #endif
|
// #endif
|
||||||
|
HTTP_REQUEST_URL_SIX: httpSix,
|
||||||
openPlantGrass: openPlantGrass,
|
openPlantGrass: openPlantGrass,
|
||||||
HEADER: {
|
HEADER: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
|
2
main.js
2
main.js
@ -18,9 +18,11 @@ import {
|
|||||||
import skeleton from './components/skeleton/index.vue'
|
import skeleton from './components/skeleton/index.vue'
|
||||||
import BaseMoney from './components/BaseMoney.vue';
|
import BaseMoney from './components/BaseMoney.vue';
|
||||||
import loadmore from './components/loadmore';
|
import loadmore from './components/loadmore';
|
||||||
|
import Loading from './components/Loading.vue';
|
||||||
Vue.component('skeleton', skeleton)
|
Vue.component('skeleton', skeleton)
|
||||||
Vue.component('BaseMoney', BaseMoney)
|
Vue.component('BaseMoney', BaseMoney)
|
||||||
Vue.component('loadmore', loadmore)
|
Vue.component('loadmore', loadmore)
|
||||||
|
Vue.component('Loading', Loading)
|
||||||
Vue.prototype.$util = util;
|
Vue.prototype.$util = util;
|
||||||
Vue.prototype.$Cache = Cache;
|
Vue.prototype.$Cache = Cache;
|
||||||
Vue.prototype.$eventHub = new Vue();
|
Vue.prototype.$eventHub = new Vue();
|
||||||
|
@ -303,8 +303,9 @@
|
|||||||
"path" : "specialty/specialty",
|
"path" : "specialty/specialty",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "名优特产",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
padding: 2px 2px 2px 21.05rpx;
|
padding: 2px 2px 2px 21.05rpx;
|
||||||
border-radius: 80rpx;
|
border-radius: 80rpx;
|
||||||
pic: #EDEFF2;
|
background: #EDEFF2;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
@ -215,14 +215,13 @@
|
|||||||
<view class="wholeSale-nav">
|
<view class="wholeSale-nav">
|
||||||
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
|
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none"
|
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||||
class="search_content flex_a_c_j_sb">
|
<view class="flex_a_c search_content_wrap">
|
||||||
<view class="flex_a_c search_content_wrap">
|
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
<input type="text" placeholder="搜索您需要批发进货的产品名称" placeholder-style="font-size: 30rpx;color:#999;" disabled
|
||||||
<input type="text" placeholder="搜索您需要批发进货的产品名称" placeholder-style="font-size: 30rpx;color:#999;"
|
style="pointer-events: none;">
|
||||||
disabled style="pointer-events: none;">
|
</view>
|
||||||
</view>
|
<!-- <button class="search_btn">搜索</button> -->
|
||||||
<!-- <button class="search_btn">搜索</button> -->
|
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -223,6 +223,7 @@
|
|||||||
</u-transition>
|
</u-transition>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<Loading></Loading>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -320,52 +321,11 @@
|
|||||||
uni.$emit('showLoading', false);
|
uni.$emit('showLoading', false);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scrolling() {
|
|
||||||
// 滚动条距文档顶部的距离
|
|
||||||
let scrollTop =
|
|
||||||
window.pageYOffset ||
|
|
||||||
document.documentElement.scrollTop ||
|
|
||||||
document.body.scrollTop;
|
|
||||||
// 滚动条滚动的距离
|
|
||||||
let scrollStep = scrollTop - this.oldScrollTop;
|
|
||||||
// console.log("header 滚动距离 ", scrollTop);
|
|
||||||
// 更新——滚动前,滚动条距文档顶部的距离
|
|
||||||
this.oldScrollTop = scrollTop;
|
|
||||||
|
|
||||||
//变量windowHeight是可视区的高度
|
|
||||||
let windowHeight =
|
|
||||||
document.documentElement.clientHeight || document.body.clientHeight;
|
|
||||||
//变量scrollHeight是滚动条的总高度
|
|
||||||
let scrollHeight =
|
|
||||||
document.documentElement.scrollHeight || document.body.scrollHeight;
|
|
||||||
|
|
||||||
//滚动条到底部的条件
|
|
||||||
if (scrollTop + windowHeight == scrollHeight) {
|
|
||||||
//你想做的事情
|
|
||||||
// console.log("header 你已经到底部了");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (scrollTop <= 20) {
|
|
||||||
this.backColor = 'rgba(252, 252, 252, 0)'
|
|
||||||
this.isFshow = false
|
|
||||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
|
||||||
this.backColor = 'rgba(252, 252, 252, .5)'
|
|
||||||
this.isFshow = true
|
|
||||||
} else if (scrollTop > 100) {
|
|
||||||
this.backColor = 'rgba(252, 252, 252, 1)'
|
|
||||||
this.isFshow = true
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
initAllAppLet() {
|
initAllAppLet() {
|
||||||
applet().then(res => {
|
applet().then(res => {
|
||||||
this.AllMenuList = res.data;
|
this.AllMenuList = res.data;
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
// this.showControllerAllLet();
|
this.showControllerAllLet();
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
@ -376,16 +336,8 @@
|
|||||||
if (typeof this.$store.state.app.userInfo == 'string') {
|
if (typeof this.$store.state.app.userInfo == 'string') {
|
||||||
user = JSON.parse(this.$store.state.app.userInfo)
|
user = JSON.parse(this.$store.state.app.userInfo)
|
||||||
} else user = JSON.parse(JSON.stringify(this.$store.state.app.userInfo))
|
} else user = JSON.parse(JSON.stringify(this.$store.state.app.userInfo))
|
||||||
if (user?.show_controller_applet) {
|
if (!user?.show_controller_applet) {
|
||||||
this.AllMenuList.push({
|
this.AllMenuList = this.AllMenuList.filter(item=>item.app_id!="__UNI__83ABA97"); //隐藏大屏控制
|
||||||
name: '大屏控制',
|
|
||||||
icon: '/static/applet/dp.png',
|
|
||||||
data: {
|
|
||||||
id: '__UNI__83ABA97',
|
|
||||||
url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231016/20231016112144fac6d9128.wgt',
|
|
||||||
},
|
|
||||||
type: 4,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 初始化菜单
|
// 初始化菜单
|
||||||
@ -403,7 +355,6 @@
|
|||||||
this.nowMenuList = now;
|
this.nowMenuList = now;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.nowMenuList = [];
|
this.nowMenuList = [];
|
||||||
console.log(e);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickMenu(data) {
|
clickMenu(data) {
|
||||||
|
@ -351,7 +351,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="sharePacket.max&&sharePacket.max>0">
|
<block v-if="sharePacket.max&&sharePacket.max>0 && false">
|
||||||
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"
|
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"
|
||||||
:showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
|
:showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
|
||||||
</block>
|
</block>
|
||||||
|
@ -24,23 +24,35 @@
|
|||||||
|
|
||||||
<view class="table" v-if="list.length > 0">
|
<view class="table" v-if="list.length > 0">
|
||||||
<view class="table-title">
|
<view class="table-title">
|
||||||
|
<view class="table-title-cell" style="width: 100rpx;">序号</view>
|
||||||
<view class="table-title-cell">用户名称</view>
|
<view class="table-title-cell">用户名称</view>
|
||||||
<view class="table-title-cell">用户ID</view>
|
<view class="table-title-cell">用户ID</view>
|
||||||
<view class="table-title-cell">采购金额</view>
|
<view class="table-title-cell">状态</view>
|
||||||
<view class="table-title-cell">销售金额</view>
|
<view class="table-title-cell" style="width:32%;">采购金额</view>
|
||||||
|
<view class="table-title-cell" style="width:32%;">销售金额</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-for="(item,index) in list" :key="index">
|
|
||||||
<view class="table-con">
|
<scroll-view scroll-y id="scrollView" @scrolltolower="scrolltolower">
|
||||||
<view class="table-con-cell">{{item.real_name}}</view>
|
<view class="scrollView-wrap">
|
||||||
<view class="table-con-cell">{{item.uid}}</view>
|
<block v-for="(item,index) in list" :key="index">
|
||||||
<view class="table-con-cell red">¥{{item.buy_amount}}</view>
|
<view class="table-con">
|
||||||
<view class="table-con-cell green">¥{{item.sale_amount}}</view>
|
<view class="table-con-cell" style="width: 100rpx;">{{index+1}}</view>
|
||||||
|
<view class="table-con-cell">{{item.real_name || '-'}}</view>
|
||||||
|
<view class="table-con-cell">{{item.uid}}</view>
|
||||||
|
<view class="table-con-cell">{{item.status == 0?'未入驻':'已入驻'}}</view>
|
||||||
|
<view class="table-con-cell red" style="width:32%;">¥{{item.buy_amount}}</view>
|
||||||
|
<view class="table-con-cell green" style="width:32%;">¥{{item.sale_amount}}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class='loadings' @click="getList">
|
||||||
|
<text class="iconfont icon-jiazai" v-if="!loadend"></text>{{loadTitle}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="list.length == 0">
|
<view v-if="list.length == 0">
|
||||||
<emptyPage title="暂无邀请好友记录哦~" mt="60rpx" />
|
<emptyPage title="暂无邀请好友记录哦~" mt="60rpx"></emptyPage>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -51,6 +63,9 @@
|
|||||||
qrcode,
|
qrcode,
|
||||||
merchantRecord
|
merchantRecord
|
||||||
} from "@/api/activity.js";
|
} from "@/api/activity.js";
|
||||||
|
import {
|
||||||
|
Toast
|
||||||
|
} from '../../../libs/uniApi';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -73,41 +88,46 @@
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.getQrcode();
|
this.getQrcode();
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getUserInfo()
|
this.getUserInfo();
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom: function() {
|
|
||||||
this.getList();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
scrolltolower(e) {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
// 获取二维码
|
// 获取二维码
|
||||||
getQrcode() {
|
getQrcode() {
|
||||||
qrcode().then(res => {
|
qrcode().then(res => {
|
||||||
this.qrcodeUrl = res.data.url;
|
this.qrcodeUrl = res.data.url;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showModal({
|
||||||
|
content: '暂未开通邀请码,需开通邀请码请联系管理员',
|
||||||
|
showCancel: false,
|
||||||
|
success: (res) => {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取好友列表
|
// 获取好友列表
|
||||||
getList() {
|
getList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.loading) return;
|
if (that.loading) return;
|
||||||
if (that.loadend) return;
|
if (that.loadend) return;
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
that.loadTitle = '';
|
|
||||||
merchantRecord({
|
merchantRecord({
|
||||||
page: that.page,
|
page: that.page,
|
||||||
limit: that.limit
|
limit: that.limit
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let list = res.data.list,
|
let list = res.data.list,
|
||||||
loadend = list.length < that.limit;
|
loadend = list.length < that.limit;
|
||||||
that.list = that.$util.SplitArray(list, that.list);
|
that.list = that.list.concat(list);
|
||||||
that.$set(that, 'list', that.list);
|
|
||||||
that.page = that.page + 1;
|
that.page = that.page + 1;
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
that.loadend = loadend;
|
that.loadend = loadend;
|
||||||
that.loadTitle = loadend ? '哼~😕我也是有底线的~' : "加载更多";
|
that.loadTitle = loadend ? '我也是有底线的~' : "加载更多";
|
||||||
}, function(res) {
|
}, function(res) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
that.loadTitle = '加载更多';
|
that.loadTitle = '加载更多';
|
||||||
@ -169,7 +189,7 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
page {
|
page {
|
||||||
background-color: #F5F5F5;
|
background-color: #FFF3EF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invite {
|
.invite {
|
||||||
@ -231,7 +251,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.con {
|
.con {
|
||||||
height: calc(100vh - 544rpx);
|
|
||||||
background-color: #FFF3EF;
|
background-color: #FFF3EF;
|
||||||
padding: 192rpx 30rpx 0;
|
padding: 192rpx 30rpx 0;
|
||||||
|
|
||||||
@ -242,6 +261,36 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table {
|
.table {
|
||||||
|
#scrollView {
|
||||||
|
height: calc(100vh - 544rpx - 350rpx);
|
||||||
|
overflow: auto;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotateAnimation {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.loadings {
|
||||||
|
display: block;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
color: #bdbdbd;
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
margin-right: 4rpx;
|
||||||
|
display: inline-block;
|
||||||
|
animation: rotateAnimation 2s linear infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-title {
|
.table-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
@ -276,6 +325,7 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user