Compare commits

..

2 Commits

Author SHA1 Message Date
63d4bb1627 修改登录滑动验证 2023-06-14 16:08:18 +08:00
cfb4330609 修改登录滑动验证 2023-06-14 15:17:25 +08:00
604 changed files with 25707 additions and 100816 deletions

1
.gitignore vendored
View File

@ -2,7 +2,6 @@
node_modules
/dist
.hbuilderx
unpackage
# local env files
.env.local

823
App.vue
View File

@ -1,545 +1,316 @@
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
// #ifdef APP-PLUS
let jpushModule = uni.requireNativePlugin("JG-JPush");
import { initEvent } from "@/utils/uniMPevent.js";
// #endif
import {
checkLogin
} from "./libs/login";
import {
HTTP_REQUEST_URL
} from './config/app';
import {
getconfig,
history
} from '@/api/public.js'
import Routine from './libs/routine.js';
export default {
data() {
return {
audioTeam: []
}
},
globalData: {
spid: 0,
code: 0,
isLogin: false,
userInfo: {},
MyMenus: [],
balance_func_status: 0, //
recharge_switch: 0, //
store_user_min_recharge: 0, //
yue_pay_status: 0, //
alipay_open: 0, //
routine_logo: '', //logo
share_pic: '',
site_logo: '',
site_name: '', //
fid: '', //id
uid: '',
hide_mer_status: 0,
member_status: 0,
copy_command_status: 0, //
arrival_notice: 0, //
is_phone_login: 0,
auto_arrival: 0,
mer_location: 0,
statusBarHeight: 0,
mer_location: 0,
store_street_theme: 1,
sys_intention_agree: '',
copyright_status: '',
copyright_context: '',
copyright_image: '',
open_update_info: 0,
recommend_switch: 0,
svip_switch_status: 0,
community_reply_status: 0,
community_reply_auth: 0,
margin_ico_switch: 0,
margin_ico: '',
community_app_switch: [],
navigation: {},
imgColor: '',
...uni.getStorageSync('GLOBAL_DATA') || {}
},
onLaunch: function(option) {
// #ifdef H5
uni.setTabBarItem({
index: 1,
visible: false
})
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
checkLogin
} from "./libs/login";
import {
HTTP_REQUEST_URL
} from './config/app';
import {
getconfig,
history
} from '@/api/public.js'
import Routine from './libs/routine.js';
export default {
globalData: {
spid: 0,
code: 0,
isLogin: false,
userInfo: {},
MyMenus: [],
balance_func_status: 0, //
recharge_switch: 0, //
store_user_min_recharge: 0, //
yue_pay_status: 0, //
alipay_open: 0, //
routine_logo: '', //logo
share_pic: '',
site_logo: '',
site_name: '', //
fid: '', //id
uid: '',
hide_mer_status: 0,
member_status: 0,
copy_command_status: 0, //
arrival_notice: 0, //
is_phone_login: 0,
auto_arrival: 0,
mer_location: 0,
statusBarHeight: 0,
mer_location: 0,
store_street_theme: 1,
sys_intention_agree: '',
copyright_status: '',
copyright_context: '',
copyright_image: '',
open_update_info: 0,
recommend_switch: 0,
svip_switch_status: 0,
community_reply_status: 0,
community_reply_auth: 0,
margin_ico_switch: 0,
margin_ico: '',
community_app_switch: [],
navigation: {},
imgColor: '',
...uni.getStorageSync('GLOBAL_DATA') || {}
},
onLaunch: function(option) {
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid
let that = this;
// #ifdef MP
if (HTTP_REQUEST_URL == '') {
console.error(
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
);
return false;
}
if (option.query.hasOwnProperty('scene')) {
switch (option.scene) {
//
case 1047:
// console.log(option, 'val')
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
that.globalData.code = val;
that.globalData.uid = val
break;
//
case 1048:
that.globalData.code = option.query.scene;
break;
//
case 1049:
that.globalData.code = option.query.scene;
break;
//
case 1001:
that.globalData.spid = option.query.scene;
break;
}
}
// #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid;
// let appkey = uni.getStorage({
// key: 'launchFlag'
// })
// if (appkey) {
// setTimeout(() => {
// this.$store.dispatch('INIT_CONFIG');
// }, 6000)
// }
this.$store.dispatch('INIT_CONFIG');
// #ifdef APP-PLUS
//uniMP
initEvent();
// #endif
// uni.getLocation({
// type: 'gcj02',
// geocode: true,
// isHighAccuracy: true,
// // altitude: true,
// // accuracy: 'best',
// success: (res)=> {
// console.log(res);
// },
// fail(e) {
// console.log(e);
// }
// });
let that = this;
// #ifdef MP
if (HTTP_REQUEST_URL == '') {
console.error(
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
);
return false;
}
if (option.query.hasOwnProperty('scene')) {
switch (option.scene) {
//
case 1047:
// console.log(option, 'val')
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
that.globalData.code = val;
that.globalData.uid = val
break;
//
case 1048:
that.globalData.code = option.query.scene;
break;
//
case 1049:
that.globalData.code = option.query.scene;
break;
//
case 1001:
that.globalData.spid = option.query.scene;
break;
}
}
// #endif
//
uni.getSystemInfo({
success: function(res) {
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
}
});
// #ifdef MP
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
const version = uni.getSystemInfoSync().SDKVersion
if (Routine.compareVersion(version, '2.21.2') >= 0) {
that.$Cache.set('MP_VERSION_ISNEW', true)
} else {
that.$Cache.set('MP_VERSION_ISNEW', false)
}
// #endif
that.getConfigData()
//#ifdef APP-PLUS
this.checknetwork()
jpushModule.setLoggerEnable(true);
jpushModule.initJPushService()
jpushModule.addConnectEventListener(result => {
let connectEnable = result.connectEnable
// console.log("jpush", connectEnable)
})
//
// jpushModule.setAlias({
// 'alias': uni.getStorageSync('userId'),
// 'sequence': 1
// })
//
// jpushModule.addTagAliasListener(result => {
// let code = result.code
// let sequence = result.sequence
// let tags = result.tags
// let tag = result.tag
// let tagEnable = result.tagEnable
// let alias = result.alias
// console.log(alias, '')
// })
//
jpushModule.addNotificationListener(result => {
let notificationEventType = result.notificationEventType
let messageID = result.messageID
let title = result.title
let content = result.content
let extras = result.extras
console.log("通知", result)
if (result.extras.type == 'ORDER_CREATE') {
if (this.audioTeam.length > 0) {
this.audioTeam.push(result.extras.type);
} else {
this.audio()
this.audioTeam.push(result.extras.type);
}
}
//
if (notificationEventType == 'notificationOpened') {
uni.navigateTo({
url: result.extras.route
})
}
})
// jpushModule.addCustomMessageListener(result => {
// let messageID = result.messageID
// let content = result.content
// let extras = result.extras
// console.log("", result)
// })
//#endif
},
onShow() {
let that = this
// H5
if (this.$store.state.app.token) {
//
// #ifdef H5
history({
page: location.pathname + location.search,
}).then(() => {});
//#endif
};
// #ifndef H5
setTimeout(() => {
if (that.globalData.copy_command_status == 1) {
uni.getClipboardData({
success: function(res) {
if (/^(\/@[1-9]{1}).*\*\//.test(res.data)) {
that.$store.commit("PARSE_PWD", res.data)
}
},
fail: function(res) {
//
}
})
}
}, 1500)
// #endif
},
mounted() {
},
methods: {
//
checknetwork() {
uni.onNetworkStatusChange(function(res) {
if (res.isConnected) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
uni.showModal({
title: '系统提示',
content: '当前设备无网络或网络较差',
cancelText: '取消',
confirmText: '确定',
success: (res) => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
// #ifdef H5
uni.navigateTo({
url: '/pages/users/login/login_copy'
})
// #endif
// #ifdef APP-PLUS
plus.runtime.quit()
// #endif
}
}
})
}
})
},
/**
* 语音播报
*
*
*/
async audio() {
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = `/static/audio/order.mp3`;
innerAudioContext.onPlay(() => {
console.log('开始播放')
});
innerAudioContext.onEnded(() => {
console.log('语音播报结束')
innerAudioContext.destroy() //
if (this.audioTeam.length > 1) {
this.audioTeam.splice(0, 1);
console.log('队列中');
this.audio()
} else {
console.log('队列为零');
this.audioTeam = []
}
});
innerAudioContext.onError(() => {
console.log('语音播报失败')
innerAudioContext.destroy() //
});
},
//
setOpenShare: function(data) {
// #ifdef H5
let that = this;
let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
.globalData
.uid;
if (that.$wechat.isWeixin()) {
let configAppMessage = {
desc: data.share_info,
title: data.share_title,
link: href,
imgUrl: data.share_pic
};
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
configAppMessage);
}
// #endif
},
//
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.arrival_notice = 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.margin_ico = res.data.margin_ico
// console.log(res.data.global_theme.theme + "")
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) {
// #ifdef H5
if (this.$store.state.app.token) {
//
history({
page: location.pathname + location.search,
}).then(() => {});
}
// #endif
},
}
}
//
uni.getSystemInfo({
success: function(res) {
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
}
});
// #ifdef MP
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
const version = uni.getSystemInfoSync().SDKVersion
if (Routine.compareVersion(version, '2.21.2') >= 0) {
that.$Cache.set('MP_VERSION_ISNEW', true)
} else {
that.$Cache.set('MP_VERSION_ISNEW', false)
}
// #endif
that.getConfigData()
},
onShow() {
let that = this
// H5
if (this.$store.state.app.token) {
//
// #ifdef H5
history({
page: location.pathname + location.search,
}).then(() => {});
//#endif
};
// #ifndef H5
setTimeout(() => {
if (that.globalData.copy_command_status == 1) {
uni.getClipboardData({
success: function(res) {
if (/^(\/@[1-9]{1}).*\*\//.test(res.data)) {
that.$store.commit("PARSE_PWD", res.data)
}
},
fail: function(res) {
//
}
})
}
}, 1500)
// #endif
},
methods: {
//
setOpenShare: function(data) {
let that = this;
let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this.globalData
.uid;
if (that.$wechat.isWeixin()) {
let configAppMessage = {
desc: data.share_info,
title: data.share_title,
link: href,
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.arrival_notice = 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.margin_ico = res.data.margin_ico
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>
<style lang="scss">
/* #ifndef APP-PLUS-NVUE || APP-NVUE */
@import "@/plugin/animate/animate.min.css";
@import 'static/css/base.css';
@import 'static/iconfont/iconfont.css';
@import 'static/iconfont/iconlihai.css';
@import 'static/iconfont/icontan.css';
@import 'static/iconfont/demo.css';
@import 'static/css/style.scss';
/* #ifndef APP-PLUS-NVUE || APP-NVUE */
@import "@/plugin/animate/animate.min.css";
@import 'static/css/base.css';
@import 'static/iconfont/iconfont.css';
@import 'static/iconfont/iconlihai.css';
@import 'static/css/style.scss';
view {
box-sizing: border-box;
}
view {
box-sizing: border-box;
}
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
&_icon {
background-image: url('static/tabbar_icon/d.png');
background-repeat: no-repeat;
background-size: cover;
font-size: 80rpx;
width: 100rpx;
height: 100rpx;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: -40rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
}
}
&_icon {
background-image: url('static/tabbar_icon/d.png');
background-repeat: no-repeat;
background-size: cover;
font-size: 80rpx;
width: 100rpx;
height: 100rpx;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: -50rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
}
.bg-color-red {
background-color: #e93323 !important;
}
.custom_style-txt {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5rpx;
.syspadding {
padding-top: var(--status-bar-height);
}
}
}
.flex {
display: flex;
}
.bg-color-red {
background-color: #e93323 !important;
}
.uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none
}
.syspadding {
padding-top: var(--status-bar-height);
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.flex {
display: flex;
}
::-moz-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none
}
.empty-txt {
line-height: 100rpx;
font-size: 22rpx;
color: #999;
text-align: center;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.product-con .conter img {
display: block;
}
::-moz-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.open-location {
height: 100vh;
}
.empty-txt {
line-height: 100rpx;
font-size: 22rpx;
color: #999;
text-align: center;
}
uni-tabbar {
bottom: 0;
}
.product-con .conter img {
display: block;
}
.open-location {
height: 100vh;
}
uni-tabbar {
bottom: 0;
}
/*#endif*/
/*#endif*/
</style>

View File

@ -2,7 +2,7 @@
"version" : "1",
"prompt" : "template",
"title" : "服务协议与隐私政策",
"message" : "\t请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志、OAID等个 人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。<br/>\r\r\t你可以阅读 <a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。",
"message" : "\t请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志、OAID等个 人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。<br/>\r\r\t你可以阅读 < a href = \"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://shop.lihaink.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {

View File

@ -261,53 +261,4 @@ export function spuTopList(data) {
return request.get(`product/spu/get_hot_ranking`, data, {
noAuth: true
});
}
// 活动列表
export function consumption(data) {
return request.get(`storeActivity/consumption`, data, {
noAuth: true
});
}
// 参加活动
export function chooseConsumption(data) {
return request.post(`storeActivity/choose`, data);
}
// 拉新红包活动完成状态
export function storeActivityStatus(data) {
return request.get(`storeActivity/status`, data);
}
// 领取红包
export function storeActivityReceive(data) {
return request.post(`storeActivity/receive`, data);
}
// 拉新红包活动完成状态
export function storeActivityRecord(data) {
return request.get(`storeActivity/record`, data);
}
// 红包余额统计
export function storeActivityTotal(data) {
return request.get(`storeActivity/total`, data);
}
// 生成二维码
export function storeActivityQrcode(data) {
return request.get(`qrcode`, data);
}
// 活动商品专区
export function storeActivityProduct(data) {
return request.get(`storeActivity/product`, data, {
noAuth: true
});
}
// 活动区域列表
export function storeActivityDistrict(data) {
return request.get(`storeActivity/district`, data);
}
}

View File

@ -13,107 +13,68 @@ import request from "@/utils/request.js";
* 统计数据
*/
export function getStatisticsInfo() {
return request.get("admin/order/statistics", {}, {
login: true
});
return request.get("admin/order/statistics", {}, { login: true });
}
/**
* 订单月统计
*/
export function getStatisticsMonth(where) {
return request.get("admin/order/data", where, {
login: true
});
return request.get("admin/order/data", where, { login: true });
}
/**
* 订单月统计
*/
export function getAdminOrderList(where) {
return request.get("admin/order/list", where, {
login: true
});
return request.get("admin/order/list", where, { login: true });
}
/**
* 订单改价
*/
export function setAdminOrderPrice(merId, id, data) {
return request.post("admin/" + merId + "/price/" + id, data, {
login: true
});
}
/**
* 同意先货后款
*/
export function postconfirm(merId, data) {
return request.post("admin/" + merId + "/confirm", data, {
login: true
});
}
/**
* 先货后款订单结算
*/
export function postsettle(merId, data) {
return request.post("admin/" + merId + "/settle", data, {
login: true
});
return request.post("admin/" + merId + "/price/" + id, data, { login: true });
}
/**
* 订单备注
*/
export function setAdminOrderRemark(merId, id, data) {
return request.post("admin/" + merId + "/mark/" + id, data, {
login: true
});
return request.post("admin/" + merId + "/mark/" + id, data, { login: true });
}
/**
* 订单详情
*/
export function getAdminOrderDetail(merId, orderId) {
return request.get("admin/" + merId + "/order/" + orderId, {}, {
login: true
});
return request.get("admin/" + merId + "/order/" + orderId, {}, { login: true });
}
/**
* 订单发货信息获取
*/
export function getAdminOrderDelivery(orderId) {
return request.get("admin/order/delivery/gain/" + orderId, {}, {
login: true
});
return request.get("admin/order/delivery/gain/" + orderId, {}, { login: true });
}
/**
* 订单发货保存
*/
export function setAdminOrderDelivery(merId, id, data) {
return request.post("admin/" + merId + "/delivery/" + id, data, {
login: true
});
return request.post("admin/" + merId + "/delivery/" + id, data, { login: true });
}
/**
* 订单统计图
*/
export function getStatisticsTime(data) {
return request.get("admin/order/time", data, {
login: true
});
return request.get("admin/order/time", data, { login: true });
}
/**
* 线下付款订单确认付款
*/
export function setOfflinePay(merId, data) {
return request.post("admin/" + merId + "/order/offline", data, {
login: true
});
return request.post("admin/" + merId + "/order/offline", data, { login: true });
}
/**
* 订单确认退款
*/
export function setOrderRefund(merId, data) {
return request.post("admin/" + merId + "/order/refund", data, {
login: true
});
return request.post("admin/" + merId + "/order/refund", data, { login: true });
}
/**
@ -121,9 +82,7 @@ export function setOrderRefund(merId, data) {
* @returns {*}
*/
export function getLogistics() {
return request.get("logistics", {}, {
login: false
});
return request.get("logistics", {}, { login: false });
}
/**
@ -131,7 +90,7 @@ export function getLogistics() {
* @returns {*}
*/
export function orderVerific(merId, id, data) {
return request.post(`verifier/${merId}/${id}`, data);
return request.post(`verifier/${merId}/${id}`, data);
}
/**
@ -139,7 +98,7 @@ export function orderVerific(merId, id, data) {
* @returns {*}
*/
export function verifierOrder(mer_id, code) {
return request.get("verifier/" + mer_id + "/order/" + code);
return request.get("verifier/" + mer_id + "/order/" + code);
}
/**
@ -147,150 +106,108 @@ export function verifierOrder(mer_id, code) {
* @returns {*}
*/
export function orderStatistics(mer_id, data) {
return request.get("admin/" + mer_id + "/statistics", data);
}
/**
* 订单
* @returns {*}
*/
export function orderStat(data) {
return request.get("admin/1/statistics", data);
return request.get("admin/" + mer_id + "/statistics", data);
}
/**
* 每日成交额
* @returns {*}
*/
export function orderPrice(where, mer_id) {
return request.get("admin/" + mer_id + "/order_price", where, {
login: true
});
return request.get("admin/" + mer_id + "/order_price", where, { login: true });
}
/**
* 订单列表
* @returns {*}
*/
export function getOrderList(where, merId) {
return request.get(`admin/${merId}/order_list`, where, {
login: true
});
return request.get(`admin/${merId}/order_list`, where, { login: true });
}
/**
* 退款订单列表
* @returns {*}
*/
export function getRefundOrderList(where, merId) {
return request.get(`server/${merId}/refund/lst`, where, {
login: true
});
return request.get(`server/${merId}/refund/lst`, where, { login: true });
}
/**
* 营业额统计
* @returns {*}
*/
export function turnoverStatistics(where, merId) {
return request.get(`admin/${merId}/pay_price`, where, {
login: true
});
return request.get(`admin/${merId}/pay_price`, where, { login: true });
}
/**
* 订单统计
* @returns {*}
*/
export function orderNumberStatistics(where, merId) {
return request.get(`admin/${merId}/pay_number`, where, {
login: true
});
return request.get(`admin/${merId}/pay_number`, where, { login: true });
}
/**
* 获取订单打印默认配置
* @returns {*}
*/
export function orderDeliveryInfo(merId) {
return request.get(`admin/${merId}/mer_form`);
return request.get(`admin/${merId}/mer_form`);
}
/**
* 获取电子面单列表
* @returns {*}
*/
export function orderExportTemp(data) {
return request.get("store/expr/temps", data);
return request.get("store/expr/temps", data);
}
/**
* 是否开始电子面单和同城配送
* @returns {*}
*/
export function getTempAndDelivery(merId) {
return request.get(`admin/${merId}/delivery_config`);
return request.get(`admin/${merId}/delivery_config`);
}
/**
* 获取同城配送门店列表
* @returns {*}
*/
export function getDeliveryStoreLst(merId) {
return request.get(`admin/${merId}/delivery_options`);
return request.get(`admin/${merId}/delivery_options`);
}
/**
* 退款订单信息
* @returns {*}
*/
export function getRefundOrderInfo(merId, id) {
return request.get(`server/${merId}/refund/get/${id}`);
return request.get(`server/${merId}/refund/get/${id}`);
}
/**
* 提交退款订单信息
* @returns {*}
*/
export function refundOrderSubmit(merId, id, data) {
return request.post(`server/${merId}/refund/status/${id}`, data, {
login: true
});
return request.post(`server/${merId}/refund/status/${id}`, data, { login: true });
}
/**
* 退款单确认收货
* @returns {*}
*/
export function refundOrderReceive(merId, id) {
return request.post(`server/${merId}/refund/confirm/${id}`, {}, {
login: true
});
return request.post(`server/${merId}/refund/confirm/${id}`, {}, { login: true });
}
/**
* 退款单详情
*/
export function getRefundOrderDetail(merId, orderId) {
return request.get(`server/${merId}/refund/detail/${orderId}`, {}, {
login: true
});
return request.get(`server/${merId}/refund/detail/${orderId}`, {}, { login: true });
}
/**
* 添加退款单备注信息
*/
export function setRefundMark(merId, orderId, data) {
return request.post(`server/${merId}/refund/mark/${orderId}`, data, {
login: true
});
return request.post(`server/${merId}/refund/mark/${orderId}`, data, { login: true });
}
/**
* 去核销
* @param object data
*/
export function orderCancellation(merId, id) {
return request.post(`admin/${merId}/verify/${id}`);
}
/**
* 去核销
* @param object data
*/
export function purchaseOrder(where, merId) {
return request.get(`admin/${merId}/purchaseOrder`, where, {
login: true
});
}
/**
* 商家物流取件二维码
* @param object data
*/
export function logisticsCode(id) {
return request.get(`order/logistics_code/${id}`);
return request.post(`admin/${merId}/verify/${id}`);
}

View File

@ -5,17 +5,8 @@ import request from "@/utils/request.js";
*
*/
export function cloudWarehouse(data) {
return request.get("store/product/cloudWarehouse", data, { noAuth: true });
return request.get("store/product/cloudWarehouse", data);
}
/**
* 为你推荐
*
*/
export function spuRecommend(data) {
return request.get("product/spu/recommend", data, { noAuth: true });
}
/**
* 获取云仓分类
*
@ -112,10 +103,6 @@ export function getUserCoupons(data) {
export function getArticleCategoryList() {
return request.get('article/category/lst', {}, { noAuth: true })
}
export function getArticleCategoryLists() {
return request.get('article/category/lst?is_home='+1, {}, { noAuth: true })
}
/**
* 文章列表
* @param int cid
@ -281,41 +268,4 @@ export function ajcaptchaCheck(data) {
return request.post("ajcheck", data, {
noAuth: true
});
}
/**
* 获取所在的地区数据
* @param {Object} data
*/
export function village(data) {
return request.get('v2/system/geo/lst', data, { noAuth: true });
}
/**
* 获取所在的村队数据
* @param {Object} data
*/
export function brigade(data) {
return request.get('v2/system/brigade', data, { noAuth: true });
}
/*
生产 -- 获取商户押金信息支付接口
*/
export function paymerchant() {
return request.post(`user/margin`,{});
}
/*
生产 -- 获取商户押金信息接口
*/
export function merchant(data) {
return request.get(`store/merchant/margin`, data);
}
//获取押金缴纳列表
export function marginlist(data) {
return request.get(`user/margin/list`,data);
}
}

View File

@ -7,7 +7,7 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/requesta.js";
import request from "@/utils/request.js";
/** 获取话题分类*/
export function getTopicList() {
@ -82,18 +82,11 @@ export function videoList(data) {
});
}
/**自己的视频列表*/
export function deoList(id) {
return request.get(`community/show/${id}`, {
noAuth: true
});
}
export function myVideoList(id,data) {
return request.get(`community/user/community_video/${id}`, data, {
noAuth: true
});
}
/**文章点赞*/
export function graphicStartApi(id, status) {
return request.post(`community/start/${id}`, status);

View File

@ -1,151 +0,0 @@
import request from "@/utils/requestc.js";
import requesta from "@/utils/request.js";
/**
* 直播列表
*/
export function live(data) {
return request.get("zhibo/live" ,data);
}
/**
* 直播详情
*/
export function liveDetail(data) {
return request.get("zhibo/liveDetail" ,data);
}
/**
* 获取直播详情接口
*/
/**
* 创建直播间
*/
export function createPushLive(data) {
return request.post("zhibo/createPushLive", data);
}
/**
* 关闭直播间
*/
export function stopPushLive(data) {
return request.post("zhibo/stopPushLive", data);
}
/**
* 绑定用户client客户
*/
export function bindUser(data) {
return request.post("zhibo/bindUser", data);
}
/**
* 加入直播间聊天室
*/
export function joinChatRoom(data) {
return request.post("zhibo/joinChatRoom", data);
}
/**
* 直播间聊天室发言
*/
export function sendGroupMessage(data) {
return request.post("zhibo/sendGroupMessage", data);
}
//商品列表
export function good(data) {
return requesta.get("product/spu/lst", data);
}
/**
* 获取用户信息
*
*/
export function getUserInfo() {
return request.get('user');
}
//关注
export function getfans(id,data) {
return requesta.post('community/fans/'+id,data);
}
//我关注的人
export function getfocuslst(data) {
return requesta.post('community/focus/lst',data);
}
//关注我的人
export function getfanslst(data) {
return requesta.get('community/fans/lst',data);
}
//用户送礼
export function reward(data) {
return request.post('zhibo/reward',data);
}
//获取礼物
export function rewardList(data) {
return requesta.get('zhibo/rewardList',data);
}
//获取礼物
export function giftList(data) {
return request.get('zhibo/giftList',data);
}
//获取房间人数
export function liveAudience(data) {
return request.get('zhibo/liveAudience',data);
}
//获取用户余额
export function getuser(data) {
return requesta.get('user',data);
}
//送礼
export function sendGift(data) {
return request.post('zhibo/sendGift',data);
}
//获取主播关注人数
export function fansNum(data) {
return requesta.get('zhibo/fansNum',data);
}
/**
* 充值金额选择
*/
export function getRechargeApi() {
return requesta.get("common/recharge_quota");
}
//历史直播记录
export function playbackList(data) {
return request.get("zhibo/playbackList",data);
}
//获取直播回放详情
export function playbackDetail(data) {
return request.get("zhibo/playbackDetail",data);
}
//获取观众关注主播状态
export function getAjuser(id) {
return requesta.get(`community/user/info/${id}`);
}

View File

@ -107,7 +107,7 @@ export function orderDel(id) {
}
/**
* 已付款订单详情
* 订单详情
* @param string uni
*/
export function getOrderDetail(uni) {
@ -115,11 +115,11 @@ export function getOrderDetail(uni) {
}
/**
* 未付款订单详情
* 订单详情
* @param string uni
*/
export function groupOrderDetail(uni,product_type) {
return request.get('order/group_order_detail/' + uni+'?product_type=' + product_type);
export function groupOrderDetail(uni) {
return request.get('order/group_order_detail/' + uni);
}
// 支付状态订单
@ -326,12 +326,4 @@ export function applyInvoiceApi(id, data) {
*/
export function refundCancelApi(id) {
return request.post(`refund/cancel/${id}`);
}
/**
* 售后
* @param object data
*/
export function refundlist(data) {
return request.get(`refund/list`,data);
}

View File

@ -14,18 +14,6 @@ import request from "@/utils/request.js";
*/
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data)
/**
*商品列表
*/
export const spuInfo = (id, data) => request.get('product/spu/street/' + id, data)
/**
* 线下导入
*/
export function postImport(merid, data) {
return request.post(`server/${merid}/product/stockIn`, data);
}
/**
* 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4
*/
@ -38,26 +26,20 @@ export const merchantUpdateAPI = (data) => request.post('store/merchant/update',
* 商品列表
*/
export function productLstApi(merId, data) {
return request.get(`server/${merId}/product/lst`, data, {
login: true
});
return request.get(`server/${merId}/product/lst`, data, { login: true });
}
/**
* 商品列表 -- 删除
*/
export function productDeleteApi(merId, id) {
return request.post(`server/${merId}/product/delete/${id}`, {}, {
login: true
});
return request.post(`server/${merId}/product/delete/${id}`, {}, { login: true });
}
/**
* 商品列表 -- 上下架
*/
export function productOffApi(merId, id, data) {
return request.post(`server/${merId}/product/status/${id}`, data, {
login: true
});
return request.post(`server/${merId}/product/status/${id}`, data, { login: true });
}
/*
@ -65,9 +47,7 @@ export function productOffApi(merId, id, data) {
*/
export function productTitle(merId, data) {
return request.get(`server/${merId}/product/title`, data, {
login: true
});
return request.get(`server/${merId}/product/title`, data, { login: true });
}
/*
@ -75,9 +55,7 @@ export function productTitle(merId, data) {
*/
export function productDestory(merId, id, data) {
return request.post(`server/${merId}/product/destory/${id}`, data, {
login: true
});
return request.post(`server/${merId}/product/destory/${id}`, data, { login: true });
}
/*
@ -85,9 +63,7 @@ export function productDestory(merId, id, data) {
*/
export function productRestore(merId, id) {
return request.post(`server/${merId}/product/restore/${id}`, {}, {
login: true
});
return request.post(`server/${merId}/product/restore/${id}`, {}, { login: true });
}
/*
@ -95,9 +71,7 @@ export function productRestore(merId, id) {
*/
export function categoryBrandlist(merId) {
return request.get(`server/${merId}/category/brandlist`, {}, {
login: true
});
return request.get(`server/${merId}/category/brandlist`, {}, { login: true });
}
/*
@ -105,9 +79,7 @@ export function categoryBrandlist(merId) {
*/
export function categorySelect(merId) {
return request.get(`server/${merId}/category/select`, {}, {
login: true
})
return request.get(`server/${merId}/category/select`, {}, { login: true })
}
/*
@ -115,9 +87,7 @@ export function categorySelect(merId) {
*/
export function categoryList(merId) {
return request.get(`server/${merId}/category/list`, {}, {
login: true
})
return request.get(`server/${merId}/category/list`, {}, { login: true })
}
/*
@ -125,17 +95,13 @@ export function categoryList(merId) {
*/
export function productCreate(merId, data) {
return request.post(`server/${merId}/product/create`, data, {
login: true
})
return request.post(`server/${merId}/product/create`, data, { login: true })
}
/**
* 商品列表 -- 设置推荐
*/
export function productRecommendApi(merId, id, data) {
return request.post(`server/${merId}/product/good/${id}`, data, {
login: true
});
return request.post(`server/${merId}/product/good/${id}`, data, { login: true });
}
/*
@ -143,181 +109,119 @@ export function productRecommendApi(merId, id, data) {
*/
export function attrList(merId, data) {
return request.get(`server/${merId}/attr/lst`, data, {
login: true
})
return request.get(`server/${merId}/attr/lst`, data, { login: true })
}
/*
请求运费模板
*/
export function templateList(merId, data) {
return request.get(`server/${merId}/template/lst`, data, {
login: true
})
return request.get(`server/${merId}/template/lst`, data, { login: true })
}
/*
运费模板 -- 删除
*/
export function templateDelete(merId, data) {
return request.post(`server/${merId}/template/delete`, data, {
login: true
})
return request.post(`server/${merId}/template/delete`, data, { login: true })
}
/**
* 运费模板 -- 详情
*/
export function templateDetail(merId, id) {
return request.get(`server/${merId}/template/detail/${id}`, {}, {
login: true
});
return request.get(`server/${merId}/template/detail/${id}`, {}, { login: true });
}
/*
运费模板 -- 添加
*/
export function templateCreate(merId, data) {
return request.post(`server/${merId}/template/create`, data, {
login: true
});
return request.post(`server/${merId}/template/create`, data, { login: true });
}
/*
运费模板 -- 编辑
*/
export function templateUpdate(merId, id, data) {
return request.post(`server/${merId}/template/update/${id}`, data, {
login: true
});
return request.post(`server/${merId}/template/update/${id}`, data, { login: true });
}
/**
* 店铺分类 -- 列表
*/
export function storeClassifyLst(merId) {
return request.get(`server/${merId}/category/lst`, {}, {
login: true
});
return request.get(`server/${merId}/category/lst`, {}, { login: true });
}
/**
* 店铺分类 -- 列表(删除)
*/
export function storeClassifyDel(merId, id) {
return request.post(`server/${merId}/category/delete/${id}`, {}, {
login: true
});
return request.post(`server/${merId}/category/delete/${id}`, {}, { login: true });
}
/**
* 上级分类 -- 商户列表
*/
export function merClassifyLst(merId) {
return request.get(`server/${merId}/category/select`, {}, {
login: true
});
return request.get(`server/${merId}/category/select`, {}, { login: true });
}
/**
* 店铺分类 -- 添加
*/
export function merClassifyAdd(merId, data) {
return request.post(`server/${merId}/category/create`, data, {
login: true
});
return request.post(`server/${merId}/category/create`, data, { login: true });
}
/**
* 店铺分类 -- 详情
*/
export function merClassifyDetail(merId, id) {
return request.get(`server/${merId}/category/detail/${id}`, {}, {
login: true
});
return request.get(`server/${merId}/category/detail/${id}`, {}, { login: true });
}
/**
* 店铺分类 -- 编辑
*/
export function merClassifyUpdate(merId, id, data) {
return request.post(`server/${merId}/category/update/${id}`, data, {
login: true
});
return request.post(`server/${merId}/category/update/${id}`, data, { login: true });
}
/**
* 商品规格项目 -- 列表
*/
export function specificationLst(merId, data) {
return request.get(`server/${merId}/attr/lst`, data, {
login: true
});
return request.get(`server/${merId}/attr/lst`, data, { login: true });
}
/**
* 商品规格项目 -- 删除
*/
export function specificationDel(merId, data) {
return request.post(`server/${merId}/attr/delete`, data, {
login: true
});
return request.post(`server/${merId}/attr/delete`, data, { login: true });
}
/**
* 商品规格项目 -- 添加
*/
export function specificationAdd(merId, data) {
return request.post(`server/${merId}/attr/create`, data, {
login: true
});
return request.post(`server/${merId}/attr/create`, data, { login: true });
}
/**
* 商品规格项目 -- 编辑
*/
export function specificationUpdate(merId, id, data) {
return request.post(`server/${merId}/attr/update/${id}`, data, {
login: true
});
return request.post(`server/${merId}/attr/update/${id}`, data, { login: true });
}
/**
* 商品规格项目 -- 详情
*/
export function specificationDetail(merId, id) {
return request.get(`server/${merId}/attr/detail/${id}`, {}, {
login: true
});
return request.get(`server/${merId}/attr/detail/${id}`, {}, { login: true });
}
/*
请求商品详情
*/
export function productDetail(merId, id) {
return request.get(`server/${merId}/product/detail/${id}`, {}, {
login: true
});
return request.get(`server/${merId}/product/detail/${id}`, {}, { login: true });
}
/*
编辑商品
*/
export function productUpdate(merId, id, data) {
return request.post(`server/${merId}/product/update/${id}`, data, {
login: true
});
return request.post(`server/${merId}/product/update/${id}`, data, { login: true });
}
/*
添加商品 -- 获取送货方式信息
*/
export function getDeliveryType(merId) {
return request.get(`server/${merId}/product/config`, {}, {
login: true
});
}
/*
商品 -- 获取交易协议内容
*/
export function business(data) {
return request.get(`business/agree`, data, {
noAuth: true
});
}
/*
商品 -- 获取交易申请记录
*/
export function intention(data) {
return request.get(`intention/lst`, data);
}
/*
商品 -- 同意提交申请
*/
export function intentionbus(data) {
return request.post(`intention/business`, data);
}
return request.get(`server/${merId}/product/config`, {}, { login: true });
}

View File

@ -24,7 +24,6 @@ export function getWechatConfig() {
);
}
/**
* 获取微信sdk配置
* @returns {*}
@ -75,16 +74,6 @@ export function bindMp(data) {
noAuth: true
});
}
/**
* 绑定极光id
* @param data object 小程序用户登陆信息
*/
export function bindJG(data) {
return request.post("auth/bindJg", data, {
noAuth: true
});
}
/**
* 分享
* @returns {*}
@ -141,12 +130,4 @@ export function getNavigation(data) {
return request.get("navigation", data, {
noAuth: true
});
}
/*
小程序 -- 小程序列表
*/
export function applet(data) {
return request.get(`applet`, data);
}

View File

@ -1,43 +0,0 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 获取发布管理转售商品列表
* @param numType boolean true 购物车数量,false=购物车产品数量
*/
export function getResale(data) {
return request.get("community/resale/lst", data);
}
/**
* 清除发布管理转售商品
* @param object ids
*/
export function getResaledelete(id) {
return request.post('community/resale/delete/'+ id);
}
/**
* 用户是否同意转售商品折扣价
* @param object ids
*/
export function getResalecheck(id,data) {
return request.post('community/resale/check/'+ id,data);
}
/**
* 获取转售商品详情
* @param object ids
*/
export function getResaleid(id) {
return request.get('community/resale/' + id);
}

View File

@ -1,32 +0,0 @@
import request from "@/utils/requesta.js";
export function getCityCloundShop(data) {
return request.get("city/get_cloud_shop", data);
}
export function getCategoryListLevel(data) {
return request.get("category/list_level", data);
}
export function cloudWarehouse(data) {
return request.get("store/product/cloudWarehouse", data);
}
export function townCloud(data) {
return request.get("store/product/town_cloud", data);
}
/**
* 供销市场标签
* @returns {*}
*/
export function supMenuApi(data) {
return request.get('intention/v2/cate', data);
}
/**
* 获取购物车列表
*
*/
export function getCartList(data) {
return request.get("user/cart/lst", data);
}
export function getCartCounts(data) {
return request.get("user/cart/count", data);
}

View File

@ -1,56 +0,0 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
//发布委托商品选择 供应链商家接口
export function supplychain(data) {
return request.get("community/supplychain/list", data);
}
//普通商家发布委托商品
export function entrustchain(data) {
return request.post("community/entrust", data);
}
//获取委托商品列表
export function entrustlist(data) {
return request.get("community/entrust/list", data);
}
//供应链商家是否同意委托
export function checkchain(id,data) {
return request.post("community/entrust/check/"+id, data);
}
//供应链商家申请结束委托
export function finishchain(id,data) {
return request.post("community/entrust/apply/finish/"+id, data);
}
//商家申请结束委托
export function finishentrust(id,data) {
return request.post("community/entrust/finish/"+id, data);
}
//委托商品加入购物车
export function addEntrustCart(data) {
return request.post("community/entrust/addEntrustCart", data);
}
//获取委托商品详情
export function entrustdetail(id) {
return request.get("community/entrust/"+id);
}
//编辑委托商品详情
export function editentrust(id,data) {
return request.post("community/entrust/edit/"+id, data);
}

View File

@ -1,19 +1,18 @@
import request from "@/utils/request.js";
import requestb from "@/utils/requestb.js";
/**
* 扫码查询商品
*
*/
export function microSeachBarCode(data) {
return request.get('micro/seach_bar_code', data);
return request.get('micro/seach_bar_code', data);
}
/**
* 获取收款二维码
* @returns {*}
*/
export function createtApi(data) {
return request.post('v2/micropay/create', data);
return request.post('v2/micropay/create', data);
}
/**
@ -21,7 +20,7 @@ export function createtApi(data) {
* @returns {*}
*/
export function addCartApi(data) {
return request.post('v2/micropay/addCart', data);
return request.post('v2/micropay/addCart', data);
}
/**
* 获取产品详情
@ -29,9 +28,9 @@ export function addCartApi(data) {
*
*/
export function getProductDetail(id, data) {
return request.get('store/product/detail/' + id, data, {
noAuth: true
});
return request.get('store/product/detail/' + id, data, {
noAuth: true
});
}
/**
* 获取预览商品详情
@ -39,16 +38,16 @@ export function getProductDetail(id, data) {
*
*/
export function getPreviewProDetail(data) {
return request.get('store/product/preview', data, {
noAuth: true
});
return request.get('store/product/preview', data, {
noAuth: true
});
}
/**
* 产品分享二维码 推广员
* @param int id
*/
export function getProductCode(id, data) {
return request.get('store/product/qrcode/' + id, data);
return request.get('store/product/qrcode/' + id, data);
}
/**
* 添加收藏
@ -56,7 +55,7 @@ export function getProductCode(id, data) {
* @param string category product=普通产品,product_seckill=秒杀产品
*/
export function collectAdd(data) {
return request.post('user/relation/create', data);
return request.post('user/relation/create', data);
}
/**
* 删除收藏产品
@ -64,14 +63,14 @@ export function collectAdd(data) {
* @param string category product=普通产品,product_seckill=秒杀产品
*/
export function collectDel(data) {
return request.post('user/relation/delete', data);
return request.post('user/relation/delete', data);
}
/**
* 购车添加
*
*/
export function postCartAdd(data) {
return request.post('user/cart/create', data);
return request.post('user/cart/create', data);
}
/**
@ -79,73 +78,73 @@ export function postCartAdd(data) {
*
*/
export function getCategoryList() {
return request.get('store/product/category/lst', {}, {
noAuth: true
});
return request.get('store/product/category/lst', {}, {
noAuth: true
});
}
/**
* 获取产品列表
* @param object data
*/
export function getProductslist(data) {
if (data.brand_id && Array.isArray(data.brand_id)) {
data = {
...data
}
data.brand_id = data.brand_id.toString()
}
return request.get('product/spu/lst', data, {
noAuth: true
});
if (data.brand_id && Array.isArray(data.brand_id)) {
data = {
...data
}
data.brand_id = data.brand_id.toString()
}
return request.get('product/spu/lst', data, {
noAuth: true
});
}
/**
* 获取优惠券商品列表
* @param object data
*/
export function getCouponProductlist(data) {
if (data.brand_id && Array.isArray(data.brand_id)) {
data = {
...data
}
data.brand_id = data.brand_id.toString()
}
return request.get('product/spu/coupon_product', data, {
noAuth: true
});
if (data.brand_id && Array.isArray(data.brand_id)) {
data = {
...data
}
data.brand_id = data.brand_id.toString()
}
return request.get('product/spu/coupon_product', data, {
noAuth: true
});
}
/**
* 获取品牌列表
* @param object data
*/
export function getBrandlist(data) {
return request.get('store/product/brand/lst', data, {
noAuth: true
});
return request.get('store/product/brand/lst', data, {
noAuth: true
});
}
/**
* 获取推荐产品
*
*/
export function getProductHot(page, limit) {
return request.get("product/spu/recommend", {
page: page === undefined ? 1 : page,
limit: limit === undefined ? 10 : limit
}, {
noAuth: true
});
return request.get("product/spu/recommend", {
page: page === undefined ? 1 : page,
limit: limit === undefined ? 10 : limit
}, {
noAuth: true
});
}
/**
* 获取商户推荐产品
*
*/
export function getMerProductHot(id, data) {
return request.get(`product/spu/recommend`, {
page: data.page === undefined ? 1 : data.page,
limit: data.limit === undefined ? 10 : data.limit,
mer_id: id || ''
}, {
noAuth: true
});
return request.get(`product/spu/recommend`, {
page: data.page === undefined ? 1 : data.page,
limit: data.limit === undefined ? 10 : data.limit,
mer_id: id || ''
}, {
noAuth: true
});
}
/**
* 批量收藏
@ -154,7 +153,7 @@ export function getMerProductHot(id, data) {
* @param string category
*/
export function collectAll(data) {
return request.post('user/relation/batch/create', data);
return request.post('user/relation/batch/create', data);
}
/**
* 首页产品的轮播图和产品信息
@ -162,23 +161,23 @@ export function collectAll(data) {
*
*/
export function getGroomList(type, data) {
return request.get('product/spu/hot/' + type, data, {
noAuth: true
});
return request.get('product/spu/hot/' + type, data, {
noAuth: true
});
}
/**
* 获取商品收藏列表
* @param object data
*/
export function getCollectUserList(data) {
return request.get('user/relation/product/lst', data)
export function getCollectUserList(data) {
return request.get('user/relation/product/lst', data)
}
/**
* 获取商品收藏列表 -- 删除
* @param object data
*/
export function userCollectDel(data) {
return request.post('user/relation/batch/delete', data)
return request.post('user/relation/batch/delete', data)
}
/**
* 获取产品评论
@ -187,43 +186,43 @@ export function userCollectDel(data) {
*
*/
export function getReplyList(id, data) {
return request.get('store/product/reply/lst/' + id, data, {
noAuth: true
})
return request.get('store/product/reply/lst/' + id, data, {
noAuth: true
})
}
/**
* 产品评价数量和好评度
* @param int id
*/
export function getReplyConfig(id) {
return request.get('reply/config/' + id);
return request.get('reply/config/' + id);
}
/**
* 获取搜索关键字获取
*
*/
export function getSearchKeyword() {
return request.get('common/hot_keyword', {}, {
noAuth: true
});
return request.get('common/hot_keyword', {}, {
noAuth: true
});
}
/**
* 门店列表
* @returns {*}
*/
export function storeListApi(data) {
return request.get("store_list", data, {
noAuth: true
});
return request.get("store_list", data, {
noAuth: true
});
}
/**
* 商户列表
* @returns {*}
*/
export function storeMerchantList(data) {
return request.get("store/merchant/lst", data, {
noAuth: true
});
return request.get("store/merchant/lst", data, {
noAuth: true
});
}
/**
* 获取商铺详情
@ -231,9 +230,9 @@ export function storeMerchantList(data) {
* @param {Object} data 商铺数据
*/
export function getStoreDetail(id, data) {
return request.get("store/merchant/detail/" + id, data, {
noAuth: true
});
return request.get("store/merchant/detail/" + id, data, {
noAuth: true
});
}
/**
* 获取商铺商品列表
@ -241,9 +240,9 @@ export function getStoreDetail(id, data) {
* @param {Object} data 商铺商品列表数据
*/
export function getStoreGoods(id, data) {
return request.get("product/spu/merchant/" + id, data, {
noAuth: true
});
return request.get("product/spu/merchant/" + id, data, {
noAuth: true
});
}
/**
* 获取商铺分类列表
@ -251,77 +250,77 @@ export function getStoreGoods(id, data) {
* @param {Object} data
*/
export function getStoreCategory(id, data) {
return request.get("store/merchant/category/lst/" + id, data, {
noAuth: true
});
return request.get("store/merchant/category/lst/" + id, data, {
noAuth: true
});
}
/**
* 关注商铺
* @param {Object} type_id 商铺 id
*/
export function followStore(type_id) {
return request.post("user/relation/create", {
type: 10,
type_id: type_id
});
return request.post("user/relation/create", {
type: 10,
type_id: type_id
});
}
/**
* 取消商铺关注
* @param {Object} type_id 商铺 id
*/
export function unfollowStore(type_id) {
return request.post("user/relation/delete", {
type: 10,
type_id: type_id
});
return request.post("user/relation/delete", {
type: 10,
type_id: type_id
});
}
/**
* 获取商铺优惠券
* @param {Object} id
*/
export function getStoreCoupon(id) {
return request.get("coupon/store/" + id, {
noAuth: true
});
return request.get("coupon/store/" + id, {
noAuth: true
});
}
/**
* 获取商铺优惠券
*/
export function getMerchantLst(data) {
return request.get("user/relation/merchant/lst", data, {
noAuth: true
});
return request.get("user/relation/merchant/lst", data, {
noAuth: true
});
}
/**
* 物流信息
*/
export function express(id) {
return request.post("ordero/express/" + id, {
noAuth: true
});
return request.post("ordero/express/" + id, {
noAuth: true
});
}
/**
* 子集分类
* @returns {*}
*/
export function storeCategory(pid) {
return request.get("store/product/category", pid, {
noAuth: true
});
return request.get("store/product/category", pid, {
noAuth: true
});
}
/**
* 分销说明
* @returns {*}
*/
export function bagExplain() {
return request.get("store/product/bag/explain");
return request.get("store/product/bag/explain");
}
/**
* 分销礼包推荐列表
* @returns {*}
*/
export function bagRecommend() {
return request.get("product/spu/bag/recommend");
return request.get("product/spu/bag/recommend");
}
/**
* 分销礼包列表
@ -329,64 +328,56 @@ export function bagRecommend() {
*/
export function productBag(data) {
return request.get("product/spu/bag", data, {
noAuth: true
});
return request.get("product/spu/bag", data, {
noAuth: true
});
}
/**
* 商铺二维码
* @returns {*}
*/
export function merchantQrcode(id, data) {
return request.get("store/merchant/qrcode/" + id, data, {
noAuth: true
});
return request.get("store/merchant/qrcode/" + id, data, {
noAuth: true
});
}
/**
* 推荐商品
* @returns {*}
*/
export function merchantProduct(id, data) {
if (data.brand_id && Array.isArray(data.brand_id)) {
data = {
...data
}
data.brand_id = data.brand_id.toString()
}
return request.get("product/spu/merchant/" + id, data, {
noAuth: true
});
if (data.brand_id && Array.isArray(data.brand_id)) {
data = {
...data
}
data.brand_id = data.brand_id.toString()
}
return request.get("product/spu/merchant/" + id, data, {
noAuth: true
});
}
/**
* 推荐商品banner
* @returns {*}
*/
export function getHotBanner(type) {
return request.get("common/hot_banner/" + type, {}, {
noAuth: true
});
return request.get("common/hot_banner/" + type, {}, {
noAuth: true
});
}
/**
* 商户入驻表单
* @returns {*}
*/
export function create(data) {
return request.post("intention/create", data);
return request.post("intention/create", data);
}
/**
* 个人入驻表单
* @returns {*}
*/
export function personalStore(data) {
return request.post("intention/personal_store", data);
}
/**
* 商户入驻短信验证码
* @returns {*}
*/
export function verify(data) {
return request.post("auth/verify", data);
return request.post("auth/verify", data);
}
/**
* 获取秒杀商品详情
@ -394,36 +385,36 @@ export function verify(data) {
*
*/
export function getSeckillProductDetail(id) {
return request.get('store/product/seckill/detail/' + id, {}, {
noAuth: true
});
return request.get('store/product/seckill/detail/' + id, {}, {
noAuth: true
});
}
/**
* 直播推荐列表
* @returns {*}
*/
export function getLiveList(data) {
return request.get(`broadcast/hot`, data, {
noAuth: true
});
return request.get(`broadcast/hot`, data, {
noAuth: true
});
}
/**
* 直播列表
* @returns {*}
*/
export function getBroadcastListApi(data) {
return request.get("broadcast/lst", data, {
noAuth: true
});
return request.get("broadcast/lst", data, {
noAuth: true
});
}
/**
* 商户分类
* @returns {*}
*/
export function merClassifly() {
return request.get("intention/cate", {}, {
noAuth: true
});
return request.get("intention/cate", {}, {
noAuth: true
});
}
/**
* 获取预售商品详情
@ -431,9 +422,9 @@ export function merClassifly() {
*
*/
export function getPresellProductDetail(id) {
return request.get('store/product/presell/detail/' + id, {}, {
noAuth: true
});
return request.get('store/product/presell/detail/' + id, {}, {
noAuth: true
});
}
/**
* 获取商户申请记录
@ -441,7 +432,7 @@ export function getPresellProductDetail(id) {
*
*/
export function getApplicationRecordList(data) {
return request.get('intention/lst', data);
return request.get('intention/lst', data);
}
/**
* 获取商户申请详情
@ -449,7 +440,7 @@ export function getApplicationRecordList(data) {
*
*/
export function getGoodsDetails(id) {
return request.get('intention/detail/' + id, {});
return request.get('intention/detail/' + id, {});
}
/**
@ -458,7 +449,7 @@ export function getGoodsDetails(id) {
*
*/
export function updateGoodsRecord(id, data) {
return request.post('intention/update/' + id, data);
return request.post('intention/update/' + id, data);
}
/**
* 获取定位详细地址
@ -466,9 +457,9 @@ export function updateGoodsRecord(id, data) {
*
*/
export function getGeocoder(data) {
return request.get(`lbs/geocoder?location=${data.lat},${data.long}`, {}, {
noAuth: true
});
return request.get(`lbs/geocoder?location=${data.lat},${data.long}`, {}, {
noAuth: true
});
}
/**
* 获取店铺类型
@ -476,136 +467,80 @@ export function getGeocoder(data) {
*
*/
export function getStoreTypeApi() {
return request.get('intention/type', {
sift_store: 0
}, {
noAuth: true
});
return request.get('intention/type', {}, {
noAuth: true
});
}
/**
* 到货通知
*
*/
export function arrivalNoticeApi(data) {
return request.post('store/product/increase_take', data);
return request.post('store/product/increase_take', data);
}
/*
获取图片验证码
*/
export function getCaptcha() {
return request.get('captcha');
return request.get('captcha');
}
/*
获取店铺资质
*/
export function storeCertificate(data) {
return request.post(`store/certificate/${data.merId}`, data)
return request.post(`store/certificate/${data.merId}`, data)
}
/**
* 本地服务列表
* @returns {*}
*/
export function storeServiceList(id, data) {
return request.get(`product/spu/local/${id}`, data, {
noAuth: true
});
return request.get(`product/spu/local/${id}`, data, {
noAuth: true
});
}
/**
* 复制口令
* @returns {*}
*/
export function copyPasswordApi(data) {
return request.get(`product/spu/copy`, data, {
noAuth: true
});
return request.get(`product/spu/copy`, data, {
noAuth: true
});
}
/**
* 口令搜索
* @returns {*}
*/
export function copyPasswordSearch(data) {
return request.get(`command/copy`, data, {
noAuth: true
});
return request.get(`command/copy`, data, {
noAuth: true
});
}
/**
* 套餐列表
* @returns {*}
*/
export function getDiscountsLst(data) {
return request.get(`discounts/lst`, data, {
noAuth: true
});
return request.get(`discounts/lst`, data, {
noAuth: true
});
}
/**
* 套餐--立即购买
* @returns {*}
*/
export function discountsCartAdd(data) {
return request.post('user/cart/batchCreate', data);
return request.post('user/cart/batchCreate', data);
}
/**
* 商品--价格说明
* @returns {*}
*/
export function priceRuleApi(id) {
return request.get(`store/product/price_rule/${id}`, {}, {
noAuth: true
});
}
/**
* 供销市场标签
* @returns {*}
*/
export function supMenuApi(data) {
return request.get('intention/v2/cate', data);
}
/**
* 供销市场标签
* @returns {*}
*/
export function supAgoodsApi(data) {
return request.get('store/merchant/lst', data);
}
// /api/store / merchant / lst ? page = 1 & limit = 10 & order = & category_id = 22 & type_id = 10 & street_id = &
// credit_buy =
// /api/region/:street_id/merchant
/**
* 附近商家
* @returns {*}
*/
// export function supAgoodsApi(data) {
// return request.get('store/merchant/lst', data);
// }
export function vicinityStoreApi(data) {
return request.get(`region/${data}/merchant`);
}
/*
商家入驻 -- 获取商户入驻申请协议内容
*/
export function agreeiness(data) {
return request.get(`business/agree`, data, {
noAuth: true
});
}
/*
上传图片识别文字
*/
export function merchantLicenseIdentify(data) {
return request.post(`merchant_license_identify`, data, {
noAuth: true
});
}
/*
从供销平台获取村店铺负责人,联系电话
*/
export function getVillageInfo(data) {
return requestb.get(`shop_call/getVillageCompany`, data, {
noAuth: true
});
return request.get(`store/product/price_rule/${id}`, {}, {
noAuth: true
});
}

View File

@ -1,88 +0,0 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 调货列表
*
*/
export function getCommunityList(data) {
return request.get('community/lst', data, {
noAuth: true
});
}
/**
* 商品详情
*
*/
export function getCommunityshow(data) {
return request.get('community/show/' + data, {}, {
noAuth: true
});
}
/**
* 可转售的订单列表
*
*/
export function getCommunitygetOrderList(data) {
return request.get('community/product/lst', data, {
noAuth: true
});
}
/**
* 发起转售
*
*/
export function getCommunitycreate(data) {
return request.post(`community/create`, data, {
login: true
});
}
/**
* 修改转售
*
*/
export function getCommunityUpdate(data) {
return request.post(`community/update`, data, {
login: true
});
}
/**
* 加入购物车
*
*/
export function getCommunityaddCart(data) {
return request.post('community/addCart', data, {
noAuth: true
});
}
//商品宝贝详情
export function getProductDetail(id) {
return request.get('store/product/detail/' + id,
);
}
//获取转售商品详情
export function getresaleDetail(id) {
return request.get('community/resale/' + id,
);
}
//编辑转售商品
export function getresaleEdit(id,data) {
return request.post('community/resale/edit/' + id,data
);
}

View File

@ -1,27 +0,0 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 获取供销平台版本信息
*/
export function getGXconfig(data) {
return request.get("global/config", data);
}
/**
* 获取商城小程序信息
*/
export function miniapp(data) {
return request.get("miniapp/version?version=1", data);
}

View File

@ -8,17 +8,7 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
import request1 from "@/utils/requestb.js";
import Cache from '@/utils/cache'
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
}
/**
* 提交提现
*/
@ -31,12 +21,6 @@ export function postCreateApplyAPI(merId, data) {
export function getAdminApplyAPI(merId, data) {
return request.get(`admin/${merId}/apply`, data);
}
/**
* 提现记录
*/
export function getAdminApplyListAPI(merId) {
return request.get(`admin/${merId}/lis_apply`);
}
/**
* 获取用户信息
*
@ -101,6 +85,15 @@ export function registerVerify(data) {
noAuth: true
});
}
/**
* h5用户发送验证码(本地滑动验证)
* @param data object 用户手机号
*/
export function verifyCode(data) {
return request.post("auth/verifyCode", data, {
noAuth: true
});
}
/**
* h5用户手机号注册
* @param data object 用户手机号 验证码 密码
@ -717,21 +710,4 @@ export function hasServiceApi(id) {
*/
export function getBankInfo() {
return request.get(`user/extract/history_bank`)
}
// 商户账单管理
export function getBillDetil() {
return request.get(`mer/financial_record`)
}
//获取商户入驻所签署公司
export function merstreet(data) {
return request1.get(`company/street_company`, data);
}
//填写邀请码
export function bindPromotionCode(data) {
return request.post(`user/change/bind_promotion_code`, data)
}

View File

@ -1,365 +1,351 @@
<template>
<view>
<view class='mask' v-if='isShowAuth && code' @click='close'></view>
<view class='Popup' v-if='isShowAuth && code' :style="'top:'+top+'px;'">
<!-- <view class="logo-auth">
<view>
<view class='mask' v-if='isShowAuth && code' @click='close'></view>
<view class='Popup' v-if='isShowAuth && code' :style="'top:'+top+'px;'">
<!-- <view class="logo-auth">
<image class="image" :src='routine_logo' mode="aspectFit"></image>
</view> -->
<!--#ifdef H5-->
<text v-if="isWeixin" class='title'>授权提醒</text>
<text v-else class='title'>{{title}}</text>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<text class='title'>用户登录</text>
<!--#endif-->
<!--#ifdef MP-->
<text class='title'>{{title}}</text>
<!--#endif-->
<!--#ifdef H5-->
<text v-if="isWeixin" class='tip'>请授权头像等信息以便为您提供更好的服务</text>
<text v-else class='tip'>{{info}}</text>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<text class='tip'>请登录将为您提供更好的服务</text>
<!--#endif-->
<!--#ifdef MP-->
<text class='tip'>{{info}}</text>
<!--#endif-->
<view class='bottom flex'>
<text class='item' @click='close'>随便逛逛</text>
<!-- #ifdef MP -->
<button class="item grant" hover-class="none" @tap="getUserProfile"><text
class="text">去授权</text></button>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<button class="item grant" @tap="toWecahtAuth">
<text class="text">去登录</text>
</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="item grant" @tap="toWecahtAuth">
<text v-if="isWeixin" class="text">去授权</text>
<text v-else class="text">去登录</text>
</button>
<!-- #endif -->
</view>
</view>
<!-- #ifdef MP -->
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
<!-- #endif -->
</view>
<!--#ifdef H5-->
<text v-if="isWeixin" class='title'>授权提醒</text>
<text v-else class='title'>{{title}}</text>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<text class='title'>用户登录</text>
<!--#endif-->
<!--#ifdef MP-->
<text class='title'>{{title}}</text>
<!--#endif-->
<!--#ifdef H5-->
<text v-if="isWeixin" class='tip'>请授权头像等信息以便为您提供更好的服务</text>
<text v-else class='tip'>{{info}}</text>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<text class='tip'>请登录将为您提供更好的服务</text>
<!--#endif-->
<!--#ifdef MP-->
<text class='tip'>{{info}}</text>
<!--#endif-->
<view class='bottom flex'>
<text class='item' @click='close'>随便逛逛</text>
<!-- #ifdef MP -->
<button class="item grant" hover-class="none" @tap="getUserProfile"><text class="text">去授权</text></button>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<button class="item grant" @tap="toWecahtAuth">
<text class="text">去登录</text>
</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="item grant" @tap="toWecahtAuth">
<text v-if="isWeixin" class="text">去授权</text>
<text v-else class="text">去登录</text>
</button>
<!-- #endif -->
</view>
</view>
<!-- #ifdef MP -->
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
<!-- #endif -->
</view>
</template>
<script>
const app = getApp();
import Cache from '../utils/cache';
import {
getLogo,
commonAuth
} from '../api/public';
import {
LOGO_URL,
USER_INFO,
EXPIRES_TIME
} from '../config/cache';
import {
mapGetters
} from 'vuex';
import Routine from '../libs/routine';
import {
configMap
} from '@/utils/index';
import Auth from '../libs/wechat';
import {
toLogin
} from '../libs/login';
// #ifdef MP
import editUserModal from '@/components/eidtUserModal/index.vue'
// #endif
export default {
name: 'Authorize',
props: {
isAuto: {
type: Boolean,
default: true
},
isGoIndex: {
type: Boolean,
default: true
},
isShowAuth: {
type: Boolean,
default: false
}
},
components: {
// #ifdef MP
editUserModal
// #endif
},
data() {
return {
title: '用户登录',
info: '请登录,将为您提供更好的服务!',
//#ifdef H5
isWeixin: this.$wechat.isWeixin(),
//#endif
//#ifdef MP
title: '授权提醒',
info: '请授权头像等信息,以便为您提供更好的服务!',
//#endif
canUseGetUserProfile: false,
code: null,
top: 0,
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
editModal: false, //
}
},
computed: {
...mapGetters(['isLogin', 'userInfo', 'viewColor']),
...configMap(['routine_logo'])
},
watch: {
isLogin(n) {
n === true && this.$emit('onLoadFun', this.userInfo);
},
isShowAuth(n) {
this.getCode(this.isShowAuth)
}
},
created() {
// console.log('title' + this.title)
this.top = uni.getSystemInfoSync().windowHeight / 2 - 70
if (wx.getUserProfile) {
this.canUseGetUserProfile = true
}
this.setAuthStatus();
this.getCode(this.isShowAuth)
},
methods: {
// #ifdef MP
editSuccess() {
this.editModal = false
this.$emit('onLoadFun', this.userInfo);
},
closeEdit() {
this.editModal = false
},
// #endif
setAuthStatus() {
//#ifdef MP
Routine.authorize().then(res => {
if (res.islogin === false)
this.$emit('onLoadFun', this.userInfo);
}).catch(res => {
if (this.isAuto)
this.$emit('authColse', true);
})
//#endif
},
getCode(n) {
// #ifdef MP
if (n) {
uni.showLoading({
title: '正在登录中'
});
Routine.getCode().then(code => {
uni.hideLoading();
this.code = code;
}).catch(e => {
uni.hideLoading();
uni.showToast({
title: '登录失败',
duration: 2000
});
})
} else {
this.code = null;
}
// #endif
// #ifndef MP
if (n) {
this.code = 1;
}
// #endif
},
toWecahtAuth() {
toLogin(true);
},
getUserProfile() {
// console.log(11);
toLogin(true);
uni.navigateTo({
url: '/pages/users/login/login_copy'
})
// console.log(22);
return
let self = this;
Routine.getUserProfile()
.then(res => {
let userInfo = res.userInfo;
userInfo.code = this.code;
userInfo.spread = app.globalData.spid; //广ID
userInfo.spread_code = app.globalData.code; //广ID
commonAuth({
auth: {
type: 'routine',
auth: userInfo
}
}).then(res => {
if (res.data.status == 200) {
let time = res.data.result.expires_time - Cache.time();
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
self.$store.commit('LOGIN', {
token: res.data.result.token,
time: time
});
self.$store.commit('SETUID', res.data.result.user.uid);
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
Cache.set(USER_INFO, res.data.result.user, time);
this.$emit('onLoadFun', res.data.result.user);
if (res.data.result.user.isNew && this.mp_is_new) {
this.editModal = true;
}
} else {
uni.setStorageSync('auth_token', res.data.result.key);
return uni.navigateTo({
url: '/pages/users/login/login_copy'
})
}
}).catch(res => {
uni.hideLoading();
uni.showToast({
title: res.message,
icon: 'none',
duration: 2000,
const app = getApp();
import Cache from '../utils/cache';
import {
getLogo,
commonAuth
} from '../api/public';
import { LOGO_URL, USER_INFO, EXPIRES_TIME } from '../config/cache';
import { mapGetters } from 'vuex';
import Routine from '../libs/routine';
import { configMap } from '@/utils/index';
import Auth from '../libs/wechat';
import { toLogin } from '../libs/login';
// #ifdef MP
import editUserModal from '@/components/eidtUserModal/index.vue'
// #endif
export default {
name: 'Authorize',
props: {
isAuto: {
type: Boolean,
default: true
},
isGoIndex: {
type: Boolean,
default: true
},
isShowAuth: {
type: Boolean,
default: false
}
},
components: {
// #ifdef MP
editUserModal
// #endif
},
data() {
return {
title: '用户登录',
info: '请登录,将为您提供更好的服务!',
//#ifdef H5
isWeixin: this.$wechat.isWeixin(),
//#endif
//#ifdef MP
title: '授权提醒',
info: '请授权头像等信息,以便为您提供更好的服务!',
//#endif
canUseGetUserProfile: false,
code: null,
top: 0,
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
editModal: false, //
}
},
computed: {
...mapGetters(['isLogin', 'userInfo', 'viewColor']),
...configMap(['routine_logo'])
},
watch: {
isLogin(n) {
n === true && this.$emit('onLoadFun', this.userInfo);
},
isShowAuth(n) {
this.getCode(this.isShowAuth)
}
},
created() {
// console.log('title' + this.title)
this.top = uni.getSystemInfoSync().windowHeight / 2 - 70
if (wx.getUserProfile) {
this.canUseGetUserProfile = true
}
this.setAuthStatus();
this.getCode(this.isShowAuth)
},
methods: {
// #ifdef MP
editSuccess() {
this.editModal = false
this.$emit('onLoadFun', this.userInfo);
},
closeEdit() {
this.editModal = false
},
// #endif
setAuthStatus() {
//#ifdef MP
Routine.authorize().then(res => {
if (res.islogin === false)
this.$emit('onLoadFun', this.userInfo);
}).catch(res => {
if (this.isAuto)
this.$emit('authColse', true);
})
//#endif
},
getCode(n) {
// #ifdef MP
if (n) {
uni.showLoading({
title: '正在登录中'
});
Routine.getCode().then(code => {
uni.hideLoading();
this.code = code;
}).catch(e => {
uni.hideLoading();
uni.showToast({
title: '登录失败',
duration: 2000
});
})
} else {
this.code = null;
}
// #endif
// #ifndef MP
if (n) {
this.code = 1;
}
// #endif
},
toWecahtAuth() {
toLogin(true);
},
getUserProfile() {
// console.log(11);
toLogin(true);
uni.navigateTo({
url: '/pages/users/login/login_copy'
})
// console.log(22);
return
let self = this;
Routine.getUserProfile()
.then(res => {
let userInfo = res.userInfo;
userInfo.code = this.code;
userInfo.spread = app.globalData.spid; //广ID
userInfo.spread_code = app.globalData.code; //广ID
commonAuth({
auth: {
type: 'routine',
auth: userInfo
}
}).then(res => {
if (res.data.status == 200) {
let time = res.data.result.expires_time - Cache.time();
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
self.$store.commit('LOGIN', { token: res.data.result.token, time: time });
self.$store.commit('SETUID', res.data.result.user.uid);
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
Cache.set(USER_INFO, res.data.result.user, time);
this.$emit('onLoadFun', res.data.result.user);
if (res.data.result.user.isNew && this.mp_is_new) {
this.editModal = true;
}
} else {
uni.setStorageSync('auth_token', res.data.result.key);
return uni.navigateTo({
url: '/pages/users/login/login_copy'
})
}
}).catch(res => {
uni.hideLoading();
uni.showToast({
title: res.message,
icon: 'none',
duration: 2000,
});
});
})
.catch(res => {
uni.hideLoading();
});
},
close() {
let pages = getCurrentPages(),
currPage = pages[pages.length - 1];
this.$emit('authColse', false);
if (this.isGoIndex) {
uni.switchTab({
url: '/pages/index/index'
});
} else {
this.$emit('authColse', false);
}
},
}
}
});
});
})
.catch(res => {
uni.hideLoading();
});
},
close() {
let pages = getCurrentPages(),
currPage = pages[pages.length - 1];
this.$emit('authColse', false);
// if (this.isGoIndex) {
// uni.switchTab({
// url: '/pages/index/index'
// });
// } else {
// this.$emit('authColse', false);
// }
},
}
}
</script>
<style scoped lang='scss'>
.Popup {
flex: 1;
align-items: center;
justify-content: center;
width: 500rpx;
background-color: #fff;
position: fixed;
top: 500rpx;
left: 125rpx;
z-index: 1000;
border-radius: 8px;
overflow: hidden;
}
.Popup {
flex: 1;
align-items: center;
justify-content: center;
width: 500rpx;
background-color: #fff;
position: fixed;
top: 500rpx;
left: 125rpx;
z-index: 1000;
border-radius: 8px;
overflow: hidden;
}
.Popup {
.logo-auth {
z-index: -1;
position: absolute;
left: 50%;
top: 0%;
transform: translate(-50%, -50%);
width: 150rpx;
height: 150rpx;
display: flex;
align-items: center;
justify-content: center;
border: 8rpx solid #fff;
border-radius: 50%;
background: #fff;
}
.Popup {
.logo-auth {
z-index: -1;
position: absolute;
left: 50%;
top: 0%;
transform: translate(-50%, -50%);
width: 150rpx;
height: 150rpx;
display: flex;
align-items: center;
justify-content: center;
border: 8rpx solid #fff;
border-radius: 50%;
background: #fff;
}
.image {
height: 42rpx;
margin-top: -54rpx;
}
}
.image {
height: 42rpx;
margin-top: -54rpx;
}
}
.Popup .title {
font-size: 28rpx;
color: #000;
text-align: center;
margin-top: 30rpx;
align-items: center;
justify-content: center;
width: 500rpx;
display: flex;
}
.Popup .title {
font-size: 28rpx;
color: #000;
text-align: center;
margin-top: 30rpx;
align-items: center;
justify-content: center;
width: 500rpx;
display: flex;
}
.Popup .tip {
font-size: 22rpx;
color: #555;
padding: 0 24rpx;
margin-top: 25rpx;
display: flex;
align-items: center;
justify-content: center;
}
.Popup .tip {
font-size: 22rpx;
color: #555;
padding: 0 24rpx;
margin-top: 25rpx;
display: flex;
align-items: center;
justify-content: center;
}
.Popup .bottom .item {
width: 250rpx;
height: 80rpx;
background-color: #eeeeee;
text-align: center;
line-height: 80rpx;
margin-top: 54rpx;
font-size: 24rpx;
color: #666;
.Popup .bottom .item {
width: 250rpx;
height: 80rpx;
background-color: #eeeeee;
text-align: center;
line-height: 80rpx;
margin-top: 54rpx;
font-size: 24rpx;
color: #666;
.text {
font-size: 24rpx;
color: #666;
}
}
.text {
font-size: 24rpx;
color: #666;
}
}
.Popup .bottom .item.on {
width: 500rpx;
}
.Popup .bottom .item.on {
width: 500rpx;
}
.flex {
display: flex;
flex-direction: row;
}
.flex {
display: flex;
flex-direction: row;
}
.Popup .bottom .item.grant {
font-weight: bold;
background-color: #E93323;
/* background-color: var(--view-theme); */
border-radius: 0;
padding: 0;
.Popup .bottom .item.grant {
font-weight: bold;
background-color: #E93323;
/* background-color: var(--view-theme); */
border-radius: 0;
padding: 0;
.text {
font-size: 28rpx;
color: #fff;
}
}
.text {
font-size: 28rpx;
color: #fff;
}
}
.mask {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.65);
z-index: 99;
}
.mask {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.65);
z-index: 99;
}
</style>

View File

@ -1,95 +0,0 @@
<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>

View File

@ -162,10 +162,10 @@ export default {
itemTap(item) {
this.$emit('itemTap', item)
},
// item
goShop(item) {
this.$emit('goShop', item)
}
// item
goShop(item) {
this.$emit('goShop', item)
}
}
}
</script>

View File

@ -1,208 +0,0 @@
<template>
<view :class="'wf-page wf-page'+type">
<!-- left -->
<view>
<view id="left" v-if="leftList.length">
<view v-for="(item,index) in leftList" :key="index"
class="wf-itema" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
<!-- right -->
<view>
<view id="right" v-if="rightList.length">
<view v-for="(item,index) in rightList" :key="index"
class="wf-itemb" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
</view>
</template>
<script>
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItemo.vue'
export default {
components: {
WaterfallsFlowItem
},
props: {
//
wfList: {
type: Array,
require: true
},
updateNum: {
type: Number,
default: 10
},
type: {
type: Number,
default: 0
},
isStore: {
type: [String, Number],
default: '1'
},
},
data() {
return {
allList: [], //
leftList: [], //
rightList: [], //
mark: 0, //
boxHeight: [], // 01
};
},
watch: {
//
wfList: {
handler(nVal,oVal){
// 使
if (!this.wfList.length ||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
this.allList = [];
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.mark = 0;
}
// waterfall
if (this.wfList.length) {
this.allList = this.wfList;
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.allList.forEach((v, i) => {
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
if(i % 2){
this.rightList.push(v);
}else{
this.leftList.push(v);
}
}
});
if(this.allList.length < 3){
this.mark = this.allList.length+1;
}else if(this.allList.length <= 7){
this.mark = this.allList.length - 1;
}else{
this.mark = this.allList.length - 2;
}
if(this.mark < this.allList.length){
this.waterFall()
}
}
},
immediate: true,
deep:true
},
mounted(){
},
// item
mark() {
const len = this.allList.length;
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
this.waterFall();
}
}
},
methods: {
//
waterFall() {
const i = this.mark;
if (i == 0) {
//
this.leftList.push(this.allList[i]);
//
this.getViewHeight(0);
} else if (i == 1) {
// item
this.rightList.push(this.allList[i]);
//
this.getViewHeight(1);
} else {
// item
if(!this.boxHeight.length){
this.rightList.length < this.leftList.length
? this.rightList.push(this.allList[i])
: this.leftList.push(this.allList[i]);
} else {
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
if (leftOrRight) {
this.rightList.push(this.allList[i])
} else {
this.leftList.push(this.allList[i])
}
}
//
this.getViewHeight();
}
},
//
getViewHeight() {
// 使nextTick
this.$nextTick(() => {
setTimeout(()=>{
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
res ? this.boxHeight[1] = res.height : '';
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
res ? this.boxHeight[0] = res.height : '';
this.mark = this.mark + 1;
}).exec();
}).exec();
},100)
})
},
// item
itemTap(item) {
// this.$emit('itemTap', item)
},
// item
goShop(item) {
this.$emit('goShop', item)
}
}
}
</script>
<style lang="scss" scoped>
$page-padding: 10px;
$grid-gap: 5px;
.wf-page {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: $grid-gap;
}
.wf-itema {
width: 356rpx;
padding-bottom: $grid-gap;
}
.wf-itemb {
width: 356rpx;
padding-bottom: $grid-gap;
}
.wf-page1 .wf-item{
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding-bottom: 0;
}
.wf-item-page{
padding-bottom: 20rpx;
}
</style>

View File

@ -1,195 +0,0 @@
<template>
<view :class="'wf-page wf-page'+type">
<!-- left -->
<view>
<view id="left" v-if="leftList.length">
<view v-for="(item,index) in leftList" :key="index"
class="wf-item" @tap="itemTap(item)">
<WaterfallsFlowItemp :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
<!-- right -->
<view>
<view id="right" v-if="rightList.length">
<view v-for="(item,index) in rightList" :key="index"
class="wf-item" @tap="itemTap(item)">
<WaterfallsFlowItemp :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
</view>
</template>
<script>
import WaterfallsFlowItemp from '../WaterfallsFlowItem/WaterfallsFlowItemp.vue'
export default {
components: {
WaterfallsFlowItemp
},
props: {
//
wfList: {
type: Array,
require: true
},
updateNum: {
type: Number,
default: 10
},
type: {
type: Number,
default: 0
},
isStore: {
type: [String, Number],
default: '1'
},
},
data() {
return {
allList: [], //
leftList: [], //
rightList: [], //
mark: 0, //
boxHeight: [], // 01
};
},
watch: {
//
wfList: {
handler(nVal,oVal){
// 使
if (!this.wfList.length ||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
this.allList = [];
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.mark = 0;
}
// waterfall
if (this.wfList.length) {
this.allList = this.wfList;
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.allList.forEach((v, i) => {
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
if(i % 2){
this.rightList.push(v);
}else{
this.leftList.push(v);
}
}
});
if(this.allList.length < 3){
this.mark = this.allList.length+1;
}else if(this.allList.length <= 7){
this.mark = this.allList.length - 1;
}else{
this.mark = this.allList.length - 2;
}
if(this.mark < this.allList.length){
this.waterFall()
}
}
},
immediate: true,
deep:true
},
mounted(){
},
// item
mark() {
const len = this.allList.length;
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
this.waterFall();
}
}
},
methods: {
//
waterFall() {
const i = this.mark;
if (i == 0) {
//
this.leftList.push(this.allList[i]);
//
this.getViewHeight(0);
} else if (i == 1) {
// item
this.rightList.push(this.allList[i]);
//
this.getViewHeight(1);
} else {
// item
if(!this.boxHeight.length){
this.rightList.length < this.leftList.length
? this.rightList.push(this.allList[i])
: this.leftList.push(this.allList[i]);
} else {
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
if (leftOrRight) {
this.rightList.push(this.allList[i])
} else {
this.leftList.push(this.allList[i])
}
}
//
this.getViewHeight();
}
},
//
getViewHeight() {
// 使nextTick
this.$nextTick(() => {
setTimeout(()=>{
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
res ? this.boxHeight[1] = res.height : '';
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
res ? this.boxHeight[0] = res.height : '';
this.mark = this.mark + 1;
}).exec();
}).exec();
},100)
})
},
// item
itemTap(item) {
this.$emit('itemTap', item)
},
// item
goShop(item) {
this.$emit('goShop', item)
}
}
}
</script>
<style lang="scss" scoped>
$page-padding: 10px;
$grid-gap: 10px;
.wf-page {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: $grid-gap;
}
.wf-item {
width: calc((100vw - 2 * #{$page-padding} - #{$grid-gap}) / 2);
padding-bottom: $grid-gap;
}
.wf-page1 .wf-item{
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding-bottom: 0;
}
.wf-item-page{
padding-bottom: 20rpx;
}
</style>

View File

@ -1,207 +0,0 @@
<template>
<view :class="'wf-page wf-page'+type">
<!-- left -->
<view>
<view id="left" v-if="leftList.length">
<view v-for="(item,index) in leftList" :key="index"
class="wf-itema" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="251" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
<!-- right -->
<view>
<view id="right" v-if="rightList.length">
<view v-for="(item,index) in rightList" :key="index"
class="wf-itemb" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="336" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
</view>
</template>
<script>
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue'
export default {
components: {
WaterfallsFlowItem
},
props: {
//
wfList: {
type: Array,
require: true
},
updateNum: {
type: Number,
default: 10
},
type: {
type: Number,
default: 0
},
isStore: {
type: [String, Number],
default: '1'
},
},
data() {
return {
allList: [], //
leftList: [], //
rightList: [], //
mark: 0, //
boxHeight: [], // 01
};
},
watch: {
//
wfList: {
handler(nVal,oVal){
// 使
if (!this.wfList.length ||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
this.allList = [];
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.mark = 0;
}
// waterfall
if (this.wfList.length) {
this.allList = this.wfList;
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.allList.forEach((v, i) => {
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
if(i % 2){
this.rightList.push(v);
}else{
this.leftList.push(v);
}
}
});
if(this.allList.length < 3){
this.mark = this.allList.length+1;
}else if(this.allList.length <= 7){
this.mark = this.allList.length - 1;
}else{
this.mark = this.allList.length - 2;
}
if(this.mark < this.allList.length){
this.waterFall()
}
}
},
immediate: true,
deep:true
},
// item
mark() {
const len = this.allList.length;
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
this.waterFall();
}
}
},
methods: {
//
waterFall() {
const i = this.mark;
if (i == 0) {
//
this.leftList.push(this.allList[i]);
//
this.getViewHeight(0);
} else if (i == 1) {
// item
this.rightList.push(this.allList[i]);
//
this.getViewHeight(1);
} else {
// item
if(!this.boxHeight.length){
this.rightList.length < this.leftList.length
? this.rightList.push(this.allList[i])
: this.leftList.push(this.allList[i]);
} else {
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
if (leftOrRight) {
this.rightList.push(this.allList[i])
} else {
this.leftList.push(this.allList[i])
}
}
//
this.getViewHeight();
}
},
//
getViewHeight() {
// 使nextTick
this.$nextTick(() => {
setTimeout(()=>{
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
res ? this.boxHeight[1] = res.height : '';
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
res ? this.boxHeight[0] = res.height : '';
this.mark = this.mark + 1;
}).exec();
}).exec();
},100)
})
},
// item
itemTap(item) {
this.$emit('itemTap', item)
},
// item
goShop(item) {
this.$emit('goShop', item)
}
}
}
</script>
<style lang="scss" scoped>
$page-padding: 10px;
$grid-gap: 5px;
.wf-page {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: $grid-gap;
}
.wf-itema {
width: 356rpx;
padding-bottom: $grid-gap;
}
.wf-itemb {
width: 356rpx;
padding-bottom: $grid-gap;
}
.wf-page1 .wf-item{
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding-bottom: 0;
}
.wf-item-page{
padding-bottom: 20rpx;
}
</style>

View File

@ -49,7 +49,7 @@
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
</view>
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论<text v-if="item.merchant" style="margin-left: 10rpx;">{{item.merchant.street_name}}</text></view>
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex" v-if="isStore != '1'">
@ -80,7 +80,7 @@ export default {
require: true
},
type: {
type: Number|String,
type: Number,
default: 0
},
isStore: {

View File

@ -1,226 +0,0 @@
<template>
<view class="wf-item-page" @click="gogogo(item)">
<view class='pictrue'>
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
<image :src="item.image" mode="aspectFill" class="item-img"></image>
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
</view>
<view class="title">{{item.store_name}}</view>
<!-- <view class="tag">
<view class="tag-one">
自营商品
</view>
<view class="tag-two">
<text class="tag-twoa"></text>
<text class="tag-twob">满20包邮</text>
</view>
</view> -->
<view class="relase">
<view class="relase-one">
{{item.rate}}
</view>
<view class="relase-two">
{{item.reply_count}}评论
</view>
<view class="relase-two">
{{item.merchant&&item.merchant.distance}}
</view>
<view class="relase-two">
{{item.merchant&&item.merchant.street_name}}
</view>
</view>
<view class="price">
<span></span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
</view>
<!-- <view class="item-info">
<view class="info-title" style="margin-right: 10rpx;">
{{item.merchant.mer_name}}
</view>
<view class="info-img">
<image src="@/static/images/you.png" mode="aspectFit"></image>
</view>
</view> -->
</view>
</template>
<script>
export default {
props: {
item: {
type: Object,
require: true
}
},
methods: {
gogogo(item) {
uni.navigateTo({
url: '/pages/goods_details/index?id=' + item.product_id
})
},
}
}
</script>
<style lang="scss" scoped>
.wf-item-page {
background: #fff;
overflow: hidden;
border-radius: 5px;
}
.pictrue {
width: 100% !important;
height: 345rpx;
image {
width: 100%;
height: 345rpx;
}
}
.item-info {}
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 14rpx 0;
margin-bottom: 0;
padding-right: 12rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-left: 21rpx;
}
.tag {
display: flex;
margin-left: 21rpx;
.tag-one {
text-align: center;
padding: 2rpx 9rpx;
border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 1px solid #3274F9;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-right: 15rpx;
}
.tag-two {
.tag-twoa {
width: 130rpx;
text-align: center;
padding-left: 15rpx;
padding-right: 7rpx;
border-radius: 11rpx 0px 0px 0rpx;
border: 1px solid #F84221;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
.tag-twob {
width: 130rpx;
text-align: center;
padding: 2rpx 9rpx;
border-radius: 0px 11rpx 11rpx 0px;
border: 1px solid #F84221;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
}
}
.relase {
display: flex;
flex-wrap: wrap;
margin-left: 21rpx;
margin-top: 12rpx;
min-height: 26rpx;
line-height: 26rpx;
.relase-one {
// font-style: italic;
transform: skewX(-15deg);
font-size: 26rpx;
font-family: SF Pro Display-Regular Italic, SF Pro Display;
font-weight: 600;
color: #FF6D20;
}
.relase-two {
font-size: 23rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #B3B3B3;
margin-left: 13rpx;
}
}
.price {
margin-left: 21rpx;
// margin-bottom: 10rpx;
color: #F84221;
font-size: 44rpx;
font-weight: 600;
span {
color: #F84221;
font-size: 30rpx;
font-weight: 500;
}
text {
color: #F84221;
font-size: 37rpx;
font-weight: 400;
}
}
.item-info {
margin-left: 21rpx;
margin-bottom: 25rpx;
display: flex;
width: 280rpx;
height: 39rpx;
line-height: 39rpx;
background: #F4F7FE;
border-radius: 19rpx 19rpx;
opacity: 1;
font-size: 23rpx;
padding-left: 11rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;
.info-img {
width: 21rpx;
height: 21rpx;
margin-top: 5rpx;
image {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -1,347 +0,0 @@
<template>
<view v-if="type == 0" class="wf-item-page wf-page0" :style="viewColor">
<view class='pictrue'>
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
</view>
<view class="text">
<view class='name line2'>{{item.store_name}}</view>
<view class="acea-row row-middle">
<view class='money'><text class='num'>{{item.price}}</text></view>
</view>
<view v-if="item.show_svip_info && item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags">
<!-- <text v-if="item.product_type == 0 && item.merchant.type_name" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.product_type == 0 && item.merchant.is_trader" class="font-bg-red b-color">自营</text> -->
<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<!-- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text> -->
</view>
</view>
</view>
<view v-else-if="type == 1" class="wf-page1" :style="viewColor">
<view class='pictrue'>
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
</view>
<view class='text'>
<view class='name line2'>{{item.store_name}}</view>
<view class='money'>
<text class='num'>{{item.price}}</text>
</view>
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price" class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags acea-row">
<!-- <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red b-color">自营</text> -->
<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<!-- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text> -->
</view>
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论<text v-if="item.merchant" style="margin-left: 10rpx;">{{item.merchant.street_name}}</text></view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.village_name}}</text>
<!-- <view class="flex" v-if="isStore != '1'">
进店
<text class="iconfont icon-xiangyou"></text>
</view> -->
</view>
</view>
<!-- 返佣 -->
<block v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)">
<view class="foot-bar">
<text class="iconfont icon-fenxiang"></text>
最高赚 ¥{{item.max_extension}}
</view>
</block>
</view>
</template>
<script>
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
import {mapGetters} from "vuex";
export default {
components:{easyLoadimage},
computed: mapGetters(['viewColor']),
props: {
item: {
type: Object,
require: true
},
type: {
type: Number|String,
default: 0
},
isStore: {
type: [String, Number],
default: '1'
},
isLogin: {
type: Boolean,
require: false
}
},
data(){
return {
}
},
methods: {
goShop(id) {
this.$emit('goShop', id);
},
authOpen(){
this.$emit('authOpen');
},
followToggle(item){
this.$emit('followToggle', item);
}
}
}
</script>
<style lang="scss" scoped>
.wf-item-page {
background: #fff;
overflow: hidden;
border-radius: 16rpx;
padding-bottom: 20rpx;
}
.wf-page0 .coupon{
background:rgba(255,248,247,1);
border:1px solid rgba(233,51,35,1);
border-radius:4rpx;
font-size:20rpx;
margin-left: 18rpx;
padding: 1rpx 4rpx;
}
.wf-page0 .pictrue{
width: 100%!important;
height: 345rpx;
position: relative;
/deep/image,/deep/.easy-loadimage,uni-image{
height: 345rpx;
border-radius: 16rpx 16rpx 0 0;
}
.border-picture {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0 0;
background: center/cover no-repeat;
}
}
.loadfail-img{
width: 100%;
height: 360rpx;
}
.svip{
margin: 5rpx 0 15rpx;
}
.vip-money {
color: #282828;
font-size: 22rpx;
margin-left: 6rpx;
font-weight: bold;
}
.vipImg {
width: 65rpx;
height: 28rpx;
margin-left: 4rpx;
image {
width: 100%;
height: 100%;
display: block;
}
}
.wf-page0 .name {
color: #282828;
margin: 20rpx 0 10rpx 0;
font-size: 13px;
overflow:hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-align: left;
}
.wf-page0 .text{
padding: 0 20rpx;
}
.wf-page0 .money {
font-size: 20rpx;
font-weight: bold;
color: var(--view-priceColor);
}
.b-color {
background-color: var(--view-theme);
border: 1px solid var(--view-theme);
}
.wf-page0 .money .num {
font-size: 34rpx;
}
.wf-page1 .wf-item{
.name{
font-size: 13px;
overflow:hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-align: left;
}
}
.wf-page1 .pictrue {
position: relative;
height: 345rpx;
width: 100%!important;
/deep/image,/deep/.easy-loadimage,uni-image{
height: 345rpx;
border-radius: 20rpx 20rpx 0 0;
}
.border-picture {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 20rpx 20rpx 0 0;
background: center/cover no-repeat;
}
}
.sell_out {
display: flex;
width: 150rpx;
height: 150rpx;
align-items: center;
justify-content: center;
border-radius: 100%;
background: rgba(0,0,0,.6);
color: #fff;
font-size: 30rpx;
position: absolute;
top: 50%;
left: 50%;
margin: -75rpx 0 0 -75rpx;
&::before{
content: "";
display: block;
width: 140rpx;
height: 140rpx;
border-radius: 100%;
border: 1px dashed #fff;
position: absolute;
top: 5rpx;
left: 5rpx;
}
}
.loading-img{
height: 345rpx;
max-height: 360rpx;
}
.wf-page1 .text {
padding: 20rpx 17rpx 26rpx 17rpx;
font-size: 30rpx;
color: #222;
}
.wf-page1 .text .money {
display: flex;
align-items: center;
font-size: 26rpx;
font-weight: bold;
margin-top: 8rpx;
color: var(--view-priceColor);
}
.wf-page1 .text .money .num {
font-size: 34rpx;
}
.item_tags{
margin-top: 8rpx;
display: flex;
}
.item_tags .tags_item {
display: flex;
font-size: 20rpx;
text-align: center;
border-radius: 5rpx;
padding: 0 4rpx;
height: 28rpx;
align-items: center;
justify-content: center;
margin-right: 8rpx;
}
.item_tags .tags_item.ticket{
color: var(--view-theme);
border: 1px solid var(--view-theme);
}
.item_tags .tags_item.delivery{
color: #FF9000;
border: 1px solid #FF9000;
}
.wf-page1 .text .money .ticket-big {
display: flex;
align-items: center;
justify-content: center;
max-width: 163rpx;
padding: 0 6rpx;
height: 28rpx;
margin-left: 10rpx;
background-image: url(~static/images/yh.png);
background-size: 100% 100%;
font-size: 20rpx;
font-weight: normal;
}
.wf-page1 .text .score {
margin-top: 10rpx;
color: #737373;
font-size: 20rpx;
}
.wf-page1 .text .company {
display: flex;
align-items: center;
color: #737373;
font-size: 20rpx;
margin-top: 10rpx;
.line1{
// max-width: 200rpx;
}
.flex {
display: flex;
align-items: center;
margin-left: 10rpx;
color: #282828;
.iconfont {
font-size: 16rpx;
margin-top: 4rpx;
}
}
}
.foot-bar {
width: 100%;
height: 52rpx;
display: flex;
align-items: center;
justify-content: center;
background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
border-radius: 0px 0px 16rpx 16rpx;
color: #fff;
font-size: 24rpx;
.icon-fenxiang {
font-size: 24rpx;
margin-right: 10rpx;
}
}
</style>

View File

@ -1,121 +0,0 @@
<template>
<view class="wf-item-page">
<view class='pictrue'>
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
<image :src="item.image[0]" mode="aspectFill" class="item-img"></image>
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
</view>
<view class="goods_item_img" v-if="item.video_link.length>0">
<image src="@/static/images/sp.png" mode="aspectFit"></image>
</view>
<view class="title">{{item.title}}</view>
<view class="item-info">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFit"
class="info-avatar" />
<view class="info-nickname">{{ item.author.nickname }}</view>
</view>
</view>
</template>
<script>
import {
string
} from '../../plugin/clipboard/clipboard'
export default {
props: {
item: {
type: Object,
require: true
},
heightx: {
type: string,
require: true
}
},
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.wf-item-page {
background: #fff;
overflow: hidden;
border-radius: 5px;
position: relative;
}
.pictrue {
width: 100% !important;
height: 345rpx;
image{
width: 100% ;
height: 345rpx;
}
}
.item-info {
display: flex;
align-items: center;
padding: 5px;
}
.goods_item_img {
position: absolute;
top: 20rpx;
right: 18rpx;
width: 52rpx;
height: 52rpx;
z-index: 1 !important;
image {
width: 100%;
height: 100%;
}
}
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 12px 0;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
padding: 0 5px;
}
.info-avatar {
width: 49rpx;
height: 49rpx;
border-radius: 50%;
margin-right: 5px;
}
.info-nickname {
font-size: 12px;
color: #333;
}
</style>

View File

@ -1,102 +0,0 @@
<template>
<view class="a_c_home">
<view class="c_card">
<view class="c_content">
<scroll-view style="height: 100%;" scroll-y>
<view v-if="info.content" v-html="info.content.content"></view>
</scroll-view>
</view>
<view class="btn_box">
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn1.webp"></image>
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn2.webp"></image>
</view>
</view>
<image class="head_img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_head.webp" info="活动标题"></image>
<image class="close_img" @click="close" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png" info="关闭按钮"></image>
</view>
</template>
<script>
import { getArticleList } from "@/api/api.js"
export default {
data(){
return {
info: ''
}
},
created() {
this.getArticleList();
},
methods:{
close(){
this.$emit('close');
},
open(){
uni.navigateTo({
url: '/pages/newActivity/activityDetail/activityDetail'
})
},
getArticleList(){
getArticleList(25).then(res=>{
this.info = res.data.list[0]
})
}
}
}
</script>
<style lang="scss">
.a_c_home{
width: 600rpx;
height: 90vh;
// border: 1px solid red;
position: relative;
.head_img{
width: 568rpx;
height: 207rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%);
}
.c_card{
height: calc(100% - 300rpx);
width: 100%;
background-color: #fff;
position: absolute;
border-radius: 50rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 30rpx;
padding-top: 70rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.c_content{
height: calc(100% - 220rpx);
width: 100%;
// background-color: #eee;
}
.btn_box{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.btn_img{
width: 461rpx;
height: 100rpx;
}
}
}
.close_img{
position: absolute;
bottom: 60rpx;
left: 50%;
transform: translate(-50%);
width: 60rpx;
height: 60rpx;
}
}
</style>

View File

@ -1,62 +0,0 @@
<template>
<view class="a_h_home">
<view class="a_h_body" v-if="show">
<image @click.stop="open()" class="a_h_bg" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_card.webp"></image>
<image v-if="showClose" @click.stop="close()" class="a_h_close" src="../static/images/wt_close.png"></image>
</view>
</view>
</template>
<script>
export default {
props:{
showClose: {
type: Boolean,
default: true
}
},
data(){
return {
show: true
}
},
methods:{
open(){
this.$emit('click');
},
close(){
this.show = false;
}
}
}
</script>
<style lang="scss">
.a_h_home{
position: fixed;
bottom: 25vh;
right: 30rpx;
z-index: 10;
width: 180rpx;
// height: 150rpx;
.a_h_bg{
height: 100%;
width: 100%;
}
.a_h_body{
width: 100%;
height: 100%;
// background-color: #eee;
position: relative;
.a_h_close{
position: absolute;
right: 5rpx;
top: 5rpx;
width: 30rpx;
height: 30rpx;
background-color: rgba(#000, 0.4);
border-radius: 50%;
}
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<view :style="viewColor" @touchmove.stop.prevent="()=>{}">
<view :style="viewColor">
<view class="add_invoicing" :class="invoice.invoice==true?'on':''">
<view class='title'>选择发票<text class='iconfont icon-guanbi' @tap='close'></text></view>
<form @submit="formSubmit" report-submit="true">
@ -302,15 +302,11 @@
this.popupTitle = false;
},
changeHeader(e) {
console.log(e);
this.receipt_title_type = e.detail.value;
if(e.detail.value == 1){
this.receipt_type = 1;
this.typeName = '增值税电子普通发票'
}else {
this.receipt_type = 2;
this.typeName = '增值税专用发票'
}
}
this.receipt_type
},
changeDefault(e) {

View File

@ -8,7 +8,7 @@
<text class='iconfont icon-ditu' :class='active==index?"t-color":""'></text>
<view class='address'>
<view class='name' :class='active==index?"t-color":""'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.brigade}}{{item.detail}}</view>
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.detail}}</view>
</view>
<text class='iconfont icon-complete' :class='active==index?"t-color":""'></text>
</view>
@ -18,7 +18,7 @@
<image src='../../static/images/noAddress.png'></image>
<view>暂无地址</view>
</view>
<view class='addressBnt' @tap='goAddressPages'>添加/编辑地址</view>
<view class='addressBnt' @tap='goAddressPages'>添加地址</view>
</view>
<view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view>
</view>

View File

@ -36,7 +36,7 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {getAddressList} from '@/api/user.js';
import { getCityV2,village } from '@/api/api.js';
import { getCityV2 } from '@/api/api.js';
import { mapGetters } from "vuex";
const CACHE_ADDRESS = {};
export default {
@ -87,74 +87,25 @@
this.loadAddress(0)
},
methods: {
change(pid){
change(pid,index){
if(this.selectedIndex == index) return;
if(pid === -1){
pid = this.selectedArr.length ? this.selectedArr[this.selectedArr.length -1].id : 0;
}
console.log(index)
this.selectedIndex = index;
this.loadAddress(pid);
},
loadAddress(pid,type){
loadAddress(pid){
if(CACHE_ADDRESS[pid]){
this.addressList = CACHE_ADDRESS[pid];
return ;
}
this.is_loading = true;
// getCityV2(pid).then(res=>{
// this.is_loading = false;
// CACHE_ADDRESS[pid] = res.data;
// this.addressList = res.data;
// })
if(type=='province'){
village({province_code:pid}).then(res=>{
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
}else if(type=='city'){
village({city_code:pid}).then(res=>{
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
}else if(type=='area'){
village({area_code:pid}).then(res=>{
if(res.data.length>0){
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
}else{
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
})
}else if(type=='street'){
village({street_code:pid}).then(res=>{
if(res.data.length>0){
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
}else{
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
})
}else{
village().then(res=>{
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
}
getCityV2(pid).then(res=>{
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
this.goTop()
},
selected(item){
@ -163,49 +114,17 @@
this.selectedArr.splice(this.selectedIndex + 1,999)
this.selectedArr[this.selectedIndex] = item;
this.selectedIndex = -1;
}
// else if(!item.parent_id){
// this.selectedArr = [item];
// }else{
// this.selectedArr.push(item);
// }
else if(!item.id){
}else if(!item.parent_id){
this.selectedArr = [item];
}else{
if(this.selectedArr.length>4){
let arry=[]
arry.push(item)
this.selectedArr=arry
}else{
this.selectedArr.push(item);
}
this.selectedArr.push(item);
}
if(item.type=="province"){
this.loadAddress(item.code,"province");
}else if(item.type=="city"){
this.loadAddress(item.code,"city");
}else if(item.type=="area"){
this.loadAddress(item.code,"area");
}else if(item.type=="street"){
this.loadAddress(item.code,"street");
if(item.snum){
this.loadAddress(item.id);
} else {
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
// if(item.snum){
// this.loadAddress(item.id);
// } else {
// this.$emit('submit', [...this.selectedArr]);
// this.$emit('changeClose');
// }
this.goTop()
},
close: function() {

View File

@ -457,8 +457,9 @@
.foot_bar {
width: 100%;
position: fixed;
// bottom: 54px;
bottom: 122.81rpx;
left: 0;
background: #ffffff;
padding: 20rpx 0;
z-index: 5;

View File

@ -9,10 +9,9 @@
<view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view>
</view>
<view class="box">
<view class="check-item" v-for="(item,index) in radioList" :key="index"
:class="{on:index == radioIndex}">
<view class="check-item" v-for="(item,index) in radioList" :key="index" :class="{on:index == radioIndex}">
<view>{{item.title}}</view>
<view class="radio" @click="bindCheck(item,index)">
<view class="radio" @click="bindCheck(item,index)">
<block v-if="index == newData.order.isTake">
<view class="iconfont icon-xuanzhong1"></view>
</block>
@ -40,79 +39,77 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
mapGetters
} from "vuex";
export default {
name: 'checkDelivery',
props: {
isShowBox: {
type: Boolean,
default: false
import { mapGetters } from "vuex";
export default{
name:'checkDelivery',
props:{
isShowBox:{
type:Boolean,
default:false
},
activeObj: {
type: Object,
default: function() {
activeObj:{
type:Object,
default:function(){
return {}
}
},
deliveryName: {
type: String,
default: '快递配送'
deliveryName:{
type:String,
default:'快递配送'
},
radioList: {
type: Array,
default: [{
title: '快递配送',
check: true
radioList:{
type:Array,
default: [
{
title:'快递配送',
check:true
},
{
title: '到店核销',
check: false
title:'到店核销',
check:false
}
],
},
},
computed: mapGetters(['viewColor']),
data() {
data(){
return {
radioIndex: 0,
oldRadioIndex: '', //
newData: {}
radioIndex:0,
oldRadioIndex:'', //
newData:{}
}
},
created() {
this.newData = JSON.parse(JSON.stringify(this.activeObj))
},
methods: {
methods:{
//
closeShowBox() {
closeShowBox(){
this.$emit('close')
},
//
bindCheck(item, index) {
bindCheck(item,index){
this.newData.order.isTake = index
},
confirmBtn() {
this.$emit('confirmBtn', this.newData)
confirmBtn(){
this.$emit('confirmBtn',this.newData)
}
}
}
</script>
<style lang="scss">
.mask-box {
.bg {
.mask-box{
.bg{
z-index: 30;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
background: rgba(0,0,0,0.5);
}
.mask-content {
.mask-content{
z-index: 40;
position: fixed;
left: 0;
@ -122,54 +119,45 @@
border-radius: 16rpx 16rpx 0 0;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
.title-bar {
.title-bar{
position: relative;
text-align: center;
padding: 30rpx 0;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #282828;
.close {
.close{
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
.iconfont {
.iconfont{
color: #8A8A8A;
}
}
}
.box {
.box{
padding: 0 30rpx;
.check-item {
.check-item{
display: flex;
align-items: center;
justify-content: space-between;
height: 40rpx;
margin-bottom: 50rpx;
font-size: 28rpx;
.iconfont {
.iconfont{
font-size: 38rpx;
color: #CCCCCC;
&.icon-xuanzhong1 {
&.icon-xuanzhong1{
color: var(--view-theme);
}
}
}
}
.foot {
.foot{
padding: 15rpx 30rpx;
border-top: 1px solid #F5F5F5;
.btn {
.btn{
width: 100%;
height: 70rpx;
line-height: 70rpx;
@ -180,10 +168,9 @@
background: var(--view-theme);
}
}
}
}
}
.animated {
animation-duration: .3s
}
</style>
</style>

View File

@ -1,129 +0,0 @@
<template>
<!-- tab选项卡滑动切换 -->
<view class="my-tab" ref="myTabRef">
<view class="my-tab-item" v-for="(item, index) in tabs" :ref="`tab${item.name}Ref`"
:class="{ active: item.name === activeItem }" :key="index">
<view class="my-tab-text" ref="tabName" @click="tabClick(item,index)">
<view class="name">{{ item.label }}</view>
<view class="xian" v-if='isshow'></view>
</view>
</view>
</view>
</template>
<script>
/*
tabs -- 传入标签名 array类型 : tabs: [{name: "tabOne",label: "全部"},{...}]
activeItem -- 默认第一个class名 string
@tabClick -- 自定义点击事件 回传用到 做逻辑判断
标签大小默认颜色选中颜色下边框线等样式已在css中注释请根据注释修改即可
*/
export default {
name: "cx-navTitle",
props: {
tabs: { //
type: Array,
default: []
},
activeItem: { // class
type: String,
default: ''
},
show: {
type: Boolean,
default: ''
},
},
data() {
return {
isshow: true,
};
},
mounted() {
this.isshow = this.show
},
methods: {
// tab
tabClick(item, index) {
this.$emit('tabClick', item) //
//
this.scrollLeftTo(item.name);
},
//
scrollLeftTo(name) {
const ref = `tab${name}Ref`;
// myTabRefDOMmy-tab
const nav = this.$refs.myTabRef.$el;
// tabDOMmy-tab-item
const title = this.$refs[ref][0].$el;
//
// #ifdef H5
const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
nav.scrollLeft = to;
// #endif
},
},
};
</script>
<style lang="scss">
.my-tab {
width: 720rpx;
margin: 0 auto;
// height:80rpx;
// background: #ffffff;
// line-height:80rpx;
// border:1px solid red;
display: flex;
overflow-x: scroll;
padding-right: 0rpx;
scroll-behavior: smooth; //
font-size: 32rpx;
font-family: PingFang-SC-Heavy;
.my-tab-item {
padding: 20rpx 35rpx; // --
color: #707070; // --
// height: 0rpx;
text-align: center;
flex: 1 0 auto;
&.active {
color: #333333; // --
font-family: PingFang-SC-Heavy;
font-weight: 600;
position: relative;
.my-tab-text {
.xian {
position: relative;
top: 0rpx; //线 --
z-index: 8;
width: 26px;
margin: 0 auto;
border: 1rpx solid #F84221; //线 --
border-radius: 50rpx;
padding: 0rpx 30rpx;
opacity: 0.6; //线 --
}
.name {
position: relative;
z-index: 9;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #F84221;
color: #F84221;
}
}
}
}
}
//
::-webkit-scrollbar {
height: 0;
width: 0;
color: transparent;
}
</style>

View File

@ -1,448 +0,0 @@
<template>
<view
class="e-stat__select"
:style="{ width: width, minWidth: minWidth }">
<!-- 主体区域 -->
<view class="e-select-main">
<view
class="e-select"
:class="{ 'e-select-disabled': disabled }">
<view
class="e-select__input-box"
@click="toggleSelector">
<!-- 微信小程序input组件在部分安卓机型上会出现文字重影placeholder抖动问题2019年时微信小程序就有这个问题一直没修复估计短时间内也别指望修复了 -->
<input
class="e-select__input-text"
:placeholder="placeholder"
v-model="currentData"
@input="filter"
v-if="search && !disabled" />
<view
class="e-select__input-text"
v-else>
{{ currentData || currentData === 0 ? currentData : placeholder }}
</view>
<!-- 用一个更大的盒子包裹图标,便于点击 -->
<view
class="e-select-icon"
@click.stop="clearVal"
v-if="currentData && clear && !disabled">
<uni-icons
type="clear"
color="#e1e1e1"
size="18"></uni-icons>
</view>
<view
class="e-select-icon"
@click.stop="toggleSelector"
v-else>
<uni-icons
size="14"
color="#999"
type="top"
class="arrowAnimation"
:class="showSelector ? 'top' : 'bottom'"></uni-icons>
</view>
</view>
<!-- 全屏遮罩-->
<view
class="e-select--mask"
v-if="showSelector"
@click="toggleSelector" />
<!-- 选项列表 这里用v-show是因为微信小程序会报警告 [Component] slot "" is not foundv-if会导致开发工具不能正确识别到slot -->
<!-- https://developers.weixin.qq.com/community/minihome/doc/000c8295730700d1cd7c81b9656c00 -->
<view
class="e-select__selector"
v-show="showSelector">
<!-- 三角小箭头 -->
<view class="e-popper__arrow"></view>
<scroll-view
scroll-y="true"
:scroll-top="scrollTop"
class="e-select__selector-scroll"
:scroll-into-view="scrollToId"
:scroll-with-animation="scrollWithAnimation"
v-if="showSelector">
<view
class="e-select__selector-empty"
v-if="currentOptions.length === 0">
<text>{{ emptyTips }}</text>
</view>
<!-- 非空,渲染选项列表 -->
<view
v-else
class="e-select__selector-item"
:class="[
{ highlight: currentData == item[props.text] },
{
'e-select__selector-item-disabled': item[props.disabled],
},
]"
v-for="(item, index) in currentOptions"
:key="index"
@click="change(item, index)">
<text>{{ item[props.text] }}</text>
<view
id="scrollToId"
v-if="currentData == item[props.text]"></view>
</view>
</scroll-view>
<slot />
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'e-select',
data() {
return {
//
showSelector: false,
//
currentOptions: [],
//
currentData: '',
//
oldScrollTop: 0,
//
scrollTop: 0,
// id
scrollToId: '',
//
scrollWithAnimation: false,
};
},
props: {
//
options: {
type: Array,
default() {
return [];
},
},
//
props: {
type: Object,
default: function () {
return {
text: 'text',
value: 'value',
disabled: 'disabled',
};
},
},
// vue2 v-model
value: {
type: [String, Number],
default: '',
},
// vue3 v-model
modelValue: {
type: [String, Number],
default: '',
},
//
placeholder: {
type: String,
default: '请选择',
},
//
width: {
type: String,
default: '100%',
},
//
minWidth: {
type: String,
default: '120rpx',
},
//
emptyTips: {
type: String,
default: '暂无选项',
},
//
clear: {
type: Boolean,
default: false,
},
//
disabled: {
type: Boolean,
default: false,
},
//
search: {
type: Boolean,
default: true,
},
//
animation: {
type: Boolean,
default: true,
},
},
watch: {
options: {
handler() {
this.currentOptions = this.options;
this.initData();
},
immediate: true,
deep: true,
},
modelValue: {
handler() {
this.initData();
},
immediate: true,
},
value: {
handler() {
this.initData();
},
immediate: true,
},
},
methods: {
/** 处理数据此函数用于兼容vue2 vue3 */
initData() {
this.currentData = '';
// vue2
if (this.value || this.value === 0) {
for (let item of this.options) {
if (item[this.props.value] === this.value) {
this.currentData = item[this.props.text];
this.$emit('getText', this.currentData);
return;
}
}
}
// vue3
if (this.modelValue || this.modelValue === 0) {
for (let item of this.options) {
if (item[this.props.value] === this.modelValue) {
this.currentData = item[this.props.text];
this.$emit('getText', this.currentData);
return;
}
}
}
},
/** 过滤选项列表,会自动回到顶部 */
filter() {
this.$emit('getText', this.currentData);
if (this.currentData) {
this.currentOptions = this.options.filter((item) => {
return item[this.props.text].indexOf(this.currentData) > -1;
});
} else {
this.currentOptions = this.options;
}
// scrollTop
this.scrollTop = 1;
this.$nextTick(() => {
this.scrollTop = 0;
});
},
/** 改变值 */
change(item, index) {
if (item[this.props.disabled]) return;
const data = {
...item,
index,
};
this.$emit('change', data);
this.emit(data);
this.toggleSelector();
},
/** 传递父组件值 */
emit(item) {
this.$emit('input', item[this.props.value]);
this.$emit('update:modelValue', item[this.props.value]);
},
/** 清空值 */
clearVal() {
this.$emit('change', 'clear');
this.$emit('input', '');
this.$emit('update:modelValue', '');
},
/** 切换下拉显示 */
toggleSelector() {
if (this.disabled) return;
this.showSelector = !this.showSelector;
if (this.showSelector) {
this.currentOptions = this.options;
// scrollToIdscroll-to-view
this.scrollToId = '';
this.$nextTick(() => {
this.scrollToId = 'scrollToId';
// filter
if (this.animation) {
setTimeout(() => {
//
this.scrollWithAnimation = true;
}, 100);
}
});
} else {
//
this.scrollWithAnimation = false;
}
},
},
};
</script>
<style lang="scss" scoped>
.e-stat__select {
display: flex;
align-items: center;
cursor: pointer;
box-sizing: border-box;
width: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.e-select-main {
width: 100%;
}
.e-select-disabled {
background-color: #f5f7fa;
cursor: not-allowed;
}
.e-select {
font-size: 14px;
box-sizing: border-box;
border-radius: 4px;
padding: 0 5px;
position: relative;
display: flex;
user-select: none;
flex-direction: row;
align-items: center;
border: 1px solid #dcdfe6;
border-bottom: solid 1px #dddddd;
.e-select__input-box {
width: 100%;
min-height: 34px;
position: relative;
display: flex;
flex: 1;
flex-direction: row;
align-items: center;
.e-select-icon {
width: 50px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.arrowAnimation {
transition: transform 0.3s;
}
.top {
transform: rotateZ(0deg);
}
.bottom {
transform: rotateZ(180deg);
}
.e-select__input-text {
color: #303030;
padding-left: 7px;
width: 100%;
color: #333;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
overflow: hidden;
}
.e-select__input-placeholder {
padding-left: 7px;
color: #666;
}
}
.e-select--mask {
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 999;
}
.e-select__selector {
box-sizing: border-box;
position: absolute;
top: calc(100% + 12px);
left: 0;
width: 100%;
background-color: #ffffff;
border: 1px solid #ebeef5;
border-radius: 6px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 999;
padding: 4px 4px;
transition: all 2s;
.e-popper__arrow,
.e-popper__arrow::after {
position: absolute;
display: block;
width: 0;
height: 0;
left: 50%;
border-color: transparent;
border-style: solid;
border-width: 6px;
}
.e-popper__arrow {
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
top: -6px;
left: 50%;
transform: translateX(-50%);
margin-right: 3px;
border-top-width: 0;
border-bottom-color: #ebeef5;
}
.e-popper__arrow::after {
content: ' ';
top: 1px;
margin-left: -6px;
border-top-width: 0;
border-bottom-color: #fff;
}
.e-select__selector-scroll {
max-height: 200px;
box-sizing: border-box;
.e-select__selector-empty,
.e-select__selector-item {
display: flex;
cursor: pointer;
line-height: 34px;
font-size: 14px;
text-align: center;
padding: 0px 10px;
}
.e-select__selector-item:hover {
background-color: #f9f9f9;
}
.e-select__selector-empty:last-child,
.e-select__selector-item:last-child {
border-bottom: none;
}
.e-select__selector-item-disabled {
color: #b1b1b1;
cursor: not-allowed;
}
.highlight {
color: #409eff;
font-weight: bold;
background-color: #f5f7fa;
border-radius: 3px;
}
}
}
}
</style>

View File

@ -1,169 +0,0 @@
<template>
<view class="men-ban box " v-if ='isShow' @touchmove.stop.prevent="">
<view class="box_next">
<view class="box_next_title">
<text class="box_next_title_z">{{title}}</text>
</view>
<slot></slot>
<view class="box_next_but_d" v-if="isBut">
<view @click='show' class="box_next_but_d_but">
<text class="box_next_but_d_but_text">{{nName}}</text>
</view>
</view>
<view class="box_next_but_s" v-else>
<view class="box_next_but_s_lbut" @click="lEvent">
<text class="box_next_but_d_but_text">{{lName}}</text>
</view>
<view @click="rEvent" class="box_next_but_s_rbut" hover-class="zcolor-while1">
<text class="box_next_but_d_but_text">{{rName}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: "温馨提示"
},
isShow: {
type: Boolean,
default: true
},
nName: String,
lName: String,
rName: String,
isBut: {
type: Boolean,
default: true
}
},
methods: {
show() {
this.$emit('show');
},
lEvent() {
this.$emit('lEvent');
},
rEvent() {
this.$emit('rEvent');
},
}
}
</script>
<style scoped>
.men-ban {
position: fixed;
bottom: 0;
right: 0;
left: 0;
top: 0;
z-index: 999999;
background-color: rgba(0, 0, 0, 0);
}
.box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
}
.box_next {
background-color: #ffffff;
width: 550rpx;
border-radius: 30rpx;
}
.box_next_title {
padding: 30rpx 30rpx 0 30rpx;
}
.box_next_title_z {
font-size: 31rpx;
font-weight: bold;
}
.box_next_but_d {
width: 550rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 130rpx;
}
.box_next_but_d_but {
width: 500rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 80rpx;
border-radius: 50rpx;
background-color: #fee610;
}
.box_next_but_d_but_text {
font-size: 30rpx;
font-weight: bold;
}
.box_next_but_s {
width: 550rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 130rpx;
}
.box_next_but_s_lbut {
width: 200rpx;
background-color: #f1f1f1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 80rpx;
border-radius: 50rpx;
}
.box_next_but_s_rbut {
width: 200rpx;
background-color: #fee610;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 80rpx;
border-radius: 50rpx;
}
</style>

View File

@ -1,213 +0,0 @@
<template>
<view>
<block>
<view class='lists'>
<view v-for="(item,index) in productList" class="card" :key="index" @click="godDetail(item)">
<view class='pictrue on'>
<u-image :src='item.image' width="336.45rpx" height="336.45rpx"> </u-image>
</view>
<view class="goods_content">
<view class='name line1'>
<text class="text-ellipsis">{{item.store_name}}</text>
</view>
<view class="item_tags">
<text v-if="item.merchant.type_name && item.product_type == 0"
class="store_type">{{item.merchant.type_name}}</text>
<text v-else-if="item.merchant.is_trader && item.product_type == 0"
class="store_type">自营</text>
<text v-if="item.product_type != 0"
:class="'font_bg-red bt-color type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
</view>
<view class="score"><text
style="font-style: italic;color: #FF6D20;margin-right: 20rpx;font-size: 30rpx;">{{item.rate}}</text>
{{item.reply_count}}评论
</view>
<view class='money'>
<text
class='num'>{{item.price.substring(0, item.price.length - 2)}}</text><text>{{item.price.slice(-2)}}</text>
</view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex">
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
</view>
<!-- 返佣 -->
<!-- <block v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)">
<view class="foot-bar on">
最高赚 ¥{{item.max_extension}}
</view>
</block> -->
</view>
</view>
<!-- <view class='noCommodity' v-if="productList.length==0">
<view class='pictrue' style=" margin: 60rpx auto;">
<image src='/static/images/noCart.png'></image>
<view>暂无商品</view>
</view>
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
</view> -->
</block>
</view>
</template>
<script>
import {
cloudWarehouse
} from '@/api/api.js'
import {
goShopDetail
} from '@/libs/order.js'
export default {
name: "goodsCard",
props: {
where: {
type: Object,
required: true
}
},
data() {
return {
is_switch: false,
productList: "",
};
},
mounted() {
this.$watch('where', (newValue, oldValue) => {
newValue.category_id ? this.get_product_list() : this.productList = []
}, {
deep: true
});
},
methods: {
test() {
// this.get_product_list()
// console.log(this.where)
},
godDetail(item) {
goShopDetail(item, this.uid).then(res => {
if (this.isLogin) {
initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id;
uni.hideLoading();
uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + id
});
}).catch((err) => {
uni.showToast({
title: err,
icon: 'none'
})
});
} else {
this.isAuto = true;
this.isShowAuth = true
}
})
},
//
goShop(id) {
if (this.hide_mer_status != 1) {
uni.navigateTo({
url: `/pages/store/home/index?id=${id}`
})
}
},
get_product_list: function() {
let that = this;
cloudWarehouse(that.where).then(res => {
that.productList = res.data.list
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
}
}
</script>
<style lang="scss" scoped>
.lists {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
background-color: #F4F7FE;
.card {
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
overflow: hidden;
margin-top: 20rpx;
background-color: white;
// width: 336.45rpx;
.store_type {
background: linear-gradient(to bottom, #6DD5FA, #3274F9);
color: white;
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
padding: 2rpx 8rpx;
font-size: 22rpx;
}
.goods_content {
background-color: white;
padding: 25rpx 15rpx;
}
.name {
font-weight: bold;
.textellipsis {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
// font-weight: bold;
}
}
.item_tags {
margin: 5rpx 0;
}
.score {
color: #B3B3B3;
font-size: 22.78rpx;
}
.money {
color: red;
margin: 5rpx 0;
.num {
font-size: 36rpx;
font-weight: bold;
}
}
.company {
background-color: #F4F7FE;
display: flex;
justify-content: space-between;
padding: 5rpx 14rpx;
border-radius: 19.28rpx 19.28rpx 19.28rpx 19.28rpx;
}
// width: 40vw;
}
}
</style>

View File

@ -22,7 +22,6 @@
<trees :nodes="nodes" :lazy-load="lazyLoad" :loadVideo="loadVideo" />
<image v-for="(item, index) in imgs" v-bind:key="index" :id="index" :src="item" hidden @load="_load" />
<!--#endif-->
<image v-for="(item, index) in imgs" v-bind:key="index" :id="index" :src="item" hidden @load="_load" />
</view>
<!--#endif-->
</view>
@ -65,7 +64,7 @@
src: '',
height: 1,
// #endif
// #ifndef APP-PLUS-NVUE
// #ifndef APP-PLUS-NVUE
scaleAm: '',
showAm: '',
imgs: [],

View File

@ -18,33 +18,28 @@
<view class="price"><text>{{item.spu && item.spu.price}}</text></view>
<view class="buy-btn">立即购买</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class='mask' style="height: 100vh;" catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup">
</view>
</view>
<view class='mask' catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup"></view>
</view>
</template>
<script>
import {
goShopDetail
} from '@/libs/order.js'
import {
mapGetters
} from "vuex";
import { goShopDetail } from '@/libs/order.js'
import { mapGetters } from "vuex";
export default {
computed: {
computed:{
...mapGetters(['viewColor']),
},
props: {
props:{
list: {
type: Array,
default: []
@ -55,9 +50,9 @@
isHome: {
type: Boolean,
default: false
}
}
},
data() {
data() {
return {
popup: {
show: false
@ -68,12 +63,11 @@
//
closePopup() {
this.$set(this.popup, 'show', false);
this.$emit("closes")
},
showPopup() {
this.$set(this.popup, 'show', true);
},
goDetail(item) {
goDetail(item){
if (item.product_type === 1) {
uni.navigateTo({
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
@ -85,150 +79,130 @@
} else if (item.product_type === 0) {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
})
} else if (item.product_type === 4) {
})
}else if (item.product_type === 4) {
uni.navigateTo({
url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
})
} else if (item.product_type === 40) {
}else if (item.product_type === 40) {
uni.navigateTo({
url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
})
}
}
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
bottom: 0;
width: 100%;
left: 0;
background-color: #ffffff;
z-index: 77;
border-radius: 16rpx 16rpx 0 0;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
max-height: 1000rpx;
&.on {
transform: translate3d(0, 0, 0);
.container{
position: fixed;
bottom: 0;
width: 100%;
left: 0;
background-color: #ffffff;
z-index: 77;
border-radius: 16rpx 16rpx 0 0;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
max-height: 1000rpx;
&.on {
transform: translate3d(0, 0, 0);
}
.header{
position: relative;
padding: 40rpx 30rpx;
.title{
color: #282828;
font-size: 30rpx;
}
.header {
position: relative;
padding: 40rpx 30rpx;
.title {
color: #282828;
font-size: 30rpx;
}
.iconfont {
color: #8A8A8A;
font-size: 28rpx;
position: absolute;
top: 0;
right: 0;
}
.icon-guanbi5 {
right: 20rpx;
color: #8a8a8a;
font-size: 30rpx;
line-height: 30rpx;
top: 20rpx;
background-color: transparent;
font-weight: normal;
.iconfont{
color: #8A8A8A;
font-size: 28rpx;
position: absolute;
top: 0;
right: 0;
}
.icon-guanbi5 {
right: 20rpx;
color: #8a8a8a;
font-size: 30rpx;
line-height: 30rpx;
top: 20rpx;
background-color: transparent;
font-weight: normal;
}
}
scroll-view{
max-height: 800rpx;
}
.main_count{
padding: 0 30rpx 30rpx;
max-height: 800rpx;
overflow-y: scroll;
/* #ifndef MP */
&.mb90{
margin-bottom: 90rpx;
}
/* #endif */
.list{
margin-bottom: 40rpx;
height: auto;
flex-direction: row;
&:last-child{
margin-bottom: 0;
}
}
scroll-view {
max-height: 800rpx;
}
.main_count {
padding: 0 30rpx 30rpx;
max-height: 800rpx;
overflow-y: scroll;
/* #ifndef MP */
&.mb90 {
margin-bottom: 90rpx;
.pro_list{
display: flex;
flex-direction: row;
.picture,.image,uni-image{
width: 200rpx;
height: 200rpx;
border-radius: 16rpx;
}
/* #endif */
.list {
margin-bottom: 40rpx;
height: auto;
flex-direction: row;
&:last-child {
margin-bottom: 0;
.info{
margin-left: 30rpx;
position: relative;
.bottom{
display: flex;
justify-content: space-between;
align-items: center;
width: 460rpx;
position: absolute;
left: 0;
bottom: 10rpx;
flex-direction: row;
}
}
.pro_list {
display: flex;
flex-direction: row;
.picture,
.image,
uni-image {
width: 200rpx;
height: 200rpx;
border-radius: 16rpx;
.name{
color: #282828;
font-size: 30rpx;
line-height: 45rpx;
display: -webkit-box;
width: 460rpx;
}
.info {
margin-left: 30rpx;
position: relative;
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
width: 460rpx;
position: absolute;
left: 0;
bottom: 10rpx;
flex-direction: row;
}
.name {
color: #282828;
font-size: 30rpx;
line-height: 45rpx;
display: -webkit-box;
width: 460rpx;
}
.price {
color: var(--view-priceColor);
font-size: 26rpx;
font-weight: bold;
flex-direction: row;
align-items: flex-end;
text {
font-size: 34rpx;
}
}
.buy-btn {
color: #fff;
background: var(--view-theme);
border-radius: 28.04rpx 28.04rpx 28.04rpx 28.04rpx;
width: 154.21rpx;
height: 57.83rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
.price{
color: var(--view-priceColor);
font-size: 26rpx;
font-weight: bold;
flex-direction: row;
align-items: flex-end;
text{
font-size: 34rpx;
}
}
.buy-btn{
color: #fff;
background: var(--view-theme);
border-radius: 26rpx;
width: 140rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
}
}
}
}
</style>
}
</style>

View File

@ -1,183 +0,0 @@
<template>
<view class="msg-view">
<scroll-view class="msg-view-p" scroll-y="true" :scroll-top="msgPanelScrollTop">
<view id="chatArea">
<view class="chat-area-line" v-for="(item,index) in msgList">
<view class="system-msg"
:style="{'flex-direction':((item.userName.length + item.content.length)<15?'row':'')}"
v-if="item.msg_type == 'system'">
<view class="system-msg-detail ">
<text class="system-msg-detail-username " v-for="i in item.userName">{{i}}</text>
<text class="system-msg-detail-content " v-for="i in ':'">{{i}}</text>
<text class="system-msg-detail-content " v-for="i in item.content">{{i}}</text>
</view>
</view>
<view class="user-msg"
:style="{'flex-direction':((item.userName.length + item.content.length)<15?'row':'')}" v-else>
<view class="user-msg-detail">
<view class="user-msg-detail-tag">
<!-- <text style="text-align: center;font-size: 20px;color: #DD524D;">1</text> -->
<!-- 这里可以根据用户等级显示图片 -->
<image :src="item.avatar" class="user-msg-detail-tag"></image>
</view>
<text class="user-msg-detail-username" v-for="i in item.userName"
@click="test(item.userName)">{{i}}</text>
<text class="user-msg-detail-content" v-for="i in ':'">{{i}}</text>
<text class="user-msg-detail-content" v-for="i in item.content">{{i}}</text>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
name: 'MhMsgList',
props: {
msgList: {
type: [Object, Array],
default: [{
userName: "系统通知",
content: "直播倡导绿色直播,严禁发布涉黄涉毒涉赌,严禁发布涉政、违法及低俗违规内容。健康直播,文明互动",
cmd: "say",
msg_type: "system"
}, ]
},
msgPanelScrollTop: {
type: [Number, String],
default: 0
}
},
mounted() {
},
methods: {
test(e) {
uni.showToast({
title: e,
icon: 'none'
})
},
setMsgPanelScroll() {
var that = this;
setTimeout(function() {
const query = uni.createSelectorQuery().in(that);
query.select('#chatArea').boundingClientRect(data => {
that.msgPanelScrollTop = data.height - 200;
}).exec();
}, 50)
},
}
}
</script>
<style lang="scss" scoped>
.msg-view-p {
display: flex;
width: 550rpx;
height: 550rpx;
}
.chat-area-line {
width: 550upx;
flex-direction: row;
margin-bottom: 5upx;
}
.system-msg {
width: 550upx;
margin-bottom: 5upx;
}
.system-msg-detail {
// max-width: 550upx;
padding: 10upx;
border-radius: 30upx;
background-color: rgba($color: #000000, $alpha: 0.4);
flex-direction: row;
flex-wrap: wrap;
margin-right: 14upx;
>.system-msg-detail-username {
color: red;
font-size: 32upx;
font-weight: 400;
line-height: 40upx;
}
>.system-msg-detail-content {
font-size: 32upx;
font-weight: 400;
line-height: 40upx;
color: #A0CFFF;
}
}
.user-line {
// max-width: 530upx;
padding: 10upx;
color: #FFFFFF;
flex-direction: row;
border-radius: 30upx;
background-color: rgba($color: #000000, $alpha: 0.4);
margin-right: 14upx;
font-size: 28upx;
font-weight: 400;
line-height: 40upx;
}
.user-msg {
width: 530upx;
margin-bottom: 5upx;
}
.user-msg-detail-tag {
width: 40upx;
height: 40upx;
border-radius: 50%;
}
.user-msg-detail {
padding: 10upx;
border-radius: 30upx;
background-color: rgba($color: #000000, $alpha: 0.4);
flex-direction: row;
flex-wrap: wrap;
margin-right: 14upx;
>.user-msg-detail-username {
color: #A0CFFF;
font-size: 32upx;
font-weight: 400;
line-height: 40upx;
}
>.user-msg-detail-content {
font-size: 32upx;
font-weight: 400;
line-height: 40upx;
color: #fff;
}
}
</style>

View File

@ -2,125 +2,82 @@
<view class="orderGoods" :style="viewColor">
<view class='goodWrapper' :class="'item'+orderData.order_type">
<view v-if="orderData.order_type == 1" class="title acea-row row-between-wrapper">
<view class="item-status" :class="'status'+evaluate">{{evaluate == 7 ? '待核销' : '已核销'}}</view>
<view class="item-status" :class="'status'+evaluate">{{evaluate == 0 ? '待核销' : '已核销'}}</view>
<view v-if="evaluate != 0 && orderData.verify_time" class="item-date">{{orderData.verify_time}}</view>
</view>
<view v-for="(item,index) in cartInfo" :key="index">
<view v-if="activityType === 2">
<view class='item presell_item'>
<view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)">
<image
:src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image'>
</image>
<image :src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image' ></image>
</view>
<view class='text'>
<view class='acea-row row-between-wrapper'>
<view class='name line1' style="width: 360rpx;"><text
class="event_name event_bg">预售</text>{{item.cart_info.product.store_name}}
</view>
<view class='num'><text
class="p-color">{{item.cart_info.productPresellAttr.presell_price}}</text><br />x
{{item.product_num}}</view>
<view class='name line1' style="width: 360rpx;"><text class="event_name event_bg">预售</text>{{item.cart_info.product.store_name}}</view>
<view class='num'><text class="p-color">{{item.cart_info.productPresellAttr.presell_price}}</text><br/>x {{item.product_num}}</view>
</view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku" style="margin-top: 0;">
{{item.cart_info.productAttr.sku}}</view>
<view v-if="evaluate === 0 || evaluate === 10 || evaluate === 11"
class="event_ship event_color">发货时间
<view class='attr line1' v-if="item.cart_info.productAttr.sku" style="margin-top: 0;">{{item.cart_info.productAttr.sku}}</view>
<view v-if="evaluate === 0 || evaluate === 10 || evaluate === 11" class="event_ship event_color">发货时间
<!--全款预售-->
<text
v-if="item.cart_info.productPresell.presell_type === 1">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
<text v-if="item.cart_info.productPresell.presell_type === 1">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
<!--定金预售-->
<text
v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
</view>
<text v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
</view>
<view class="right-btn-box event_box">
<view class="btn-item"
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate>=0 && evaluate != 1&& evaluate == 2"
@click.stop="refund(item)">申请退款</view>
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x
{{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x
{{item.product_num - item.refund_num}}</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class="btn-item" v-if="item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0" @click.stop="refund(item)">申请退款</view>
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view>
</view>
</view>
</view>
<view v-if="orderData.status >= 10" class="event_progress">
<view class="progress_list">
<view class="progress_list">
<view class="progress_name">阶段一 买家已付款</view>
<view class="progress_price">商品定金 <text
class="align_right">{{ orderData.pay_price }}</text></view>
<view class="progress_pay">定金实付款<text
class="align_right t-color">{{ orderData.pay_price }}</text></view>
<view class="progress_price">商品定金 <text class="align_right">{{ orderData.pay_price }}</text></view>
<view class="progress_pay">定金实付款<text class="align_right t-color">{{ orderData.pay_price }}</text></view>
</view>
<view class="progress_list">
<view class="progress_name">阶段二
<text
v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 0">未开始</text>
<text
v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 1">等待买家付尾款</text>
<text
v-if="orderData.status == 11 || orderData.presellOrder.activeStatus == 2">交易已关闭</text>
<view class="progress_name">阶段二
<text v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 0">未开始</text>
<text v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 1">等待买家付尾款</text>
<text v-if="orderData.status == 11 || orderData.presellOrder.activeStatus == 2">交易已关闭</text>
</view>
<view class="progress_price">商品尾款 <text
class="align_right">{{ orderData.presellOrder.pay_price }}</text></view>
<view class="progress_pay">尾款需付款<text
class="align_right t-color">{{ orderData.presellOrder.pay_price }}</text></view>
<view class="progress_price">商品尾款 <text class="align_right">{{ orderData.presellOrder.pay_price }}</text></view>
<view class="progress_pay">尾款需付款<text class="align_right t-color">{{ orderData.presellOrder.pay_price }}</text></view>
</view>
</view>
</view>
<view v-else class='item'>
<view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)">
<image
:src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image'>
</image>
<image :src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image' ></image>
</view>
<view class='text'>
<view class='acea-row row-between-wrapper'>
<view class='name line1'><text v-if="item.product_type != 0 && item.product_type != 10"
:class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>{{item.cart_info.product.store_name}}
<view class='acea-row row-between-wrapper'>
<view class='name line1'><text v-if="item.product_type != 0 && item.product_type != 10" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>{{item.cart_info.product.store_name}}</view>
<view class='num'>x {{item.product_num}}</view>
</view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku">{{item.cart_info.productAttr.sku}}</view>
<view class='money p-color' v-if="item.cart_info.product_type ==3">{{item.cart_info.productAssistAttr.assist_price}}</view>
<view class='money p-color' v-else-if="item.cart_info.product_type ==4">{{item.cart_info.activeSku.active_price}}</view>
<view class='money acea-row row-middle' v-else>
<text>{{item.cart_info.productAttr.price}}</text>
<image v-if="item.cart_info.productAttr.show_svip_price" class="svip-img" src="/static/images/svip.png"></image>
</view>
<view class='num'>x {{item.product_num}}</view>
</view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku">
{{item.cart_info.productAttr.sku}}</view>
<view class='money p-color' v-if="item.cart_info.product_type ==3">
{{item.cart_info.productAssistAttr.assist_price}}</view>
<view class='money p-color' v-else-if="item.cart_info.product_type ==4">
{{item.cart_info.activeSku.active_price}}</view>
<view class='money acea-row row-middle' v-else>
<text>{{item.cart_info.productAttr.price}}</text>
<image v-if="item.cart_info.productAttr.show_svip_price" class="svip-img"
src="/static/images/svip.png"></image>
</view>
</view>
</view>
<view class="right-btn-box">
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x
{{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}
</view>
<view class="btn-item"
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2"
@click.stop="refund(item)">申请退款</view>
<view class='btn-item'
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3&& evaluate!=7&& evaluate!=8&& evaluate!=9&& item.refund_num > 0'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view>
<view class="btn-item" v-if="item.is_refund ==0 && evaluate!=9 && orderData.refund_status || item.refund_num > 0" @click.stop="refund(item)">申请退款</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.refund_num > 0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view>
</view>
</view>
</view>
</view>
</view>
@ -136,18 +93,10 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
openOrderRefundSubscribe
} from '@/utils/SubscribeMessage.js';
import {
goShopDetail
} from '@/libs/order.js'
import {
initiateAssistApi
} from '@/api/activity.js';
import {
mapGetters
} from "vuex";
import { openOrderRefundSubscribe } from '@/utils/SubscribeMessage.js';
import { goShopDetail } from '@/libs/order.js'
import { initiateAssistApi } from '@/api/activity.js';
import { mapGetters } from "vuex";
export default {
props: {
evaluate: {
@ -182,14 +131,14 @@
computed: mapGetters(['viewColor']),
data() {
return {
totalNmu: '',
totalNmu:'',
isTimePay: false, //
};
},
watch: {
cartInfo: function(nVal, oVal) {
watch:{
cartInfo:function(nVal,oVal){
let num = 0
nVal.forEach((item, index) => {
nVal.forEach((item,index)=>{
num += item.cart_num
})
this.totalNmu = num
@ -200,59 +149,52 @@
},
mounted() {},
methods: {
evaluateTap: function(unique, orderId) {
evaluateTap:function(unique,orderId){
uni.navigateTo({
url: `/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}`
url:`/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}`
})
},
//
isPayBalance() {
isPayBalance(){
let that = this;
if (that.orderData.status === 10) {
if (new Date() < new Date(that.orderData.presellOrder.final_start_time)) {
if(that.orderData.status === 10){
if(new Date() < new Date(that.orderData.presellOrder.final_start_time)){
that.isTimePay = false; //
} else if ((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <=
new Date(that.orderData.presellOrder.final_start_time))) {
}else if((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <= new Date(that.orderData.presellOrder.final_start_time)) ){
that.isTimePay = true; //
}
}
},
jumpCon: function(item) {
if (item.product_type == 4) item.activity_id = item.cart_info && item.cart_info.activeSku
.product_group_id
if (item.product_type == 3) item.activity_id = item.cart_info && item.cart_info.productAssistAttr
.product_assist_id
jumpCon:function(item){
if(item.product_type == 4)item.activity_id = item.cart_info && item.cart_info.activeSku.product_group_id
if(item.product_type == 3)item.activity_id = item.cart_info && item.cart_info.productAssistAttr.product_assist_id
goShopDetail(item).then(res => {
initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id;
uni.hideLoading();
uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + id
});
}).catch((err) => {
uni.showToast({
title: err,
icon: 'none'
})
uni.hideLoading();
uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + id
});
}).catch((err) => {
uni.showToast({
title: err,
icon: 'none'
})
});
})
})
},
// 退
refund(item) {
refund(item){
// #ifdef MP
openOrderRefundSubscribe().then(() => {
uni.hideLoading();
if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1) {
if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1){
uni.navigateTo({
url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' +
'&ids=' + item.order_product_id + '&refund_type=1&order_type=' + this
.orderData.order_type
url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type
})
} else {
}else{
uni.navigateTo({
url: '/pages/users/refund/select?order_id=' + this.orderId +
'&type=1&order_type=' + this.orderData.order_type + '&ids=' + item
.order_product_id
url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id
})
}
}).catch(() => {
@ -260,15 +202,13 @@
})
// #endif
// #ifdef H5 || APP-PLUS
if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1) {
if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual == 1){
uni.navigateTo({
url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' + '&ids=' + item
.order_product_id + '&refund_type=1&order_type=' + this.orderData.order_type
url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type
})
} else {
}else{
uni.navigateTo({
url: '/pages/users/refund/select?order_id=' + this.orderId + '&type=1&order_type=' + this
.orderData.order_type + '&ids=' + item.order_product_id
url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id
})
}
// #endif
@ -281,101 +221,83 @@
.orderGoods {
background-color: #fff;
}
.p-color {
color: var(--view-priceColor);
}
.t-color {
.t-color{
color: var(--view-theme);
}
.svip-img {
.svip-img{
width: 65rpx;
height: 28rpx;
margin: 4rpx 0 0 4rpx;
}
.title {
.title{
height: 86rpx;
position: relative;
padding: 0 30rpx;
&::after {
&::after{
content: "";
width: 750rpx;
border-bottom: 2rpx dotted #D8D8D8;
border-bottom: 2rpx dotted #D8D8D8;
position: absolute;
bottom: 0;
left: 0;
}
.item-status {
.item-status{
color: #999999;
font-size: 30rpx;
&.status0 {
&.status0{
color: #2291F8;
}
}
.item-date {
.item-date{
color: #666666;
font-size: 28rpx;
}
}
.right-btn-box {
}
.right-btn-box{
display: flex;
align-items: center;
justify-content: flex-end;
&.event_box {
&.event_box{
position: static;
}
.btn-item {
.btn-item{
display: flex;
align-items: center;
justify-content: center;
width: 140rpx;
height: 46rpx;
width:140rpx;
height:46rpx;
margin-left: 10rpx;
border: 1px solid rgba(187, 187, 187, 1);
border-radius: 23rpx;
border:1px solid rgba(187,187,187,1);
border-radius:23rpx;
font-size: 24rpx;
color: #282828;
&.on {
background: rgba(220, 220, 220, 1);
border-color: rgba(220, 220, 220, 1);
&.on{
background:rgba(220,220,220,1);
border-color: rgba(220,220,220,1);
}
&.err {
background: rgba(247, 247, 247, 1);
border-color: rgba(247, 247, 247, 1);
&.err{
background:rgba(247,247,247,1);
border-color: rgba(247,247,247,1);
color: #AAAAAA;
}
}
}
.event_bg {
.event_bg{
background: #FF7F00;
}
.event_color {
.event_color{
color: #FF7F00;
}
.presell_item {
.presell_item{
height: auto;
padding-bottom: 15rpx;
}
.event_progress {
.event_progress{
margin-top: 20rpx;
background: #fff;
.progress_name {
padding-left: 30rpx;
height: 60rpx;
@ -384,8 +306,7 @@
font-weight: bold;
position: relative;
color: var(--view-theme);
&::before {
&::before{
content: "";
display: inline-block;
width: 5rpx;
@ -396,49 +317,43 @@
left: 0;
}
}
.align_right {
.align_right{
float: right;
font-weight: bold;
}
.progress_price {
.progress_price{
padding: 20rpx 30rpx;
color: #999999;
font-size: 22rpx;
}
.progress_pay {
.progress_pay{
padding: 25rpx 30rpx;
background: var(--view-minorColor);
font-size: 26rpx;
color: #282828;
}
}
.event_name {
.event_name{
display: inline-block;
margin-right: 9rpx;
color: #fff;
font-size: 20rpx;
padding: 0 8rpx;
line-height: 30rpx;
line-height: 30rpx;
text-align: center;
border-radius: 6rpx;
border-radius: 6rpx;
}
.event_ship {
.event_ship{
font-size: 20rpx;
margin-top: 10rpx;
margin-top: 10rpx;
}
.goodWrapper.item1 {
&::after {
.goodWrapper.item1{
&::after{
content: "";
display: block;
width: 750rpx;
height: 14rpx;
background: #F0F0F0;
}
}
}
</style>
</style>

View File

@ -4,8 +4,8 @@
<view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
v-for="(item,index) in payMode" :key="index" v-if="item.payStatus == 1">
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
:key="index" v-if="item.payStatus == 1">
<view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view>
<view class="text">
@ -78,7 +78,6 @@
});
},
goPay: function(number, paytype) {
if (this.isCall) {
return this.$emit('onChangeFun', {
action: 'payCheck',
@ -99,16 +98,13 @@
// #endif
} else if (paytype == 'balance') {
type = 'balance';
console.log('123');
} else if (paytype == 'alipay') {
}else if(paytype == 'alipay'){
// #ifndef MP
type = 'alipay';
// #endif
// #ifdef MP
type = 'alipayQr';
// #endif
} else if (paytype == 'creditBuy') {
type = 'creditBuy'
}
if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单'
@ -119,27 +115,20 @@
uni.showLoading({
title: '支付中'
});
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
orderApi(that.order_id, {
type: type,
// #ifdef H5
return_url: this.order_type == 98 ? 'http://' + window.location.host +
'/pages/users/order_list/indexCopy' : 'http://' + window.location.host +
'/pages/users/order_list/index',
return_url: 'http://'+window.location.host+'/pages/users/order_list/index',
// #endif
}).then(res => {
let status = res.data.status,
orderId = res.data.result.order_id,
jsConfig = res.data.result.config,
callback_key = res.data.result.pay_key,
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
'/pages/users/order_list/index'
switch (status) {
goPages = '/pages/users/order_list/index';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
@ -150,19 +139,19 @@
});
return that.$util.Tips({
title: res.message
});
});
break;
case 'success':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=2'
url: goPages + '?status=1'
});
break;
case 'alipay':
@ -170,20 +159,19 @@
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
jsConfig,
})
return
break;
// #ifndef MP
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig,
})
return
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
that.$wechat.pay(jsConfig).then(res => {
// console.log('success'+res.data)
this.$emit('onChangeFun', {
action: 'payClose'
@ -192,36 +180,35 @@
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + 'status=2'
url: goPages + 'status=1'
});
}).catch(res => {
// console.log('catch'+res.data)
if (res.errMsg == 'chooseWXPay:cancel') {
if (that.isCall) {
if (res.errMsg == 'chooseWXPay:cancel'){
if(that.isCall){
return that.$util.Tips({
title: '取消支付'
});
} else {
}else{
return that.$util.Tips({
title: '取消支付'
}, {
}, {
tab: 5,
url: goPages + '?status=1'
url: goPages + '?status=0'
});
}
}
}
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
console.log(mp_pay_name, jsConfig)
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
@ -232,23 +219,22 @@
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + 'status=2'
url: goPages + 'status=1'
});
},
fail: (e) => {
console.log(e)
if (that.isCall) {
if(that.isCall){
return that.$util.Tips({
title: '取消支付'
});
} else {
}else{
return that.$util.Tips({
title: '取消支付'
}, {
}, {
tab: 5,
url: goPages + '?status=1'
url: goPages + '?status=0'
});
}
},
@ -258,16 +244,16 @@
});
// #endif
break;
// #endif
// #ifdef MP
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
that.toPay = true;
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
@ -276,22 +262,21 @@
that.$emit('onChangeFun', {
action: 'payClose'
});
if (that.BargainId || that.combinationId || that.pinkId || that
.seckillId)
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + '?status=2'
url: goPages + '?status=1'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + '?status=2'
url: goPages + '?status=1'
});
},
fail: function(e) {
@ -304,19 +289,18 @@
});
},
complete: function(e) {
uni.hideLoading();
uni.hideLoading();
//
if (res.errMsg == 'requestPayment:cancel') return that.$util
.Tips({
title: '取消支付'
});
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
title: '取消支付'
});
that.$emit('onChangeFun', {
action: 'payClose'
});
},
})
break;
// #endif
// #endif
case "balance":
uni.hideLoading();
that.$emit('onChangeFun', {
@ -327,9 +311,9 @@
title: res.message
});
break;
// #ifdef H5
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let host = window.location.protocol+"//"+window.location.host;
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
@ -338,9 +322,9 @@
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
@ -352,11 +336,11 @@
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + 'status=2'
url: goPages + 'status=1'
});
},
fail: (e) => {
return that.$util.Tips({
@ -367,13 +351,9 @@
uni.hideLoading();
},
});
break;
// #endif
break;
// #endif
}
}).catch(err => {
uni.hideLoading();
return that.$util.Tips({
@ -395,7 +375,7 @@
border-radius: 16rpx 16rpx 0 0;
background-color: #fff;
padding-bottom: 60rpx;
z-index: 99999;
z-index: 99;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0);
}
@ -476,4 +456,4 @@
font-size: 0.3rpx;
color: #999;
}
</style>
</style>

View File

@ -1,18 +1,18 @@
<template>
<view class='product-bg'>
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :circular="circular"
:interval="interval" :duration="duration">
:interval="interval" :duration="duration">
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item>
<image :src="item" class="slide-image" mode="aspectFit" />
<image :src="item" class="slide-image" />
<!-- <view class="stop" v-if="isType == 2">
<image class="image" src="/static/images/stop.png"></image>
</view> -->
</swiper-item>
</block>
</swiper>
</view>
</template>
@ -56,7 +56,8 @@
videoContext: ''
};
},
created() {},
created() {
},
watch: {
},
@ -82,7 +83,7 @@
// #ifdef APP-PLUS
this.isPlay = false
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.$nextTick(()=>{
this.videoContext.play();
})
// #endif
@ -101,15 +102,13 @@
height: 710rpx;
position: relative;
}
.product-bg swiper {
width: 100%;
height: 100%;
position: relative;
}
.product-bg .slide-image {
width: 100vw;
width: 100%;
height: 100%;
border-radius: 16rpx;
}
@ -167,4 +166,4 @@
width: 100%;
height: 100%;
}
</style>
</style>

View File

@ -59,7 +59,7 @@
-
</view>
<view class='item num'>
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)" @keydown="btKeyDown" @keyup="btKeyUp"></input>
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)" @keydown.native="btKeyDown" @keyup.native="btKeyUp"></input>
</view>
<view v-if="iSplus" class="item plus" :class=" attr.productSelect.cart_num >= attr.productSelect.stock || destri ? 'on' : ''"
@click="CartNumAdd">+</view>
@ -360,36 +360,27 @@
margin-right: 30rpx;
}
.product-window .cart .carnum .item {
width: 63rpx;
border: 1px solid #a4a4a4;
width: 84rpx;
text-align: center;
height: 100%;
line-height: 42rpx;
color: #333333;
font-weight: 400;
font-size: 26rpx;
line-height: 54rpx;
color: #a4a4a4;
font-size: 45rpx;
}
.product-window .cart .carnum .reduce {
border: 1px solid #a4a4a4;
width: 44rpx;
height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx;
border-right: 0;
border-radius: 6rpx 0 0 6rpx;
line-height: 48rpx;
}
.product-window .cart .carnum .reduce.on {
border-color: #e3e3e3;
color: #dedede;
}
.product-window .cart .carnum .plus {
border: 1px solid #a4a4a4;
width: 44rpx;
height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx
border-left: 0;
border-radius: 0 6rpx 6rpx 0;
line-height: 46rpx;
}
.product-window .cart .carnum .plus.on {
border-color: #e3e3e3;

View File

@ -1,627 +0,0 @@
<template>
<view class="containers" :style="viewColor">
<view class="header">
<view class="search">
<text class="iconfont icon-xiazai5"></text>
<input type="text" placeholder="请输入商品名称" v-model="searchVal" @input="setValue" confirm-type="search"
@confirm="searchBut()" placeholder-class='placeholder'>
</view>
<view class="iconclose" @click="close">
<image src="@/static/images/wt_close.png" mode="aspectFit"></image>
</view>
</view>
<view class="main">
<scroll-view scroll-y="true" @touchmove.stop>
<block>
<view v-if="bought.length" @touchmove="onTouchmove" id="goods" class="goods">
<view class="picTxt acea-row" v-for="(item, i) in bought" :key="i">
<view class="checkbox">
<text @click.stop="goodsCheck(item)" v-if="item.check"
class="iconfont icon-xuanzhong1"></text>
<text @click.stop="goodsCheck(item)" v-else
:class="checkedArr.length >=5 ? 'disabled': ''"
class="iconfont icon-weixuanzhong"></text>
</view>
<view class='pictrue'>
<image :src='item.image'></image>
</view>
<view class='text'>
<view class='line2 name'>{{item.store_name}}</view>
<view class="picTxt_one" v-if="item.attrValue.length>0">
<picker class="slecte" v-if="item.attrValue.length>1"
@change="bindPickerChange($event,item.attrValue,i)" :value="index"
:range="item.attrValue" :range-key="'sku'">
<view class="uni-input">{{item.attrValue[index].sku}}</view>
</picker>
<view class="" style="margin-top: 10rpx;">
库存:{{item.attrValue[index].stock}}
</view>
</view>
</view>
<view class="picTxt_price">
<view class="price">
<span>委托价格</span>
<input type="text" :value="item.price" placeholder="输入出售价格"
@input="producrprice($event,i,item)" adjust-position=""
placeholder-style="color: #CCCCCC;" />
</view>
<view class="price_num">
<span>委托数量</span>
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
</subtractive>
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
:min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @increment="incrementTotal($event,i,item)"
@eventChange="numberChange($event,i)"></subtractive>
</view>
</view>
</view>
</view>
<view v-else class="empty">
<image src="/static/images/no_thing.png"></image>
<text>暂无内容哦~</text>
</view>
</block>
</scroll-view>
<view class="foot_bar">
<button class="confirm_btn" @click="submit">确定({{checkedArr.length}})</button>
</view>
</view>
</view>
</template>
<script>
import Loading from '@/components/Loading/index.vue';
import subtractive from '@/components/subtractive/subtractive.vue';
import {
getCommunitygetOrderList
} from "@/api/trading-floor";
import {
mapGetters
} from "vuex";
export default {
props: {
checkedObj: {
type: Array,
default: []
}
},
computed: mapGetters(['viewColor']),
components: {
Loading,
subtractive
},
data() {
return {
isActive: 0,
loadedb: false,
loadingb: false,
loadedc: false,
loadingc: false,
loadeds: false,
loadings: false,
whereb: {
page: 1,
limit: 10,
keyword: '',
},
peicenumber: 0,
searchVal: "",
checked: [],
list: [],
bought: [],
checkedArr: [],
aryys: [],
// picker
storageCustomList: [{
CustGoodsCode: "TEST001",
CustGoodsName: "测试货主001",
IfBoxId: 0,
IfProductId: 0,
}, {
CustGoodsCode: "TEST002",
CustGoodsName: "测试货主002",
IfBoxId: 0,
IfProductId: 0,
}, {
CustGoodsCode: "TEST003",
CustGoodsName: "测试货主003",
IfBoxId: 0,
IfProductId: 0,
}],
index: 0,
pickerData: '请选择',
itstock: '',
};
},
watch: {
checkedObj: {
handler(n) {
this.checkedArr = n
},
deep: true
}
},
mounted() {
this.checkedArr = this.checkedObj
this.aryys = this.checkedObj
this.getBounht();
},
methods: {
//
producrprice(e, i, item) {
this.bought[i].price = e.detail.value
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
incrementTotal(e, i, item) {
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
// picker
bindPickerChange: function(e, storage, num) {
this.bought[num].attrValue[this.index].sku = storage[e.detail.value].sku
this.bought[num].attrValue[this.index].stock = storage[e.detail.value].stock
this.bought[num].product_attr_unique = storage[e.detail.value].unique
this.pickerData = storage[this.index] //
if (this.bought[num].attrValue[this.index].stock == 0) {
this.$util.Tips({
title: '库存不足'
});
}
},
//
close() {
this.$emit('close');
},
numberChange(data, i) {
this.peicenumber = data.number;
this.bought[i].number = data.number
},
tabs(index) {
this.isActive = index
this.$set(this.whereb, 'keyword', '');
this.searchVal = ''
this.searchBut()
},
onTouchmove(e) {
if (this.loadendb) return;
if (this.loadingb) return;
const query = uni.createSelectorQuery().in(this);
query.select('#goods').boundingClientRect(data => {
if (data.bottom < 1500 && data.top < 0) {
this.getBounht();
}
}).exec();
//
},
setValue: function(event) {
this.$set(this.whereb, 'keyword', event.detail.value);
if (!event.detail.value) {
this.whereb.page = 1
this.loadedb = false
this.getBounht()
}
},
searchBut() {
this.bought = []
this.whereb.page = 1
this.loadedb = false
this.getBounht()
},
getBounht() {
var that = this;
// console.log('1111111', that.loadingb, that.loadedb)
if (that.loadingb || that.loadedb) return;
that.loadingb = true;
getCommunitygetOrderList(that.whereb).then(
res => {
that.loadingb = false;
that.loadedb = res.data.list.length < that.whereb.limit;
that.bought.push.apply(that.bought, res.data.list);
that.whereb.page = that.whereb.page + 1;
that.getInitchecked(that.bought);
},
error => {
that.$util.Tips({
title: error.msg
})
}
);
},
/*获取初始化选中的数据*/
getInitchecked(arr) {
let that = this;
arr.forEach((item, index) => {
that.$set(item, 'check', false);
that.checkedArr.forEach((val, i) => {
if (item.product_id == val.product_id) {
that.$set(item, 'check', true);
that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price);
that.peicenumber=val.number
}
})
})
},
/*已选中的商品打钩*/
getCheckedGoods() {
this.checked = []
this.checkedArr.forEach((item, index) => {
this.checkedArr.push(item)
})
},
/*点击选中与否*/
goodsCheck(item) {
this.$set(item, 'check', !item.check);
if (item.check) {
if (this.peicenumber == 0) {
item.number = 1
}
if (!item.product_attr_unique) {
item.product_attr_unique = item.attrValue[0].unique
}
this.checkedArr.push(item)
this.arrayUnique(this.checkedArr, 'product_id')
} else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
}
},
//
arrayUnique(arr, name) {
let hash = {}
const result = arr.reduce((acc, cru, index) => {
if (!hash[cru[name]]) {
hash[cru[name]] = {
index: acc.length
}
acc.push(cru)
} else {
console.log(acc, hash[cru[name]])
acc.splice(hash[cru[name]]['index'], 1, cru)
}
return acc;
}, [])
this.checkedArr = result
},
/*确定提交*/
submit() {
this.$emit('getProduct', this.checkedArr);
},
}
}
</script>
<style lang="scss" scoped>
.containers {
background: #ffffff;
border-radius: 16rpx 16rpx 0 0;
padding: 40rpx 0;
position: relative;
.header {
position: relative;
padding: 0 30rpx;
.title {
width: 100%;
text-align: center;
text {
position: relative;
margin: 0 50rpx;
color: #999999;
font-size: 30rpx;
&.on {
color: #333333;
font-weight: bold;
font-size: 34rpx;
&::after {
content: "";
display: inline-block;
width: 40rpx;
height: 5rpx;
background: var(--view-theme);
position: absolute;
bottom: -10rpx;
left: 10rpx;
}
}
}
}
.iconclose {
width: 44rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 50%;
text-align: center;
position: absolute;
top: -150rpx;
right: 30rpx;
image {
width: 100%;
height: 100%;
}
}
.search {
margin-top: 44rpx;
background: #F5F5F5;
border-radius: 30rpx;
padding: 12rpx 30rpx 12rpx 66rpx;
position: relative;
.iconfont {
font-size: 24rpx;
color: #939393;
position: absolute;
top: 20rpx;
left: 30rpx;
}
.placeholder {
color: #999999;
font-size: 26rpx;
}
}
.sub_title {
color: #282828;
font-size: 26rpx;
margin-top: 30rpx;
}
.iconfont {
color: #8A8A8A;
font-size: 28rpx;
position: absolute;
top: 0;
right: 30rpx;
}
}
scroll-view {
height: 650rpx;
}
.main {
height: 650rpx;
margin: 40rpx 0 80rpx;
padding: 0 30rpx;
}
}
.picTxt {
width: 100%;
padding: 25rpx 0;
position: relative;
align-items: center;
justify-content: space-between;
border-top: 2rpx solid #E7E6E4;
.picTxt_one {
white-space: nowrap;
overflow: hidden;
}
.picTxt_one {
display: flex;
margin-top: 20rpx;
.slecte {
margin-right: 30rpx;
width: 280rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #959595;
background-color: #E7E6E4;
border-radius: 10rpx 10rpx 10rpx 10rpx;
white-space: nowrap;
overflow: hidden;
}
}
.picTxt_price {
display: flex;
margin-top: 37rpx;
height: 70rpx;
line-height: 70rpx;
.price {
display: flex;
margin-right: 15rpx;
input {
width: 210rpx;
text-align: center;
height: 70rpx;
background: #F5F5F5;
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-left: 20rpx;
}
}
.price_num {
display: flex;
}
}
.checkbox {
margin-right: 30rpx;
.iconfont {
font-size: 38rpx;
color: #CCCCCC;
}
.icon-xuanzhong1 {
color: var(--view-theme);
}
.disabled {
pointer-events: none;
cursor: default;
opacity: 0.3;
}
}
.pictrue {
width: 160rpx;
height: 160rpx;
image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
.text {
width: 430rpx;
margin-left: 30rpx;
font-size: 28rpx;
color: #282828;
position: relative;
height: 160rpx;
.name {
color: #282828;
font-size: 28rpx;
}
.money {
position: absolute;
bottom: 0;
left: 0;
color: var(--view-priceColor);
font-size: 22rpx;
font-weight: bold;
text {
font-size: 26rpx;
}
}
}
}
.foot_bar {
width: 100%;
position: fixed;
// bottom: 54px;
left: 0;
padding: 20rpx 0;
z-index: 5;
.confirm_btn {
width: 710rpx;
height: 86rpx;
line-height: 86rpx;
color: #ffffff;
text-align: center;
font-size: 32rpx;
background: var(--view-theme);
border-radius: 43rpx;
margin: 0 auto;
}
}
.empty {
margin: 130rpx 0 150rpx;
text-align: center;
image,
uni-image {
display: inline-block;
width: 414rpx;
height: 305rpx;
}
text {
display: block;
color: #999999;
font-size: 26rpx;
}
}
</style>

View File

@ -1,190 +0,0 @@
<template>
<view class="mark" v-if="isShow" @click="close">
<view class="release">
<view class="release_content" v-for="(item,i) in list" :key="i" @click="navigtion(item)">
<view class="release_content_left">
<view :class="i==1?'release_imga':'release_img'">
<image :src="item.img" mode="aspectFit"></image>
</view>
<view class="title">
<view class="title1">
{{item.title1}}
</view>
<view class="title2">
{{item.title2}}
</view>
</view>
</view>
<view class="release_content_right ">
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
<view class="release_close" @click="close">
<image src="@/static/images/trad-close.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import {
navigateTo
} from '../../libs/uniApi'
export default {
props: {
isShow: {
type: Boolean,
default: false
},
// bottomtruefalse
bottom: {
type: Boolean,
default: false
}
},
data() {
return {
list: [{
img: require('@/static/images/season.png'),
title1: '发布调货商品',
title2: '镇街店铺快捷调货',
},
{
img: require('@/static/images/discounts.png'),
title1: '发布打折商品',
title2: '发布店铺打折商品',
}
]
}
},
methods: {
navigtion(item) {
if (item.title1 =='发布调货商品') {
uni.navigateTo({
url: '/pages/trading_hall/transfer_goods/index'
})
} else {
uni.navigateTo({
url: '/pages/trading_hall/adddiscounts/index'
})
}
},
close() {
this.$emit('close')
},
cancel() {
this.$emit('cancel')
},
confirm() {
this.$emit('confirm')
},
}
}
</script>
<style lang="scss">
.mark {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.3);
left: 0;
bottom: 0;
top: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
}
.release {
position: absolute;
bottom: 0px;
}
.release_content {
width: 694rpx;
height: 137rpx;
background: #FCF3EE;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
margin-bottom: 21rpx;
display: flex;
justify-content: space-between;
padding: 0 26rpx;
.release_content_left {
display: flex;
}
.release_content_right {
height: 137rpx;
line-height: 137rpx;
}
.release_img {
width: 111rpx;
height: 96rpx;
margin-top: 21rpx;
margin-right: 19rpx;
image {
width: 111rpx;
height: 96rpx;
}
}
.release_imga {
width: 76rpx;
height: 113rpx;
margin-top: 5rpx;
margin-right: 50rpx;
image {
width: 76rpx;
height: 113rpx;
}
}
.title {
margin-top: 23rpx;
}
.title1 {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title2 {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
margin-top: 11rpx;
}
}
.release_close {
width: 248rpx;
height: 248rpx;
margin: 0 auto;
image {
width: 248rpx;
height: 248rpx;
}
}
</style>

View File

@ -132,13 +132,11 @@
el.check = false
})
this.storeTypeList = [
{name: '全部', value: 'trader',check: true},
{name: '全部', value: '',check: true},
{name: '自营', value: 'trader',check: false},
{name: '非自营', value: 'trader',check: false}
]
this.min = this.max = ''
this.is_trader=''
this.index=0
this.arrFilter()
},
confirm(){
@ -148,8 +146,7 @@
price_on:this.min,
price_off:this.max,
status:false,
is_trader: this.is_trader,
is_trader: this.is_trader
}
this.showBox = false
this.$emit('confirm',obj,this.index)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,607 +0,0 @@
<template>
<view class="containers" :style="viewColor">
<view class="header">
<view class="search">
<text class="iconfont icon-xiazai5"></text>
<input type="text" placeholder="请输入商品名称" v-model="searchVal" @input="setValue" confirm-type="search"
@confirm="searchBut()" placeholder-class='placeholder'>
</view>
<view class="iconclose" @click="close">
<image src="@/static/images/wt_close.png" mode="aspectFit"></image>
</view>
</view>
<view class="main">
<scroll-view scroll-y="true" @touchmove.stop>
<block>
<view v-if="bought.length" @touchmove="onTouchmove" id="goods" class="goods">
<view class="picTxt acea-row" v-for="(item, i) in bought" :key="i">
<view class="checkbox">
<text @click.stop="goodsCheck(item)" v-if="item.check"
class="iconfont icon-xuanzhong1"></text>
<text @click.stop="goodsCheck(item)" v-else
:class="checkedArr.length >=5 ? 'disabled': ''"
class="iconfont icon-weixuanzhong"></text>
</view>
<view class='pictrue'>
<image :src='item.image'></image>
</view>
<view class='text'>
<view class='line2 name'>{{item.store_name}}</view>
<view class="picTxt_one" v-if="item.attrValue.length>0">
<picker class="slecte" v-if="item.attrValue.length>1"
@change="bindPickerChange($event,item.attrValue,i)" :value="index"
:range="item.attrValue" :range-key="'sku'">
<view class="uni-input">{{item.attrValue[index].sku}}</view>
</picker>
<view class="" style="margin-top: 10rpx;">
库存:{{item.attrValue[index].stock}}
</view>
</view>
</view>
<view class="picTxt_price">
<view class="price">
<span>出售价格</span>
<input type="text" :value="item.price" placeholder="输入出售价格"
@input="producrprice($event,i,item)" adjust-position=""
placeholder-style="color: #CCCCCC;" />
</view>
<view class="price_num">
<span>出售数量</span>
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
</subtractive>
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
:min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @increment="incrementTotal($event,i,item)"
@eventChange="numberChange($event,i)"></subtractive>
</view>
</view>
</view>
</view>
<view v-else class="empty">
<image src="/static/images/no_thing.png"></image>
<text>暂无内容哦~</text>
</view>
</block>
</scroll-view>
<view class="foot_bar">
<button class="confirm_btn" @click="submit">确定({{checkedArr.length}})</button>
</view>
</view>
</view>
</template>
<script>
import Loading from '@/components/Loading/index.vue';
import subtractive from '@/components/subtractive/subtractive.vue';
import {
getCommunitygetOrderList
} from "@/api/trading-floor";
import {
mapGetters
} from "vuex";
export default {
props: {
checkedObj: {
type: Array,
default: []
}
},
computed: mapGetters(['viewColor']),
components: {
Loading,
subtractive
},
data() {
return {
isActive: 0,
loadedb: false,
loadingb: false,
loadedc: false,
loadingc: false,
loadeds: false,
loadings: false,
whereb: {
page: 1,
limit: 10,
keyword: '',
},
peicenumber: 0,
searchVal: "",
checked: [],
list: [],
bought: [],
checkedArr: [],
aryys: [],
// picker
storageCustomList: [{
CustGoodsCode: "TEST001",
CustGoodsName: "测试货主001",
IfBoxId: 0,
IfProductId: 0,
}, {
CustGoodsCode: "TEST002",
CustGoodsName: "测试货主002",
IfBoxId: 0,
IfProductId: 0,
}, {
CustGoodsCode: "TEST003",
CustGoodsName: "测试货主003",
IfBoxId: 0,
IfProductId: 0,
}],
index: 0,
pickerData: '请选择',
itstock: '',
};
},
watch: {
checkedObj: {
handler(n) {
this.checkedArr = n
},
deep: true
}
},
mounted() {
this.checkedArr = this.checkedObj
this.aryys = this.checkedObj
this.getBounht();
},
methods: {
//
producrprice(e, i, item) {
this.bought[i].price = e.detail.value
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
incrementTotal(e, i, item) {
// console.log(e, i, item)
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
// picker
bindPickerChange: function(e, storage, num) {
this.bought[num].attrValue[this.index].sku = storage[e.detail.value].sku
this.bought[num].attrValue[this.index].stock = storage[e.detail.value].stock
this.bought[num].product_attr_unique = storage[e.detail.value].unique
this.pickerData = storage[this.index] //
if (this.bought[num].attrValue[this.index].stock == 0) {
this.$util.Tips({
title: '库存不足'
});
}
},
//
close() {
this.$emit('close');
},
numberChange(data, i) {
this.peicenumber = data.number;
this.bought[i].number = data.number
},
tabs(index) {
this.isActive = index
this.$set(this.whereb, 'keyword', '');
this.searchVal = ''
this.searchBut()
},
onTouchmove(e) {
if (this.loadendb) return;
if (this.loadingb) return;
const query = uni.createSelectorQuery().in(this);
query.select('#goods').boundingClientRect(data => {
if (data.bottom < 1500 && data.top < 0) {
this.getBounht();
}
}).exec();
//
},
setValue: function(event) {
this.$set(this.whereb, 'keyword', event.detail.value);
if (!event.detail.value) {
this.whereb.page = 1
this.loadedb = false
this.getBounht()
}
},
searchBut() {
this.bought = []
this.whereb.page = 1
this.loadedb = false
this.getBounht()
},
getBounht() {
var that = this;
// console.log('1111111', that.loadingb, that.loadedb)
if (that.loadingb || that.loadedb) return;
that.loadingb = true;
getCommunitygetOrderList(that.whereb).then(
res => {
that.loadingb = false;
that.loadedb = res.data.list.length < that.whereb.limit;
that.bought.push.apply(that.bought, res.data.list);
that.whereb.page = that.whereb.page + 1;
that.getInitchecked(that.bought);
},
error => {
that.$util.Tips({
title: error.msg
})
}
);
},
/*获取初始化选中的数据*/
getInitchecked(arr) {
let that = this;
arr.forEach((item, index) => {
that.$set(item, 'check', false);
that.checkedArr.forEach((val, i) => {
if (item.product_id == val.product_id) {
that.$set(item, 'check', true);
that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price);
that.peicenumber=val.number
}
})
})
},
/*已选中的商品打钩*/
getCheckedGoods() {
this.checked = []
this.checkedArr.forEach((item, index) => {
this.checkedArr.push(item)
})
},
/*点击选中与否*/
goodsCheck(item) {
this.$set(item, 'check', !item.check);
if (item.check) {
if (this.peicenumber == 0) {
item.number = 1
}
if (!item.product_attr_unique) {
item.product_attr_unique = item.attrValue[0].unique
}
this.checkedArr.push(item)
} else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
}
},
/*确定提交*/
submit() {
this.$emit('getProduct', this.checkedArr);
},
}
}
</script>
<style lang="scss" scoped>
.containers {
background: #ffffff;
border-radius: 16rpx 16rpx 0 0;
padding: 40rpx 0;
position: relative;
.header {
position: relative;
padding: 0 30rpx;
.title {
width: 100%;
text-align: center;
text {
position: relative;
margin: 0 50rpx;
color: #999999;
font-size: 30rpx;
&.on {
color: #333333;
font-weight: bold;
font-size: 34rpx;
&::after {
content: "";
display: inline-block;
width: 40rpx;
height: 5rpx;
background: var(--view-theme);
position: absolute;
bottom: -10rpx;
left: 10rpx;
}
}
}
}
.iconclose {
width: 44rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 50%;
text-align: center;
position: absolute;
top: -150rpx;
right: 30rpx;
image {
width: 100%;
height: 100%;
}
}
.search {
margin-top: 44rpx;
background: #F5F5F5;
border-radius: 30rpx;
padding: 12rpx 30rpx 12rpx 66rpx;
position: relative;
.iconfont {
font-size: 24rpx;
color: #939393;
position: absolute;
top: 20rpx;
left: 30rpx;
}
.placeholder {
color: #999999;
font-size: 26rpx;
}
}
.sub_title {
color: #282828;
font-size: 26rpx;
margin-top: 30rpx;
}
.iconfont {
color: #8A8A8A;
font-size: 28rpx;
position: absolute;
top: 0;
right: 30rpx;
}
}
scroll-view {
height: 650rpx;
}
.main {
height: 650rpx;
margin: 40rpx 0 80rpx;
padding: 0 30rpx;
}
}
.picTxt {
width: 100%;
padding: 25rpx 0;
position: relative;
align-items: center;
justify-content: space-between;
border-top: 2rpx solid #E7E6E4;
.picTxt_one {
white-space: nowrap;
overflow: hidden;
}
.picTxt_one {
display: flex;
margin-top: 20rpx;
.slecte {
margin-right: 30rpx;
width: 280rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #959595;
background-color: #E7E6E4;
border-radius: 10rpx 10rpx 10rpx 10rpx;
white-space: nowrap;
overflow: hidden;
}
}
.picTxt_price {
display: flex;
margin-top: 37rpx;
height: 70rpx;
line-height: 70rpx;
.price {
display: flex;
margin-right: 15rpx;
input {
width: 210rpx;
text-align: center;
height: 70rpx;
background: #F5F5F5;
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-left: 20rpx;
}
}
.price_num {
display: flex;
}
}
.checkbox {
margin-right: 30rpx;
.iconfont {
font-size: 38rpx;
color: #CCCCCC;
}
.icon-xuanzhong1 {
color: var(--view-theme);
}
.disabled {
pointer-events: none;
cursor: default;
opacity: 0.3;
}
}
.pictrue {
width: 160rpx;
height: 160rpx;
image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
.text {
width: 430rpx;
margin-left: 30rpx;
font-size: 28rpx;
color: #282828;
position: relative;
height: 160rpx;
.name {
color: #282828;
font-size: 28rpx;
}
.money {
position: absolute;
bottom: 0;
left: 0;
color: var(--view-priceColor);
font-size: 22rpx;
font-weight: bold;
text {
font-size: 26rpx;
}
}
}
}
.foot_bar {
width: 100%;
position: fixed;
// bottom: 54px;
left: 0;
padding: 20rpx 0;
z-index: 5;
.confirm_btn {
width: 710rpx;
height: 86rpx;
line-height: 86rpx;
color: #ffffff;
text-align: center;
font-size: 32rpx;
background: var(--view-theme);
border-radius: 43rpx;
margin: 0 auto;
}
}
.empty {
margin: 130rpx 0 150rpx;
text-align: center;
image,
uni-image {
display: inline-block;
width: 414rpx;
height: 305rpx;
}
text {
display: block;
color: #999999;
font-size: 26rpx;
}
}
</style>

View File

@ -1,518 +0,0 @@
<template>
<view>
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
<view class="pop">
<scroll-view scroll-y class="scroll">
<view class="image">
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
<block v-if="product.slider_image && product.slider_image.length>0">
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
<image class="img" :src="item"></image>
</swiper-item>
</block>
<swiper-item v-else>
<image class="img" :src="datas.image||defualtImg"></image>
</swiper-item>
</swiper>
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
<view class="border"></view>
</view>
<view class="white_card">
<view class="flex flex_end">
<view class="price"><text class="pro">{{leftPrice}}.</text>{{rightPrice}}
</view>
<!-- <view>订货价</view> -->
</view>
<view class="short_name">{{datas.store_name}}</view>
<view class="flex">
<view class="shop_name">
<image class="icon" src="@/static/images/icon/short.png"></image>
<view>{{datas.merchant.mer_name}}</view>
</view>
</view>
<u-line></u-line>
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
<view class="m_title">{{att.attr_name}}</view>
<view class="flex" style="flex-wrap: wrap;">
<view class="attr" :class="{'attr_active': item.check}"
v-for="(item, indexn) in att.attr_value" :key="indexn"
@click="changeAttr(indexw, indexn)">
{{item.attr}}
</view>
</view>
</block>
<view class="m_title num">
<view>购买数量</view>
<view class="input">
<view class="input_item sub" @click="subCartNum">-</view>
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
<view class="input_item plus" @click="plusCartNum">+</view>
</view>
</view>
<view>
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
</view>
</view>
</scroll-view>
<view class="button">
<view class="b_icon" @click="navgoCart()">
<image src="@/static/images/icon/car.png"></image>
<view>购物车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
</view>
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
postCartAdd,
getProductDetail
} from '@/api/store.js';
export default {
name: "shortPopup",
props: {
source:{
type: Number,
default: null
},
isBuy: {
type: Boolean,
default: false
}
},
data() {
return {
isShow: false, //
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
datas: {
image: '',
store_name: '',
merchant: {
mer_name: ''
},
price: '',
},
product: {},
attrValue: [],
attr: [], //
changeSkuKey: '', //key
sku: {}, //
sku_key_list: [], //
changeSkuKey: '', //
change: {
stock: ''
},
cart_num: 1, //
goodsNum: 0, //
current: 0, //
};
},
mounted() {},
computed:{
leftPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
},
rightPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
}
},
methods: {
// ,
setDatas(datas, goodsNum) {
getProductDetail(datas.product_id).then((res)=>{
this.attr = res.data.attr;
if(this.attr.length>0) this.attr.forEach((item, index)=>{
this.changeAttr(index, 0);
})
else this.changeSkuKey = '';
})
this.goodsNum = goodsNum;
this.datas = datas;
this.product = datas.product;
this.attrValue = datas.product?.attrValue;
this.change = this.attrValue[0];
this.cart_num = 1;
this.sku = datas.sku||{};
this.sku_key_list = Object.keys(this.sku);
},
//
inputCartNum(e) {
if(this.sku){
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.sku[this.changeSkuKey].stock;
})
}
}else if (this.change.stock <= this.cart_num) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.change.stock;
})
}
},
//
subCartNum() {
if (this.cart_num <= 1) {
return uni.showToast({
icon: 'none',
title: '最少要买一件哦'
})
}
this.cart_num--;
},
//
plusCartNum() {
if(this.sku){
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
}else if (this.change.stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
this.cart_num++;
},
changeAttr: function(indexw, indexn) {
let that = this;
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
this.attr[indexw].attr_value.forEach((item, index)=>{
if(index==indexn)item.check = true;
else item.check = false;
})
let value = that.getCheckedValue().join(",");
this.changeSkuKey = value;
},
//
getCheckedValue: function() {
let productAttr = this.attr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
if (productAttr[i].index === productAttr[i].attr_values[j]) {
value.push(productAttr[i].attr_values[j]);
}
}
}
return value;
},
//
addcart() {
if (this.sku[this.changeSkuKey]) {
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
let data = {
cart_num: this.cart_num,
is_new: 0,
product_attr_unique: this.sku[this.changeSkuKey].unique,
product_id: this.datas.product_id,
product_type: this.datas.product_type,
source: this.source,
spread_id: "",
}
let that = this
let res = postCartAdd({
...data
}).then((res, err) => {
uni.showToast({
title: "加入成功",
duration: 1000,
})
this.$emit('addCart');
this.close();
if(this.isBuy){
this.navgoCart();
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
} else {
uni.showToast({
icon: 'none',
title: '商品规格不存在'
})
}
},
//
changeCurrent(e){
this.current = e.detail.current;
},
navgoCart(url=null) {
if(!url) {
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
else url = '/pages/order_addcart/order_addcart';
}
uni.navigateTo({
url
})
},
open() {
this.$refs.popupRef.open();
},
close() {
this.$refs.popupRef.close();
},
changeShow(e) {
this.isShow = e.show;
}
}
}
</script>
<style lang="scss">
.pop {
background-color: #fff;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
position: relative;
.scroll{
height: calc(90vh - 150rpx);
}
.flex_end {
align-items: flex-end;
}
.image {
height: 750rpx;
width: 750rpx;
position: relative;
.current{
position: absolute;
bottom: 70rpx;
left: 30rpx;
width: 67rpx;
height: 37rpx;
background: rgba(#333, 0.2);
border-radius: 11rpx 11rpx 11rpx 11rpx;
text-align: center;
color: #fff;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
.img {
width: 100%;
height: 100%;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
}
.close {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 50.82rpx;
height: 50.82rpx;
}
.border {
position: absolute;
bottom: -1rpx;
left: 0;
background-color: #fff;
height: 40rpx;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
}
}
.white_card {
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
background-color: #fff;
margin: 0 28rpx;
padding-bottom: 30rpx;
color: #737373;
font-size: 26.29rpx;
.price {
font-size: 35rpx;
font-family: SF Pro Display-Semibold, SF Pro Display;
font-weight: 600;
color: #F84221;
padding-right: 30rpx;
.pro {
font-size: 49.07rpx;
}
}
.short_name {
font-size: 33rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
}
.shop_name {
display: flex;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 26rpx 26rpx 26rpx 26rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
align-items: center;
.icon {
width: 31.54rpx;
height: 31.54rpx;
margin-right: 10rpx;
}
}
.m_title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 31rpx;
margin-bottom: 21rpx;
}
.attr {
opacity: 1;
border: 1rpx solid #F84221;
color: #333333;
padding: 15rpx 30rpx;
margin-right: 20rpx;
height: 63rpx;
line-height: 60rpx;
border-radius: 63rpx;
display: flex;
align-items: center;
justify-content: center;
}
.attr_active{
// background-color: #FEF5F3;
// color: #F84221;
background-color: #F84221;
color: #fff;
}
.num {
display: flex;
justify-content: space-between;
align-items: center;
.input {
display: flex;
align-items: center;
height: 48rpx;
.input_item {
width: 44rpx;
height: 44rpx;
text-align: center;
line-height: 40rpx;
border: 2rpx solid #fff;
font-size: 26rpx;
color: #333;
}
.input_view {
width: 60rpx;
}
.sub {
border: 2rpx solid #FCB9AD;
border-radius: 7rpx 0rpx 0rpx 7rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
.plus {
border: 2rpx solid #FCB9AD;
border-radius: 0rpx 7rpx 7rpx 0rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
}
}
}
.button {
padding: 28rpx;
margin-bottom: 28rpx;
background-color: #fff;
display: flex;
justify-content: space-around;
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
.b_icon {
display: flex;
flex-direction: column;
align-items: center;
font-size: 19rpx;
font-weight: 400;
color: #333333;
position: relative;
image {
width: 50.82rpx;
height: 50.82rpx;
}
.badge {
position: absolute;
top: -5rpx;
right: -10rpx;
color: #fff;
min-width: 28rpx;
height: 28rpx;
text-align: center;
line-height: 24rpx;
background: #F84221;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FFFFFF;
}
}
.btn {
width: 575rpx;
height: 84rpx;
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
}
</style>

View File

@ -1,534 +0,0 @@
<template>
<view>
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
<view class="pop">
<scroll-view scroll-y class="scroll">
<view class="image">
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
<block v-if="product.slider_image && product.slider_image.length>0">
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
<image class="img" :src="item"></image>
</swiper-item>
</block>
<swiper-item v-else>
<image class="img" :src="datas.image||defualtImg"></image>
</swiper-item>
</swiper>
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
<view class="border"></view>
</view>
<view class="white_card">
<view class="flex flex_end">
<block v-if="datas.limited_price">
<view class="price"><text class="pro">{{leftPrice2}}.</text>{{rightPrice2}}
</view>
<view class="price" style="text-decoration: line-through;color: #999;font-weight: 400;font-size: 28rpx;">原价: <text>{{leftPrice}}.</text>{{rightPrice}}</view>
</block>
<view v-else class="price"><text>{{leftPrice}}.</text>{{rightPrice}}</view>
<!-- <view>订货价</view> -->
</view>
<view class="short_name">{{datas.store_name}}</view>
<view class="flex">
<view class="shop_name">
<image class="icon" src="@/static/images/icon/short.png"></image>
<view>{{datas.merchant.mer_name}}</view>
</view>
</view>
<u-line></u-line>
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
<view class="m_title">{{att.attr_name}}</view>
<view class="flex" style="flex-wrap: wrap;">
<view class="attr" :class="{'attr_active': item.check}"
v-for="(item, indexn) in att.attr_value" :key="indexn"
@click="changeAttr(indexw, indexn)">
{{item.attr}}
</view>
</view>
</block>
<view class="m_title num">
<view>购买数量</view>
<view class="input">
<view class="input_item sub" @click="subCartNum">-</view>
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
<view class="input_item plus" @click="plusCartNum">+</view>
</view>
</view>
<view>
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
</view>
</view>
</scroll-view>
<view class="button">
<!-- <view class="b_icon" @click="navgoCart()">
<image src="@/static/images/icon/car.png"></image>
<view>购物车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
</view> -->
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
postCartAdd,
getProductDetail
} from '@/api/store.js';
import { Toast } from '../libs/uniApi';
import { data } from '../uni_modules/uview-ui/libs/mixin/mixin';
export default {
name: "shortPopup",
props: {
source:{
type: Number,
default: null
},
isBuy: {
type: Boolean,
default: false
}
},
data() {
return {
isShow: false, //
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
datas: {
image: '',
store_name: '',
merchant: {
mer_name: ''
},
price: '',
},
product: {},
attrValue: [],
attr: [], //
changeSkuKey: '', //key
sku: {}, //
sku_key_list: [], //
changeSkuKey: '', //
change: {
stock: ''
},
cart_num: 1, //
goodsNum: 0, //
current: 0, //
};
},
mounted() {},
computed:{
leftPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
},
rightPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
},
leftPrice2(){
return this.datas.limited_price.split('.')[0]||'0';
},
rightPrice2(){
return this.datas.limited_price.split('.')[1]||'00';
}
},
methods: {
// ,
setDatas(datas, goodsNum) {
getProductDetail(datas.product_id).then((res)=>{
this.attr = res.data.attr;
if(this.attr.length>0) this.attr.forEach((item, index)=>{
this.changeAttr(index, 0);
})
else this.changeSkuKey = '';
})
this.goodsNum = goodsNum;
this.datas = datas;
this.product = datas.product;
this.attrValue = datas.product?.attrValue;
this.change = this.attrValue[0];
this.cart_num = 1;
this.sku = datas.sku||{};
this.sku_key_list = Object.keys(this.sku);
},
//
inputCartNum(e) {
if(this.sku){
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.sku[this.changeSkuKey].stock;
})
}
}else if (this.change.stock <= this.cart_num) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.change.stock;
})
}
},
//
subCartNum() {
if (this.cart_num <= 1) {
return uni.showToast({
icon: 'none',
title: '最少要买一件哦'
})
}
this.cart_num--;
},
//
plusCartNum() {
return Toast('最多购买一件哦');
if(this.sku){
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
}else if (this.change.stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
this.cart_num++;
},
changeAttr: function(indexw, indexn) {
let that = this;
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
this.attr[indexw].attr_value.forEach((item, index)=>{
if(index==indexn)item.check = true;
else item.check = false;
})
let value = that.getCheckedValue().join(",");
this.changeSkuKey = value;
},
//
getCheckedValue: function() {
let productAttr = this.attr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
if (productAttr[i].index === productAttr[i].attr_values[j]) {
value.push(productAttr[i].attr_values[j]);
}
}
}
return value;
},
//
addcart() {
if (this.sku[this.changeSkuKey]) {
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
let data = {
cart_num: this.cart_num,
is_new: 0,
product_attr_unique: this.sku[this.changeSkuKey].unique,
product_id: this.datas.product_id,
product_type: this.datas.product_type,
source: this.source,
spread_id: "",
}
let that = this
let res = postCartAdd({
...data
}).then((res, err) => {
if(this.isBuy) return uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${this.datas.merchant.type_id}&source=${this.source}`
});
uni.showToast({
title: "加入成功",
duration: 1000,
})
this.$emit('addCart');
this.close();
if(this.isBuy){
this.navgoCart();
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
} else {
uni.showToast({
icon: 'none',
title: '商品规格不存在'
})
}
},
//
changeCurrent(e){
this.current = e.detail.current;
},
navgoCart(url=null) {
if(!url) {
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
else url = '/pages/order_addcart/order_addcart';
}
uni.navigateTo({
url
})
},
open() {
this.$refs.popupRef.open();
},
close() {
this.$refs.popupRef.close();
},
changeShow(e) {
this.isShow = e.show;
}
}
}
</script>
<style lang="scss">
.pop {
background-color: #fff;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
position: relative;
.scroll{
height: calc(90vh - 150rpx);
}
.flex_end {
align-items: flex-end;
}
.image {
height: 750rpx;
width: 750rpx;
position: relative;
.current{
position: absolute;
bottom: 70rpx;
left: 30rpx;
width: 67rpx;
height: 37rpx;
background: rgba(#333, 0.2);
border-radius: 11rpx 11rpx 11rpx 11rpx;
text-align: center;
color: #fff;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
.img {
width: 100%;
height: 100%;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
}
.close {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 50.82rpx;
height: 50.82rpx;
}
.border {
position: absolute;
bottom: -1rpx;
left: 0;
background-color: #fff;
height: 40rpx;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
}
}
.white_card {
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
background-color: #fff;
margin: 0 28rpx;
padding-bottom: 30rpx;
color: #737373;
font-size: 26.29rpx;
.price {
font-size: 35rpx;
font-family: SF Pro Display-Semibold, SF Pro Display;
font-weight: 600;
color: #F84221;
padding-right: 30rpx;
.pro {
font-size: 49.07rpx;
}
}
.short_name {
font-size: 33rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
}
.shop_name {
display: flex;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 26rpx 26rpx 26rpx 26rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
align-items: center;
.icon {
width: 31.54rpx;
height: 31.54rpx;
margin-right: 10rpx;
}
}
.m_title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 31rpx;
margin-bottom: 21rpx;
}
.attr {
opacity: 1;
border: 1rpx solid #F84221;
color: #333333;
padding: 15rpx 30rpx;
margin-right: 20rpx;
height: 63rpx;
line-height: 60rpx;
border-radius: 63rpx;
display: flex;
align-items: center;
justify-content: center;
}
.attr_active{
// background-color: #FEF5F3;
// color: #F84221;
background-color: #F84221;
color: #fff;
}
.num {
display: flex;
justify-content: space-between;
align-items: center;
.input {
display: flex;
align-items: center;
height: 48rpx;
.input_item {
width: 44rpx;
height: 44rpx;
text-align: center;
line-height: 40rpx;
border: 2rpx solid #fff;
font-size: 26rpx;
color: #333;
}
.input_view {
width: 60rpx;
}
.sub {
border: 2rpx solid #FCB9AD;
border-radius: 7rpx 0rpx 0rpx 7rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
.plus {
border: 2rpx solid #FCB9AD;
border-radius: 0rpx 7rpx 7rpx 0rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
}
}
}
.button {
padding: 28rpx;
margin-bottom: 28rpx;
background-color: #fff;
display: flex;
justify-content: space-around;
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
.b_icon {
display: flex;
flex-direction: column;
align-items: center;
font-size: 19rpx;
font-weight: 400;
color: #333333;
position: relative;
image {
width: 50.82rpx;
height: 50.82rpx;
}
.badge {
position: absolute;
top: -5rpx;
right: -10rpx;
color: #fff;
min-width: 28rpx;
height: 28rpx;
text-align: center;
line-height: 24rpx;
background: #F84221;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FFFFFF;
}
}
.btn {
width: 575rpx;
height: 84rpx;
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
}
</style>

View File

@ -1,217 +0,0 @@
<template>
<view class="uni-numbox">
<!-- -部分 -->
<view class="uni-numbox-minus" @click="_calcValue('subtract')">
<text :class="minDisabled?'uni-numbox-disabled': ''">-</text>
</view>
<!-- 中间输入数值部分 -->
<input class="uni-numbox-value" type="number" :disabled="disabled" :value="inputValue" @blur="_onBlur">
<!-- + 部分 -->
<view class="uni-numbox-plus" @click="_calcValue('add')">
<text :class="maxDisabled?'uni-numbox-disabled': ''">+</text>
</view>
</view>
</template>
<script>
export default {
name: 'uni-number-box',
props: {
// isMax
isMax: {
type: Boolean,
default: false
},
// isMin
isMin: {
type: Boolean,
default: false
},
// index
index: {
type: String,
default: 0
},
// value
value: {
type: Number,
default: 0
},
// min
min: {
type: Number,
default: -Infinity
},
// max
max: {
type: Number,
default: Infinity
},
// step
step: {
type: Number,
default: 1
},
// disabled
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
inputValue: this.value,
minDisabled: false,
maxDisabled: false
}
},
created() {
this.maxDisabled = this.isMax;
this.minDisabled = this.isMin;
},
computed: {
},
watch: {
inputValue(number) {
const data = {
number: number,
index: this.index
}
this.$emit('eventChange', data);
}
},
methods: {
_calcValue(type) {
const scale = this._getDecimalScale();
let value = this.inputValue * scale;
let newValue = 0;
let step = this.step * scale;
if (type === 'subtract') {
newValue = value - step;
if (newValue <= this.min) {
this.minDisabled = true;
}
if (newValue < this.min) {
newValue = this.min
this.$util.Tips({
title: '达到最小值了',
icon: 'error'
})
}
if (newValue < this.max && this.maxDisabled === true) {
this.maxDisabled = false;
}
} else if (type === 'add') {
newValue = value + step;
if (newValue >= this.max) {
this.maxDisabled = true;
}
if (newValue > this.max) {
this.$util.Tips({
title: '达到最大值了',
icon: 'error'
})
newValue = this.max
}
if (newValue > this.min && this.minDisabled === true) {
this.minDisabled = false;
}
}
if (newValue === value) {
return;
}
this.inputValue = newValue / scale;
this.$emit('increment', this.inputValue)
},
_getDecimalScale() {
let scale = 1;
//
if (~~this.step !== this.step) {
scale = Math.pow(10, (this.step + '').split('.')[1].length);
}
return scale;
},
_onBlur(event) {
let value = event.detail.value;
if (!value) {
this.inputValue = 0;
return
}
value = +value;
if (value > this.max) {
value = this.max;
} else if (value < this.min) {
value = this.min
}
this.inputValue = value
}
}
}
</script>
<style>
.uni-numbox {
/* position:absolute; */
/* left: 30upx;
bottom: 0; */
display: flex;
justify-content: flex-start;
align-items: center;
width: 200upx;
height: 50upx;
/* background:#f5f5f5; */
}
.uni-numbox-minus {
background: #EEEEEE !important;
color: #909399 !important;
}
.uni-numbox-minus,
.uni-numbox-plus {
margin: 0;
width: 53rpx;
height: 53rpx;
background-color: #F84221;
opacity: 1;
line-height: 53rpx;
text-align: center;
position: relative;
color: #fff;
font-size: 40upx;
}
.uni-numbox-minus .yticon,
.uni-numbox-plus .yticon {
font-size: 36upx;
color: #555;
}
.uni-numbox-minus {
/* border-right: none;
border-top-left-radius: 6upx;
border-bottom-left-radius: 6upx; */
}
.uni-numbox-plus {
/* border-left: none;
border-top-right-radius: 6upx;
border-bottom-right-radius: 6upx; */
}
.uni-numbox-value {
position: relative;
/* background-color: #f5f5f5; */
width: 90upx;
height: 50upx;
text-align: center;
padding: 0;
font-size: 30upx;
}
.uni-numbox-disabled.yticon {
color: #d6d6d6;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

View File

@ -0,0 +1,249 @@
<template>
<view class="tf-Box-Bg">
<view class="tf-Box">
<view class="tf-Box-title">
请完成安全验证
<view class="tf-close" @click.stop="close_"></view>
</view>
<canvas :style="{ width: canvasW + 'px', height: canvasH + 'px' }"
class="tf-Box-center" canvas-id="tf-verify-canvas" id="tf-verify-canvas"></canvas>
<movable-area class="tf-Box-BtnBox">
<view class="tf-Box-BtnBox-text">滑动滑块完成拼图</view>
<movable-view class="tf-Box-BtnNei" direction="all" :x="canvasX2" @change="changePath" @touchend="endTouch">
<view class="tf-Box-BtnNei-leftBox" :style="{backgroundColor:verifyImgs[verifyIndex].color}"></view>
</movable-view>
</movable-area>
</view>
</view>
</template>
<script>
export default {
name:"tf-verify-img",
data() {
return {
verifyImgs:[{
src:'/static/verify/1.jpg',
color:'#38a7b7'
},{
src:'/static/verify/2.jpg',
color:'#485967'
},{
src:'/static/verify/3.jpg',
color:'#485967'
},{
src:'/static/verify/4.jpg',
color:'#485967'
},{
src:'/static/verify/5.jpg',
color:'#485967'
},{
src:'/static/verify/6.jpg',
color:'#485967'
}],
verifyIndex:0,
canvasW:"",
canvasH:"",
canvasX2:0,//
canvasX:0,//X
ctx:false,
jgX:0,//X
dqImgPath:'',//
};
},
created() {
this.canvasW = uni.upx2px(580);
this.canvasH = uni.upx2px(290);
},
mounted() {
this.$nextTick(()=>{
this.init()
})
},
methods:{
// minNummaxNum
randomNum(minNum,maxNum){
switch(arguments.length){
case 1:
return parseInt(Math.random()*minNum+1,10);
break;
case 2:
return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
break;
default:
return 0;
break;
}
},
close_(){
this.$emit('close')
},
init(){
this.canvasX2--;
this.canvasX = 0;
this.verifyIndex = this.randomNum(0,this.verifyImgs.length-1);
this.ctx = uni.createCanvasContext('tf-verify-canvas',this);
this.jgX = this.randomNum(uni.upx2px(150),uni.upx2px(450));
this.dqImgPath = this.verifyImgs[this.verifyIndex].src;
this.huatu();
},
endTouch(){
if(Math.abs(this.canvasX-this.jgX)<=5){
this.$emit('succeed')
}else{
uni.showToast({
title: '验证失败',
icon:"error"
});
this.init();
}
},
huatu(){
let this_ = this;
let r = uni.upx2px(10);
let XX = this.canvasX;
let YY = uni.upx2px(100);
let cs = uni.upx2px(20);
this_.ctx.drawImage(this_.dqImgPath,0,0,this_.canvasW,this_.canvasH);
//
this_.ctx.beginPath();
this_.ctx.moveTo(-2*r+this_.jgX+cs+2*r, YY-2*r+2*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+5.5*r, YY-2*r+2*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+5.5*r, YY-2*r+3*r, XX-2+this_.jgX*r+cs+6.5*r, YY-2*r+3*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+7.5*r, YY-2*r+3*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+8.5*r, YY-2*r+3*r, -2*r+this_.jgX+cs+8.5*r, YY-2*r+2*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+12*r, YY-2*r+2*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+12*r, YY-2*r+11*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+8.5*r, YY-2*r+11*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+8.5*r, YY-2*r+12*r, -2*r+this_.jgX+cs+7.5*r, YY-2*r+12*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+6.5*r, YY-2*r+12*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+5.5*r, YY-2*r+12*r, -2*r+this_.jgX+cs+5.5*r, YY-2*r+11*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+2*r, YY-2*r+11*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+2*r, YY-2*r+8*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+3*r, YY-2*r+8*r, -2*r+this_.jgX+cs+3*r, YY-2*r+7*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+3*r, YY-2*r+6*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+3*r, YY-2*r+5*r, -2*r+this_.jgX+cs+2*r, YY-2*r+5*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+2*r, YY-2*r+2*r);
this_.ctx.shadowBlur=10;
this_.ctx.shadowColor="#ffffff";
this_.ctx.fillStyle = "rgba(0,0,0,0.5)";
this_.ctx.fill();
this_.ctx.restore();
//
this_.ctx.beginPath();
this_.ctx.save();
this_.ctx.moveTo(XX-2*r+cs+2*r, YY-2*r+2*r);
this_.ctx.lineTo(XX-2*r+cs+5.5*r, YY-2*r+2*r);
this_.ctx.arcTo(XX-2*r+cs+5.5*r, YY-2*r+3*r, XX-2*r+cs+6.5*r, YY-2*r+3*r, r);
this_.ctx.lineTo(XX-2*r+cs+7.5*r, YY-2*r+3*r);
this_.ctx.arcTo(XX-2*r+cs+8.5*r, YY-2*r+3*r, XX-2*r+cs+8.5*r, YY-2*r+2*r, r);
this_.ctx.lineTo(XX-2*r+cs+12*r, YY-2*r+2*r);
this_.ctx.lineTo(XX-2*r+cs+12*r, YY-2*r+11*r);
this_.ctx.lineTo(XX-2*r+cs+8.5*r, YY-2*r+11*r);
this_.ctx.arcTo(XX-2*r+cs+8.5*r, YY-2*r+12*r, XX-2*r+cs+7.5*r, YY-2*r+12*r, r);
this_.ctx.lineTo(XX-2*r+cs+6.5*r, YY-2*r+12*r);
this_.ctx.arcTo(XX-2*r+cs+5.5*r, YY-2*r+12*r, XX-2*r+cs+5.5*r, YY-2*r+11*r, r);
this_.ctx.lineTo(XX-2*r+cs+2*r, YY-2*r+11*r);
this_.ctx.lineTo(XX-2*r+cs+2*r, YY-2*r+8*r);
this_.ctx.arcTo(XX-2*r+cs+3*r, YY-2*r+8*r, XX-2*r+cs+3*r, YY-2*r+7*r, r);
this_.ctx.lineTo(XX-2*r+cs+3*r, YY-2*r+6*r);
this_.ctx.arcTo(XX-2*r+cs+3*r, YY-2*r+5*r, XX-2*r+cs+2*r, YY-2*r+5*r, r);
this_.ctx.lineTo(XX-2*r+cs+2*r, YY-2*r+2*r);
this_.ctx.shadowBlur=10;
this_.ctx.shadowColor="#ffffff";
this_.ctx.fill();
this_.ctx.clip();
this_.ctx.drawImage(this_.dqImgPath,this_.canvasX-this_.jgX,0,this_.canvasW,this_.canvasH);
this_.ctx.restore();
//
this_.ctx.draw();
},
changePath(e){
this.canvasX = e.target.x;
this.huatu();
}
}
}
</script>
<style lang="less">
.tf-Box-Bg{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
background-color: rgba(0,0,0,.3);
display: flex;
align-items: center;
justify-content: center;
.tf-Box{
width: 640upx;
height: 584upx;
background-color: #fff;
border-radius: 6upx;
box-shadow: 0 0 50upx 0upx rgba(0,0,0,.2);
.tf-Box-title{
height: 100upx;
line-height: 1;
padding: 0 32upx;
font-size: 32upx;
border-bottom: 1px solid #E1E3E9;
display: flex;
align-items: center;
justify-content: space-between;
.tf-close{
width: 28upx;
height: 28upx;
background-image: url(img/tf-close.png);
background-size: 100% 100%;
}
}
.tf-Box-center{
margin: 30upx auto;
border-radius: 6upx;
}
.tf-Box-BtnBox{
margin: 30upx auto;
width: 580upx;
height: 75upx;
line-height: 75upx;
text-align: center;
font-size: 28upx;
border-radius: 6upx;
border: 1px solid #E1E3E9;
background-color: #F7F8F9;
overflow: hidden;
position: relative;
.tf-Box-BtnBox-text{
width: 100%;
height: 75upx;
position: absolute;
top: 0;
left: 0;
color: #424649;
text-align: center;
}
.tf-Box-BtnNei{
height: 75upx;
width: 75upx;
background-color: #fff;
box-shadow: 0 0 10upx 0upx rgba(0,0,0,.2);
background-image: url(img/tf-arrows.png);
background-size: 34upx;
background-position: center;
background-repeat: no-repeat;
.tf-Box-BtnNei-leftBox{
position: absolute;
top: 0;
left: -580upx;
width: 580upx;
height: 100%;
}
}
}
}
}
</style>

View File

@ -1,241 +0,0 @@
<template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
<uni-transition :mode-class="['fade']" :styles="maskClass" :show="showTrans" @click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :show="showTrans" @click="onTap">
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
</view>
</uni-transition>
</view>
</template>
<script>
export default {
props: {
//
animation: {
type: Boolean,
default: true
},
// top: bottomcenter
type: {
type: String,
default: 'center'
},
// maskClick
maskClick: {
type: Boolean,
default: true
}
},
data() {
return {
ani: [],
showPopup: false,
showTrans: false,
maskClass: {
'position': 'fixed',
'bottom': 0,
'top': 0,
'left': 0,
'right': 0,
'backgroundColor': 'rgba(0, 0, 0, 0)'
},
transClass: {
'position': 'fixed',
'left': 0,
'right': 0,
}
}
},
watch: {
type: {
handler: function(newVal) {
switch (this.type) {
case 'top':
this.ani = ['slide-top']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
}
break
case 'bottom':
this.ani = ['slide-bottom']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
'bottom': 0
}
console.log('直播调用弹窗')
break
case 'center':
this.ani = ['zoom-out', 'fade']
this.transClass = {
'position': 'fixed',
/* #ifndef APP-NVUE */
'display': 'flex',
'flexDirection': 'column',
/* #endif */
'bottom': 0,
'left': 0,
'right': 0,
'top': 0,
'justifyContent': 'center',
'alignItems': 'center'
}
break
}
},
immediate: true
}
},
created() {},
methods: {
clear(e) {
// TODO nvue
e.stopPropagation()
},
open() {
this.showPopup = true
this.$nextTick(() => {
setTimeout(() => {
this.showTrans = true
}, 0);
})
this.$emit('change', {
show: true
})
},
close(type) {
this.showTrans = false
this.$nextTick(() => {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.$emit('change', {
show: false
})
this.showPopup = false
}, 0)
})
},
onTap() {
if (!this.maskClick) return
this.close()
}
}
}
</script>
<style scoped>
.uni-popup {
position: fixed;
/* #ifdef H5 */
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
bottom: 0;
left: 0;
right: 0;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.uni-popup__mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.4);
opacity: 0;
}
.mask-ani {
transition-property: opacity;
transition-duration: 0.2s;
}
.uni-top-mask {
opacity: 1;
}
.uni-bottom-mask {
opacity: 1;
}
.uni-center-mask {
opacity: 1;
}
.uni-popup__wrapper {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
}
.top {
top: 0;
left: 0;
right: 0;
transform: translateY(-500px);
}
.bottom {
bottom: 0;
left: 0;
right: 0;
transform: translateY(500px);
}
.center {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
bottom: 0;
left: 0;
right: 0;
top: 0;
justify-content: center;
align-items: center;
transform: scale(1.2);
opacity: 0;
}
.uni-popup__wrapper-box {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
}
.content-ani {
/* transition: transform 0.3s;
*/
transition-property: transform, opacity;
transition-duration: 0.2s;
}
.uni-top-content {
transform: translateY(0);
}
.uni-bottom-content {
transform: translateY(0);
}
.uni-center-content {
transform: scale(1);
opacity: 1;
}
</style>

View File

@ -1,241 +0,0 @@
<template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
<uni-transition :mode-class="['fade']" :styles="maskClass" :show="showTrans" @click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :show="showTrans" @click="onTap">
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
</view>
</uni-transition>
</view>
</template>
<script>
export default {
props: {
//
animation: {
type: Boolean,
default: true
},
// top: bottomcenter
type: {
type: String,
default: 'center'
},
// maskClick
maskClick: {
type: Boolean,
default: true
}
},
data() {
return {
ani: [],
showPopup: false,
showTrans: false,
maskClass: {
'position': 'fixed',
'bottom': 0,
'top': 0,
'left': 0,
'right': 0,
'backgroundColor': 'rgba(0, 0, 0, 0.4)'
},
transClass: {
'position': 'fixed',
'left': 0,
'right': 0,
}
}
},
watch: {
type: {
handler: function(newVal) {
switch (this.type) {
case 'top':
this.ani = ['slide-top']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
}
break
case 'bottom':
this.ani = ['slide-bottom']
this.transClass = {
'position': 'fixed',
'left': 0,
'right': 0,
'bottom': 0
}
console.log('底部条用')
console.log(this.type)
break
case 'center':
this.ani = ['zoom-out', 'fade']
this.transClass = {
'position': 'fixed',
/* #ifndef APP-NVUE */
'display': 'flex',
'flexDirection': 'column',
/* #endif */
'bottom': 0,
'left': 0,
'right': 0,
'top': 0,
'justifyContent': 'center',
'alignItems': 'center'
}
break
}
},
immediate: true
}
},
created() {},
methods: {
clear(e) {
// TODO nvue
e.stopPropagation()
},
open() {
this.showPopup = true
this.$nextTick(() => {
setTimeout(() => {
this.showTrans = true
}, 50);
})
this.$emit('change', {
show: true
})
},
close(type) {
this.showTrans = false
this.$nextTick(() => {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.$emit('change', {
show: false
})
this.showPopup = false
}, 300)
})
},
onTap() {
if (!this.maskClick) return
this.close()
}
}
}
</script>
<style scoped>
.uni-popup {
position: fixed;
/* #ifdef H5 */
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
bottom: 0;
left: 0;
right: 0;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.uni-popup__mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.4);
opacity: 0;
}
.mask-ani {
transition-property: opacity;
transition-duration: 0.2s;
}
.uni-top-mask {
opacity: 1;
}
.uni-bottom-mask {
opacity: 1;
}
.uni-center-mask {
opacity: 1;
}
.uni-popup__wrapper {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
}
.top {
top: 0;
left: 0;
right: 0;
transform: translateY(-500px);
}
.bottom {
bottom: 0;
left: 0;
right: 0;
transform: translateY(500px);
}
.center {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
bottom: 0;
left: 0;
right: 0;
top: 0;
justify-content: center;
align-items: center;
transform: scale(1.2);
opacity: 0;
}
.uni-popup__wrapper-box {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
}
.content-ani {
/* transition: transform 0.3s;
*/
transition-property: transform, opacity;
transition-duration: 0.2s;
}
.uni-top-content {
transform: translateY(0);
}
.uni-bottom-content {
transform: translateY(0);
}
.uni-center-content {
transform: scale(1);
opacity: 1;
}
</style>

View File

@ -1,261 +0,0 @@
<template>
<view :style="viewColor">
<view class="address-window" :class="display==true?'on':''">
<view class='title'>请选择所在村队<text class='iconfont icon-guanbi' @tap='close'></text></view>
<view class="address-count">
<view class="address-selected">
<view v-for="(item,index) in selectedArr" :key="index" class="selected-list" :class="{active:index === selectedIndex}" @click="change(item.parent_id, index)">
{{item.name}}
<text class="iconfont icon-xiangyou"></text>
</view>
<view class="selected-list" :class="{active:-1 === selectedIndex}" v-if="showMore" @click="change(-1, -1)">
<text class="iconfont icon-xiangyou"></text>
请选择
</view>
</view>
<scroll-view scroll-y="true" :scroll-top="scrollTop" class="address-list" @scroll="scroll">
<view v-for="(item,index) in addressList" :key="index" class="list" :class="{active:item.id === activeId}" @click="selected(item)">
<text class="item-name">{{item.name}}</text>
<text v-if="item.id === activeId" class="iconfont icon-duihao2"></text>
</view>
</scroll-view>
</view>
</view>
<view class='mask' catchtouchmove="true" :hidden='display==false' @tap='close'></view>
</view>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {getAddressList} from '@/api/user.js';
import {brigade } from '@/api/api.js';
import { mapGetters } from "vuex";
const CACHE_ADDRESS = {};
export default {
props: {
display: {
type: Boolean,
default: true
},
address: Array,
},
data() {
return {
active: 0,
//
addressList: [],
selectedArr: [],
selectedIndex: -1,
is_loading: false,
old: { scrollTop: 0 },
scrollTop: 0
};
},
computed:{
...mapGetters(['viewColor']),
activeId(){
return this.selectedIndex == -1 ? 0 : this.selectedArr[this.selectedIndex].id
},
showMore(){
return this.selectedArr.length ? this.selectedArr[this.selectedArr.length - 1].snum > 0 : true
}
},
watch:{
address(n){
this.selectedArr = n ? [...n] : []
},
display(n){
if(!n) {
this.addressList = [];
this.selectedArr = this.address ? [...this.address] : [];
this.selectedIndex = -1;
this.is_loading = false;
}else{
this.loadAddress()
}
}
},
mounted() {
this.loadAddress()
},
methods: {
change(pid,index){
if(this.selectedIndex == index) return;
if(pid === -1){
pid = this.selectedArr.length ? this.selectedArr[this.selectedArr.length -1].id : 0;
}
console.log(index)
this.selectedIndex = index;
this.loadAddress();
},
loadAddress(pid){
if(CACHE_ADDRESS[pid]){
this.addressList = CACHE_ADDRESS[pid];
return ;
}
this.is_loading = true;
brigade(pid).then(res=>{
console.log(res.data)
this.is_loading = false;
CACHE_ADDRESS[pid] = res.data;
this.addressList = res.data;
})
this.goTop()
},
selected(item){
if(this.is_loading) return;
if(this.selectedIndex > -1){
this.selectedArr.splice(this.selectedIndex + 1,999)
this.selectedArr[this.selectedIndex] = item;
this.selectedIndex = -1;
}else if(!item.parent_id){
this.selectedArr = [item];
}else{
this.selectedArr.push(item);
}
if(item.snum){
this.loadAddress(item.id);
} else {
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
this.goTop()
},
close: function() {
this.$emit('changeClose');
},
scroll : function(e) {
this.old.scrollTop = e.detail.scrollTop
},
goTop: function(e) {
this.scrollTop = this.old.scrollTop
this.$nextTick(() => {
this.scrollTop = 0
});
}
}
}
</script>
<style scoped lang="scss">
.address-window {
background-color: #fff;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 101;
border-radius: 30rpx 30rpx 0 0;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
}
.address-window.on {
transform: translate3d(0, 0, 0);
}
.address-window .title {
font-size: 32rpx;
font-weight: bold;
text-align: center;
height: 123rpx;
line-height: 123rpx;
position: relative;
}
.address-window .title .iconfont {
position: absolute;
right: 30rpx;
color: #8a8a8a;
font-size: 35rpx;
}
.address-count{
.address-selected{
padding: 0 30rpx;
margin-top: 10rpx;
position: relative;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #f7f7f7;
}
.selected-list{
font-size: 26rpx;
color: #282828;
line-height: 50rpx;
padding-bottom: 10rpx;
padding-left: 60rpx;
position: relative;
&.active{
color: #e28d54;
}
&:before,&:after{
content: '';
display: block;
position: absolute;
}
&:before{
width: 4rpx;
height: 100%;
background-color: var(--view-theme);
top: 0;
left: 10rpx;
}
&:after{
width: 12rpx;
height: 12rpx;
background: var(--view-theme);
border-radius: 100%;
left: 6rpx;
top: 50%;
margin-top: -8rpx;
}
&:first-child,&:last-child{
&:before{
height: 50%;
}
}
&:first-child{
&:before{
top: auto;
bottom: 0;
}
}
.iconfont{
font-size: 20rpx;
float: right;
color: #dddddd;
}
}
scroll-view{
height: 550rpx;
}
.address-list{
padding: 0 30rpx;
margin-top: 20rpx;
box-sizing: border-box;
.list{
.iconfont{
float: right;
color: #ddd;
font-size: 22rpx;
}
.item-name{
display: inline-block;
line-height: 50rpx;
margin-bottom: 20rpx;
font-size: 26rpx;
}
&.active{
color: #e28d54;
.iconfont{
color: #e28d54;
}
}
}
}
}
</style>

View File

@ -1,337 +1,285 @@
<template>
<view class="zbp-head-wrapper">
<view class="color-lump"></view>
<view class="bg-img">
<img :src="bgColor" alt="">
</view>
<view class="site-box flex_a_c_j_sb">
<!-- <view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
</navigator> -->
</view>
<!-- 搜索栏 -->
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
<view class="flex_a_c">
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
disabled>
</view>
<button class="search_btn">搜索</button>
</navigator>
<!-- 轮播图 -->
<view class="supply_chains-head">
<swiper class="swiper l_center" @change="swiperChange" :indicator-dots="swiper.indicatorDots"
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)">
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFit">
</u--image>
</swiper-item>
</block>
</swiper>
</view>
<!-- <u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> -->
</view>
<view class="zbp-head-wrapper">
<view class="color-lump"></view>
<view class="bg-img">
<img :src="bgColor" alt="">
</view>
<view class="site-box flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
</navigator>
</view>
<!-- 搜索栏 -->
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
<view class="flex_a_c">
<view class="iconfont icon-sousuo"></view>
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" disabled>
</view>
<button class="search_btn">搜索</button>
</navigator>
<!-- 轮播图 -->
<view class="supply_chains-head">
<swiper class="swiper l_center" @change="swiperChange" :indicator-dots="swiper.indicatorDots"
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)">
<u--image :showLoading="true" :src="item.img" width="694.74rpx" height="242.11rpx" mode="aspectFill">
</u--image>
</swiper-item>
</block>
</swiper>
</view>
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
</view>
</template>
<script>
import {
getArea,
getStreet
} from '@/api/article.js';
import {
getIndexData,
getDiy
} from '@/api/api.js'
import {
mapGetters
} from 'vuex'
import {
Toast
} from '../libs/uniApi';
import Cache from '@/utils/cache';
export default {
props: {
isSelectPlace: {
type: Boolean,
default: false
},
// location_Arr: {
// type: Object,
// default: () => ({})
// },
// town: {
// type: String,
// default: false
// },
import { getArea, getStreet } from '@/api/article.js';
import { getIndexData, getDiy } from '@/api/api.js'
import { getGeocoder } from '@/api/store.js';
import { mapGetters } from 'vuex'
import { Toast } from '../libs/uniApi';
import Cache from '@/utils/cache';
export default {
props: {
isSelectPlace: {
type: Boolean,
default: false
},
location_Arr: {
type: Object,
default: () => ({})
}
},
data() {
return {
defaInd: [0, 0],
street: '',
showPicker: false,
styleConfig: [],
columnData: [],
homeCombData: [],
keyword: '',
bgColor: '',
swiper: {
url: [{
img: ''
}],
indicatorDots: true, //
vertical: false, //
autoplay: true, //
interval: 2000, //
duration: 400 //
},
}
},
computed: mapGetters(['location']),
watch: {
location: {
handler(newVal, oldVal) {
if (newVal.address_component?.street) this.street = newVal.address_component.street
},
immediate: true
}
},
created() {
this.getBanner()
this.Area()
if (this.location.address_component?.street) this.street = this.location.address_component.street
},
methods: {
swiperClick(item) {
const url = item.info[1].value
uni.navigateTo({
url: url
})
},
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
},
confirm(e) {
this.street = e.value[1].name
this.showPicker = false
this.$emit('selectPlce', e)
let adress = Cache.get('LOCATION_DATA',true)
Cache.set('LOCATION_DATA',adress)
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({ area_code: value[0]['code'] }).then(res => {
picker.setColumnValues(1, res.data);
});
}
},
Area() {
getArea({ city_code: 510500 }).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']);
});
},
Street(code) {
getStreet({ area_code: code }).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data);
});
},
},
data() {
return {
defaInd: [0, 0],
street: '',
showPicker: false,
styleConfig: [],
columnData: [],
homeCombData: [],
keyword: '',
bgColor: '',
swiper: {
url: [{
img: ''
}],
indicatorDots: true, //
vertical: false, //
autoplay: true, //
interval: 2000, //
duration: 400 //
},
}
},
watch: {
street(nval, val) {
this.street = nval
}
},
created() {
this.getBanner()
// this.Area()
},
mounted() {
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
methods: {
swiperClick(item) {
const url = item.info[1].value
uni.navigateTo({
url: url
})
},
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
},
confirm(e) {
this.showPicker = false
this.$emit('selectPlce', e)
this.$emit('change', e)
this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
picker.setColumnValues(1, res.data);
});
}
},
Area() {
getArea({
city_code: 510500
}).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']);
});
},
Street(code) {
getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data);
});
},
swiperChange(e) {
let {
current,
source
} = e.detail;
if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img']
this.$emit('kkchange', this.bgColor)
}
},
//
objToArr(data) {
let obj = Object.keys(data).sort();
let m = obj.map(key => data[key]);
return m;
},
async getBanner(id) {
let that = this;
const {
data
} = await getDiy({
id: 0
})
that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => {
if (item.name == 'headerSerch' || item.name == 'homeComb') {
if (item.name == 'homeComb') {
that.swiper.url = item.swiperConfig.list
}
}
})
this.bgColor = this.swiper.url[0].img
},
}
}
swiperChange(e) {
let { current, source } = e.detail;
if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img']
}
},
//
objToArr(data) {
let obj = Object.keys(data).sort();
let m = obj.map(key => data[key]);
return m;
},
async getBanner(id) {
let that = this;
const { data } = await getDiy({ id: 0 })
that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => {
if (item.name == 'headerSerch' || item.name == 'homeComb') {
if (item.name == 'homeComb') {
that.swiper.url = item.swiperConfig.list
}
}
})
this.bgColor = this.swiper.url[0].img
},
}
}
</script>
<style lang="scss" scoped>
.zbp-head-wrapper {
position: relative;
padding-top: 78.95rpx;
overflow: hidden;
<style lang="scss">
.zbp-head-wrapper {
position: relative;
padding-top: 78.95rpx;
overflow: hidden;
.color-lump {
z-index: 1;
position: absolute;
bottom: -86px;
left: 50%;
transform: translate(-50%, 0);
width: 102%;
height: 133px;
border-radius: 30px 30px 0 0;
background-color: #f8f8f8;
}
.color-lump {
z-index: 1;
position: absolute;
bottom: -86px;
left: 50%;
transform: translate(-50%, 0);
width: 102%;
height: 133px;
border-radius: 30px 30px 0 0;
background-color: #fff;
}
.bg-img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
/* #ifdef MP || APP-PLUS */
z-index: -1;
/* #endif */
/* #ifdef H5 */
z-index: 0;
/* #endif */
z-index: 0;
filter: blur(0);
overflow: hidden;
.bg-img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
/* #ifdef MP || APP-PLUS */
z-index: -1;
/* #endif */
/* #ifdef H5 */
z-index: 0;
/* #endif */
z-index: 0;
filter: blur(0);
overflow: hidden;
img {
width: 100%;
height: 100%;
filter: blur(30rpx);
transform: scale(1.5);
}
}
img {
width: 100%;
height: 100%;
filter: blur(30rpx);
transform: scale(1.5);
}
}
.site-box {
margin: 0 auto;
width: 694.74rpx;
height: 66.67rpx;
margin-bottom: 26.32rpx;
position: relative;
z-index: 0;
.site-box {
margin: 0 auto;
width: 694.74rpx;
height: 66.67rpx;
margin-bottom: 26.32rpx;
position: relative;
//
.place_wrapper {
color: #fff;
margin-right: 24.56rpx;
font-size: 31.58rpx;
//
.place_wrapper {
color: #fff;
margin-right: 24.56rpx;
font-size: 30rpx;
.town_name {
margin-left: 10.53rpx;
}
}
.town_name {
margin-left: 21rpx;
}
}
.iconfont {
font-size: 35.09rpx;
}
}
.iconfont {
font-size: 35.09rpx;
}
}
.my-main {
transition: background-color .5s ease;
}
.my-main {
transition: background-color .5s ease;
}
.search_content {
margin: 0 auto;
width: 694.74rpx;
height: 61.4rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 100px;
background: #fff;
margin-bottom: 17.54rpx;
position: relative;
box-sizing: border-box;
.search_content {
margin: 0 auto;
width: 724rpx;
height: 64rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 175rpx;
background: #fff;
margin-bottom: 21rpx;
position: relative;
box-sizing: border-box;
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.search_btn {
color: #fff;
width: 105.26rpx;
height: 52.63rpx;
line-height: 52.63rpx;
background: #f84221;
border-radius: 100px;
font-size: 28.07rpx;
}
}
.search_btn {
color: #fff;
width: 105.26rpx;
height: 56rpx;
line-height: 56rpx;
background: #f84221;
border-radius: 100px;
font-size: 28.07rpx;
}
}
.supply_chains-head {
margin-bottom: 17.54rpx;
position: relative;
z-index: 2;
.supply_chains-head {
margin-bottom: 17.54rpx;
position: relative;
z-index: 2;
.swiper {
width: 694.74rpx;
height: 242.11rpx;
margin: 0 auto;
border-radius: 15px;
overflow: hidden;
.swiper {
width: 724rpx;
height: 259rpx;
margin: 0 auto;
border-radius: 20rpx 20rpx 20rpx 20rpx;
overflow: hidden;
.swi_item {
width: 100%;
height: 259rpx;
}
}
}
}
.swi_item {
width: 100%;
height: 242.11rpx;
}
}
}
}
</style>

View File

@ -1,353 +0,0 @@
<template>
<view class="zbp-head-wrapper">
<view class="color-lump"></view>
<view class="bg-img">
<img :src="bgColor" alt="">
</view>
<view class="site-box flex_a_c_j_sb" style="padding-top: var(--status-bar-height)">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view>
</view>
<view class="" style="display: flex;">
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;margin-right: 20rpx;"></view>
</navigator>
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none">
<view class="iconfont icon-sousuo" style="font-size: 39rpx;color: white;"></view>
</navigator>
</view>
</view>
<!-- 搜索栏 -->
<!-- <navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
<view class="flex_a_c">
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
disabled>
</view>
<button class="search_btn">搜索</button>
</navigator> -->
<!-- 轮播图 -->
<view class="supply_chains-head">
<swiper class="swiper " @change="swiperChange" :indicator-dots="swiper.indicatorDots"
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)">
<!-- <u--image :showLoading="true" :src="item.img" width="750rpx" height="259rpx" mode="aspectFit">
</u--image> -->
<u--image :showLoading="true" :src="item.img" width="750rpx" height="600rpx">
</u--image>
</swiper-item>
</block>
</swiper>
</view>
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
</view>
</template>
<script>
import {
getArea,
getStreet
} from '@/api/article.js';
import {
getIndexData,
getDiy
} from '@/api/api.js'
import {
getGeocoder
} from '@/api/store.js';
import {
mapGetters
} from 'vuex'
import {
Toast
} from '../libs/uniApi';
import Cache from '@/utils/cache';
export default {
props: {
isSelectPlace: {
type: Boolean,
default: false
},
location_Arr: {
type: Object,
default: () => ({})
},
town: {
type: String,
default: false
},
},
data() {
return {
defaInd: [0, 0],
street: '',
showPicker: false,
styleConfig: [],
columnData: [],
homeCombData: [],
keyword: '',
bgColor: '',
swiper: {
url: [{
img: ''
}],
indicatorDots: true, //
vertical: false, //
autoplay: true, //
interval: 2000, //
duration: 400 //
},
}
},
watch: {
street(nval, val) {
this.street = nval
}
},
created() {
this.getBanner()
this.Area()
},
mounted() {
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
methods: {
swiperClick(item) {
const url = item.info[1].value
uni.navigateTo({
url: url
})
},
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
},
confirm(e) {
this.showPicker = false
this.$emit('selectPlce', e)
this.$emit('change', e)
this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
picker.setColumnValues(1, res.data);
});
}
},
Area() {
getArea({
city_code: 510500
}).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']);
});
},
Street(code) {
getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data);
});
},
swiperChange(e) {
let {
current,
source
} = e.detail;
if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img']
this.$emit('kkchange', this.bgColor)
}
},
//
objToArr(data) {
let obj = Object.keys(data).sort();
let m = obj.map(key => data[key]);
return m;
},
async getBanner(id) {
let that = this;
const {
data
} = await getDiy({
id: 0
})
that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => {
if (item.name == 'headerSerch' || item.name == 'homeComb') {
if (item.name == 'homeComb') {
that.swiper.url = item.swiperConfig.list
}
}
})
this.bgColor = this.swiper.url[0].img
},
}
}
</script>
<style lang="scss" scoped>
.zbp-head-wrapper {
position: relative;
// padding-top: 78.95rpx;
overflow: hidden;
// background-color: green;
height: 600rpx;
// .color-lump {
// z-index: 1;
// position: absolute;
// bottom: -86px;
// left: 50%;
// transform: translate(-50%, 0);
// width: 102%;
// height: 133px;
// border-radius: 30px 30px 0 0;
// background-color: #fff;
// }
.bg-img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
/* #ifdef MP || APP-PLUS */
z-index: -1;
/* #endif */
/* #ifdef H5 */
z-index: 0;
/* #endif */
z-index: 0;
filter: blur(0);
overflow: hidden;
img {
width: 100%;
height: 100%;
filter: blur(30rpx);
transform: scale(1.5);
}
}
.site-box {
margin: 0 auto;
width: 750rpx;
height: 66.67rpx;
margin-top: 30rpx;
// margin-bottom: 26.32rpx;
position: absolute;
z-index: 9999;
padding-right: 20rpx;
//
.place_wrapper {
margin-left: 20rpx;
color: #fff;
margin-right: 24.56rpx;
font-size: 30rpx;
.town_name {
margin-left: 21rpx;
}
}
.iconfont {
font-size: 35.09rpx;
}
}
.my-main {
transition: background-color .5s ease;
}
.search_content {
margin: 0 auto;
width: 724rpx;
height: 74rpx;
padding: 2px 2px 2px 21.05rpx;
border-radius: 175rpx;
background: #fff;
margin-bottom: 21rpx;
position: relative;
box-sizing: border-box;
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.search_btn {
color: #fff;
width: 105.26rpx;
height: 52.63rpx;
line-height: 52.63rpx;
background: #f84221;
border-radius: 100px;
font-size: 28.07rpx;
}
}
.supply_chains-head {
// margin-bottom: 17.54rpx;
position: relative;
z-index: 2;
.swiper {
width: 750rpx;
height: 600rpx;
margin: 0 auto;
// border-radius: 20rpx 20rpx 20rpx 20rpx;
overflow: hidden;
.swi_item {
width: 750rpx;
height: 600rpx;
}
}
}
}
</style>

View File

@ -6,93 +6,64 @@ let openPlantGrass = '-openPlantGrass-'
let httpApi
let httpApiTwo
let httpApiThree
let httpApiFour
let httpApiFive
let httpApiSix
let wsApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {
case 'prod':
httpApi = 'https://shop.lihaink.cn' // 生产
httpApiTwo = 'https://nk.lihaink.cn'
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://worker-task.lihaink.cn'
httpApiSix = 'https://new-worker.lihaink.cn'
wsApi = 'wss://shop.lihaink.cn'
break;
case 'prew':
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://preview-worker-task.lihaink.cn'
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
wsApi = 'wss://test.shop.lihaink.cn'
break;
default:
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://ceshi-worker-task.lihaink.cn'
httpApiFive = 'https://ceshi-zhibo.lihaink.cn'
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// #ifdef MP-WEIXIN
httpApiTwo = "http://cms.com"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
// #endif
// #ifdef H5
// httpApiTwo = "baseUrl" // h5跨域配置
httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
// httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif
} else if (process.env.NODE_ENV === 'production') {
httpApi = 'https://shop.lihaink.cn' // 生产
httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
}
const ossUrl = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public'
// httpApi=''
// httpApi = 'https://shop.lihaink.cn' // 生产
// httpApiTwo = 'https://nk.lihaink.cn' // 生产
// 聊天接口修改此字符 小程序聊天要求wss 例如wss://mer.crmeb.net
// wsApi = 'ws://192.168.1.17:8324'
let wsApi_one = 'wss://ceshi-zhibo.lihaink.cn/chat_room'
// let wsApi = 'ws://192.168.3.20:8324'
let wsApi = 'wss://shop.lihaink.cn'
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP || APP-PLUS
// HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL_TWO: httpApiTwo,
HTTP_REQUEST_URL_THREE: httpApiThree,
HTTP_REQUEST_URL_FOUR: httpApiFour,
HTTP_REQUEST_URL_FIVE: httpApiFive,
HTTP_REQUEST_URL_SIX: httpApiSix,
VUE_APP_WS_URL: `${wsApi}?type=user`,
VUE_APP_WS_URL_ONE:wsApi_one,
// #endif
// 请求域名 格式: https://您的域名
// #ifdef MP || APP-PLUS
// HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL_TWO: httpApiTwo,
HTTP_REQUEST_URL_THREE: httpApiThree,
VUE_APP_WS_URL: `${wsApi}?type=user`,
// #endif
// #ifdef H5
//H5接口是浏览器地址
HTTP_REQUEST_URL: process.env.NODE_ENV == 'development'? httpApi : window.location.protocol + "//" + window.location.host,
HTTP_REQUEST_URL_TWO: httpApiTwo,
HTTP_REQUEST_URL_FIVE: httpApiFive,
HTTP_REQUEST_URL_SIX: httpApiSix,
HTTP_REQUEST_URL_FOUR: window.location.host == 'shop.lihaink.cn' ?'https://worker-task.lihaink.cn':window.location.host == 'test.shop.lihaink.cn'?'https://preview-worker-task.lihaink.cn':'https://ceshi-worker-task.lihaink.cn',
// 聊天长连接地址
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
// #endif
openPlantGrass: openPlantGrass,
ENV: env,
OSS_URL: ossUrl,
HEADER: {
'content-type': 'application/json',
//#ifdef H5
'Form-type': navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 ? 'wechat' : 'h5',
//#endif
//#ifdef MP
'Form-type': 'routine',
//#endif
//#ifdef APP-PLUS
'Form-type': 'app',
//#endif
},
// 回话密钥名称 请勿修改此配置
TOKENNAME: 'X-Token',
// 缓存时间 0 永久
EXPIRE: 0,
// #ifdef H5
//H5接口是浏览器地址
HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host,
HTTP_REQUEST_URL_TWO: httpApiTwo || window.location.protocol + "//" + window.location.host,
// 聊天长连接地址
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
// #endif
openPlantGrass: openPlantGrass,
HEADER: {
'content-type': 'application/json',
//#ifdef H5
'Form-type': navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 ? 'wechat' : 'h5',
//#endif
//#ifdef MP
'Form-type': 'routine',
//#endif
//#ifdef APP-PLUS
'Form-type': 'app',
//#endif
},
// 回话密钥名称 请勿修改此配置
TOKENNAME: 'X-Token',
// 缓存时间 0 永久
EXPIRE: 0,
};

View File

@ -38,6 +38,4 @@ module.exports = {
CACHE_LONGITUDE: 'LONGITUDE',
//缓存纬度
CACHE_LATITUDE: 'LATITUDE',
//缓存地址信息
ADRESS_LOCATION:'ADRESS_LOCATION'
}

View File

@ -130,7 +130,6 @@ export function Modal(title = '提示', content = '这是一个模态弹窗!', o
}) {
return new Promise((reslove, reject) => {
uni.showModal({
...obj,
title: title,
content: content,
success: (res) => {

85
main.js
View File

@ -12,80 +12,70 @@ import App from './App'
import store from './store'
import Cache from './utils/cache'
import util from 'utils/util'
import {
HTTP_REQUEST_URL
} from '@/config/app';
import { HTTP_REQUEST_URL } from '@/config/app';
import skeleton from './components/skeleton/index.vue'
import BaseMoney from './components/BaseMoney.vue';
import Loading from './components/Loading.vue';
import activityHome from './components/activityHome.vue';
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.component('skeleton', skeleton)
Vue.component('BaseMoney', BaseMoney)
Vue.component('Loading', Loading)
Vue.component('activityHome', activityHome)
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false
Vue.prototype.$bus = new Vue();
// #ifdef H5
import {
parseQuery
} from "./utils";
import { parseQuery } from "./utils";
import Auth from './libs/wechat';
import {
SPREAD
} from './config/cache';
import { SPREAD } from './config/cache';
// import wx from '@/node_modules/jweixin-module/lib/index'
var __s = document.createElement('script');
__s.src = HTTP_REQUEST_URL + "/api/script";
document.head.appendChild(__s);
Vue.prototype.$wechat = Auth;
let cookieName = "VCONSOLE",
query = parseQuery(),
urlSpread = query["spread"],
vconsole = query[cookieName.toLowerCase()],
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
query = parseQuery(),
urlSpread = query["spread"],
vconsole = query[cookieName.toLowerCase()],
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
if (urlSpread !== undefined) {
var spread = Cache.get(SPREAD);
urlSpread = parseInt(urlSpread);
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
Cache.set("spread", urlSpread || 0);
} else if (spread === 0 || typeof spread !== "number") {
Cache.set("spread", urlSpread || 0);
}
var spread = Cache.get(SPREAD);
urlSpread = parseInt(urlSpread);
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
Cache.set("spread", urlSpread || 0);
} else if (spread === 0 || typeof spread !== "number") {
Cache.set("spread", urlSpread || 0);
}
}
if (vconsole !== undefined) {
if (vconsole === md5UnCrmeb && Cache.has(cookieName))
Cache.clear(cookieName);
if (vconsole === md5UnCrmeb && Cache.has(cookieName))
Cache.clear(cookieName);
} else vconsole = Cache.get(cookieName);
import VConsole from './components/vconsole.min.js'
if (vconsole !== undefined && vconsole === md5Crmeb) {
Cache.set(cookieName, md5Crmeb, 3600);
let vConsole = new VConsole();
Cache.set(cookieName, md5Crmeb, 3600);
let vConsole = new VConsole();
}
// 注册全局防抖指令
Vue.directive('debounce', {
inserted: (el, binding) => {
let debounceTime = binding.value || 2000
let timer
el.addEventListener('click', e => {
el.style.pointerEvents = 'none';
if (!el.disabled) {
timer = setTimeout(() => {
el.style.pointerEvents = 'auto'
}, debounceTime)
}
}, true)
}
inserted: (el, binding) => {
let debounceTime = binding.value || 2000
let timer
el.addEventListener('click', e => {
el.style.pointerEvents = 'none';
if (!el.disabled) {
timer = setTimeout(() => {
el.style.pointerEvents = 'auto'
}, debounceTime)
}
}, true)
}
})
// if(!!!Auth.isAndroid() && Auth.isWeixin()){
@ -96,17 +86,12 @@ Vue.directive('debounce', {
// #endif
let appInfo = uni.getSystemInfo().then(res => {
Vue.prototype.$appInfo = res[1];
});
App.mpType = 'app'
const app = new Vue({
...App,
store,
Cache
...App,
store,
Cache
})
app.$mount();

View File

@ -1,9 +1,9 @@
{
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"name" : "CRMEB",
"appid" : "__UNI__039BCFE",
"description" : "",
"versionName" : "1.8.0",
"versionCode" : 180,
"versionName" : "1.0.4",
"versionCode" : 127,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -12,11 +12,8 @@
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
@ -27,17 +24,7 @@
"iBeacon" : {},
"Barcode" : {},
"Camera" : {},
"Geolocation" : {},
"Payment" : {},
"Share" : {},
"OAuth" : {},
"UniMP" : {
"description" : "uni小程序"
},
"Maps" : {},
"Push" : {},
"LivePusher" : {},
"Record" : {}
"Geolocation" : {}
},
"safearea" : {
"bottom" : {
@ -50,13 +37,7 @@
"android" : {
"resizeableActivity" : true,
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
@ -64,18 +45,10 @@
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"permissionExternalStorage" : {
@ -84,9 +57,7 @@
},
"permissionPhoneState" : {
"request" : "none" //
},
"targetSdkVersion" : 30,
"minSdkVersion" : 23
}
},
/* ios */
"ios" : {
@ -95,9 +66,7 @@
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSMicrophoneUsageDescription" : "根据用户录音进行语音识别转文字"
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店"
},
"idfa" : false,
"dSYMs" : false
@ -106,35 +75,31 @@
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
"name" : "amap_18982406440DFVLElaO"
"appkey_ios" : "",
"appkey_android" : ""
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://shop.lihaink.cn/"
"alipay" : {
"__platform__" : [ "ios", "android" ]
}
},
"share" : {
"weixin" : {
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://shop.lihaink.cn/"
"appid" : "",
"UniversalLinks" : "https://mer.crmeb.net/"
}
},
"geolocation" : {
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
"name" : "amap_18982406440DFVLElaO"
"system" : {
"__platform__" : [ "ios", "android" ]
}
},
"oauth" : {},
"ad" : {},
"push" : {}
"push" : {},
"oauth" : {
"apple" : {}
},
"ad" : {}
},
"icons" : {
"android" : {
@ -169,145 +134,7 @@
}
},
"splashscreen" : {
"useOriginalMsgbox" : true,
"androidStyle" : "default",
"iosStyle" : "common",
"ios" : {
"storyboard" : "C:/Users/ghf/Downloads/CustomStoryboard.zip"
},
"android" : {
"hdpi" : "",
"xhdpi" : "",
"xxhdpi" : "static/images/guide.png"
}
}
},
"nativePlugins" : {
"JG-JCore" : {
"JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3",
"JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3",
"JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e",
"JPUSH_CHANNEL_ANDROID" : "",
"__plugin_info__" : {
"name" : "JG-JCore",
"description" : "极光推送JCore插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "uni.UNI3A527D1",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "JCore:APP_KEY",
"value" : "daebe19b547c43128796a078"
},
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JCore:CHANNEL",
"value" : ""
},
"JPUSH_APPKEY_ANDROID" : {
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
"key" : "JPUSH_APPKEY",
"value" : ""
},
"JPUSH_CHANNEL_ANDROID" : {
"des" : "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JPUSH_CHANNEL",
"value" : ""
}
}
}
},
"JG-JPush" : {
"JPUSH_ISPRODUCTION_IOS" : "true",
"JPUSH_ADVERTISINGID_IOS" : "",
"JPUSH_DEFAULTINITJPUSH_IOS" : "true",
"JPUSH_OPPO_APPKEY" : "",
"JPUSH_OPPO_APPID" : "",
"JPUSH_OPPO_APPSECRET" : "",
"JPUSH_VIVO_APPKEY" : "",
"JPUSH_VIVO_APPID" : "",
"JPUSH_MEIZU_APPKEY" : "",
"JPUSH_MEIZU_APPID" : "",
"JPUSH_XIAOMI_APPKEY" : "",
"JPUSH_XIAOMI_APPID" : "",
"__plugin_info__" : {
"name" : "JG-JPush",
"description" : "极光推送Hbuilder插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "uni.UNI3A527D1",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_ISPRODUCTION_IOS" : {
"des" : "[iOS]是否是生产环境是填true不是填false或者不填",
"key" : "JPush:ISPRODUCTION",
"value" : ""
},
"JPUSH_ADVERTISINGID_IOS" : {
"des" : "[iOS]广告标识符IDFA如果不需要使用IDFA可不填",
"key" : "JPush:ADVERTISINGID",
"value" : ""
},
"JPUSH_DEFAULTINITJPUSH_IOS" : {
"des" : "[iOS]是否默认初始化是填true不是填false或者不填",
"key" : "JPush:DEFAULTINITJPUSH",
"value" : ""
},
"JPUSH_OPPO_APPKEY" : {
"des" : "厂商OPPO-appkey,示例OP-12345678",
"key" : "OPPO_APPKEY",
"value" : ""
},
"JPUSH_OPPO_APPID" : {
"des" : "厂商OPPO-appId,示例OP-12345678",
"key" : "OPPO_APPID",
"value" : ""
},
"JPUSH_OPPO_APPSECRET" : {
"des" : "厂商OPPO-appSecret,示例OP-12345678",
"key" : "OPPO_APPSECRET",
"value" : ""
},
"JPUSH_VIVO_APPKEY" : {
"des" : "厂商VIVO-appkey,示例12345678",
"key" : "com.vivo.push.api_key",
"value" : ""
},
"JPUSH_VIVO_APPID" : {
"des" : "厂商VIVO-appId,示例12345678",
"key" : "com.vivo.push.app_id",
"value" : ""
},
"JPUSH_MEIZU_APPKEY" : {
"des" : "厂商MEIZU-appKey,示例MZ-12345678",
"key" : "MEIZU_APPKEY",
"value" : ""
},
"JPUSH_MEIZU_APPID" : {
"des" : "厂商MEIZU-appId,示例MZ-12345678",
"key" : "MEIZU_APPID",
"value" : ""
},
"JPUSH_XIAOMI_APPKEY" : {
"des" : "厂商XIAOMI-appKey,示例MI-12345678",
"key" : "XIAOMI_APPKEY",
"value" : ""
},
"JPUSH_XIAOMI_APPID" : {
"des" : "厂商XIAOMI-appId,示例MI-12345678",
"key" : "XIAOMI_APPID",
"value" : ""
}
}
}
"useOriginalMsgbox" : true
}
}
},
@ -350,10 +177,8 @@
"domain" : "",
"sdkConfigs" : {
"maps" : {
"amap" : {
"key" : "275cd3601b1b2d6414f6c988e7911664",
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
"serviceHost" : ""
"qqmap" : {
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
}
}
},
@ -361,6 +186,3 @@
"template" : "template.h5.html"
}
}
//
/* ios */

View File

@ -1,27 +0,0 @@
//
// JGInforCollectionAuth.h
// JCore
//
// Created by 豆瓣 on 2021/10/27.
// Copyright © 2021 jiguang. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 合规接口,是否授权极光采集一定的设备信息
@interface JGInforCollectionAuthItems : NSObject
/// 是否授权默认YES
@property(nonatomic,assign)BOOL isAuth;
@end
@interface JGInforCollectionAuth : NSObject
/// 设备信息采集授权接口(合规接口)
/// 请务必在调用初始化、功能性接口前调用此接口进行合规授权
/// @param authBlock auth:YES 则极光认为您同意极光采集一定的设备信息
+(void)JCollectionAuth:(void(^_Nullable)(JGInforCollectionAuthItems *authInfo))authBlock;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,17 +0,0 @@
//
// JCoreModule.h
// UniPluginJCore
//
// Created by huangshuni on 2021/1/21.
//
#import <Foundation/Foundation.h>
#import "DCUniModule.h"
NS_ASSUME_NONNULL_BEGIN
@interface JCoreModule : DCUniModule
@end
NS_ASSUME_NONNULL_END

View File

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/JCoreModule.h</key>
<data>
4aMcBALZuuQeh2JQjJqqvSkc2mA=
</data>
<key>Info.plist</key>
<data>
06+wBVr403G+lX5fr/4efqHMj2A=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/JCoreModule.h</key>
<dict>
<key>hash</key>
<data>
4aMcBALZuuQeh2JQjJqqvSkc2mA=
</data>
<key>hash2</key>
<data>
h/0w2CaU3JBhKI3Pp4EiSWqLf/ZY1Ju+5+tBAdowZ5k=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@ -1,61 +0,0 @@
{
"name": "JG-JCore",
"id": "JG-JCore",
"version": "1.1.3",
"description": "极光推送JCore插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"ios": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "JCoreModule"
}
],
"integrateType": "framework",
"deploymentTarget": "11.0",
"validArchitectures": [
"arm64"
],
"parameters": {
"JPUSH_APPKEY_IOS": {
"des": "[iOS]极光portal配置应用信息时分配的AppKey",
"key": "JCore:APP_KEY"
},
"JPUSH_CHANNEL_IOS": {
"des": "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key": "JCore:CHANNEL"
}
}
},
"android": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "cn.jiguang.uniplugin_jcore.JCoreModule"
}
],
"integrateType": "aar",
"minSdkVersion": "19",
"permissions": [
],
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"parameters": {
"JPUSH_APPKEY_ANDROID": {
"des": "[Android]极光portal配置应用信息时分配的AppKey",
"key": "JPUSH_APPKEY"
},
"JPUSH_CHANNEL_ANDROID":{
"des": "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key": "JPUSH_CHANNEL"
}
}
}
}
}

View File

@ -1,798 +0,0 @@
/*
* | | | | \ \ / / | | | | / _______|
* | |____| | \ \/ / | |____| | / /
* | |____| | \ / | |____| | | | _____
* | | | | / \ | | | | | | |____ |
* | | | | / /\ \ | | | | \ \______| |
* | | | | /_/ \_\ | | | | \_________|
*
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
*/
#define JPUSH_VERSION_NUMBER 3.4.0
#import <Foundation/Foundation.h>
@class CLRegion;
@class UILocalNotification;
@class CLLocation;
@class UNNotificationCategory;
@class UNNotificationSettings;
@class UNNotificationRequest;
@class UNNotification;
@protocol JPUSHRegisterDelegate;
@protocol JPUSHGeofenceDelegate;
@protocol JPushInMessageDelegate;
typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq);
typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind);
typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq);
typedef void (^JPUSHInMssageCompletion)(NSInteger iResCode);
extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中
extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接
extern NSString *const kJPFNetworkDidCloseNotification; // 关闭连接
extern NSString *const kJPFNetworkDidRegisterNotification; // 注册成功
extern NSString *const kJPFNetworkFailedRegisterNotification; //注册失败
extern NSString *const kJPFNetworkDidLoginNotification; // 登录成功
extern NSString *const kJPFNetworkDidReceiveMessageNotification; // 收到消息(非APNS)
extern NSString *const kJPFServiceErrorNotification; // 错误提示
typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
JPAuthorizationOptionNone = 0, // the application may not present any UI upon a notification being received
JPAuthorizationOptionBadge = (1 << 0), // the application may badge its icon upon a notification being received
JPAuthorizationOptionSound = (1 << 1), // the application may play a sound upon a notification being received
JPAuthorizationOptionAlert = (1 << 2), // the application may display an alert upon a notification being received
JPAuthorizationOptionCarPlay = (1 << 3), // The ability to display notifications in a CarPlay environment.
JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts.
JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings.
JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center.
JPAuthorizationOptionAnnouncement NS_AVAILABLE_IOS(13.0) = (1 << 7) , //The ability for Siri to automatically read out messages over AirPods.
};
typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) {
JPAuthorizationNotDetermined = 0, // The user has not yet made a choice regarding whether the application may post user notifications.
JPAuthorizationStatusDenied, // The application is not authorized to post user notifications.
JPAuthorizationStatusAuthorized, // The application is authorized to post user notifications.
JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications.
};
typedef NS_ENUM(NSInteger,JPushInMessageContentType){
JPushAdContentType = 1, //广告类型的inMessage
JPushNotiContentType = 2, //通知类型的inMessage
};
/*!
*
*/
@interface JPUSHRegisterEntity : NSObject
/*!
*
* badge,sound,alert
*/
@property (nonatomic, assign) NSInteger types;
/*!
*
* iOS10 UNNotificationCategory
* iOS8-iOS9 UIUserNotificationCategory
*/
@property (nonatomic, strong) NSSet *categories;
@end
/*!
*
*/
@interface JPushNotificationIdentifier : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSArray<NSString *> *identifiers; // 推送的标识数组
@property (nonatomic, copy) UILocalNotification *notificationObj NS_DEPRECATED_IOS(4_0, 10_0); // iOS10以下可以传UILocalNotification对象数据iOS10以上无效
@property (nonatomic, assign) BOOL delivered NS_AVAILABLE_IOS(10_0); // 在通知中心显示的或待推送的标志默认为NOYES表示在通知中心显示的NO表示待推送的
@property (nonatomic, copy) void (^findCompletionHandler)(NSArray *results); // 用于查询回调,调用[findNotification:]方法前必须设置results为返回相应对象数组iOS10以下返回UILocalNotification对象数组iOS10以上根据delivered传入值返回UNNotification或UNNotificationRequest对象数组delivered传入YES则返回UNNotification对象数组否则返回UNNotificationRequest对象数组
@end
/*!
*
* iOS10以上有效
*/
@interface JPushNotificationSound : NSObject <NSCopying, NSCoding>
@property (nonatomic, copy) NSString *soundName; //普通通知铃声
@property (nonatomic, copy) NSString *criticalSoundName NS_AVAILABLE_IOS(12.0); //警告通知铃声
@property (nonatomic, assign) float criticalSoundVolume NS_AVAILABLE_IOS(12.0); //警告通知铃声音量有效值在0~1之间默认为1
@end
/*!
*
*/
@interface JPushNotificationContent : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSString *title; // 推送标题
@property (nonatomic, copy) NSString *subtitle; // 推送副标题
@property (nonatomic, copy) NSString *body; // 推送内容
@property (nonatomic, copy) NSNumber *badge; // 角标的数字。如果不需要改变角标传@(-1)
@property (nonatomic, copy) NSString *action NS_DEPRECATED_IOS(8_0, 10_0); // 弹框的按钮显示的内容IOS 8默认为"打开", 其他默认为"启动",iOS10以上无效
@property (nonatomic, copy) NSString *categoryIdentifier; // 行为分类标识
@property (nonatomic, copy) NSDictionary *userInfo; // 本地推送时可以设置userInfo来增加附加信息远程推送时设置的payload推送内容作为此userInfo
@property (nonatomic, copy) NSString *sound; // 声音名称,不设置则为默认声音
@property (nonatomic, copy) JPushNotificationSound *soundSetting NS_AVAILABLE_IOS(10.0); //推送声音实体
@property (nonatomic, copy) NSArray *attachments NS_AVAILABLE_IOS(10_0); // 附件iOS10以上有效需要传入UNNotificationAttachment对象数组类型
@property (nonatomic, copy) NSString *threadIdentifier NS_AVAILABLE_IOS(10_0); // 线程或与推送请求相关对话的标识iOS10以上有效可用来对推送进行分组
@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名iOS10以上有效从推送启动时将会用到
@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。
@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。
@property (nonatomic, copy) NSString *targetContentIdentifier NS_AVAILABLE_IOS(13.0); // An identifier for the content of the notification used by the system to customize the scene to be activated when tapping on a notification.
@end
/*!
*
* dateComponentstimeIntervalregion在iOS10以上可选择其中一个参数传入有效值IIIIII使其中一种触发方式生效fireDate为iOS10以下根据时间触发时须传入的参数
*/
@interface JPushNotificationTrigger : NSObject<NSCopying, NSCoding>
@property (nonatomic, assign) BOOL repeat; // 设置是否重复默认为NO
@property (nonatomic, copy) NSDate *fireDate NS_DEPRECATED_IOS(2_0, 10_0); // 用来设置触发推送的时间iOS10以上无效
@property (nonatomic, copy) CLRegion *region NS_AVAILABLE_IOS(8_0); // 用来设置触发推送的位置iOS8以上有效iOS10以上优先级为I应用需要有允许使用定位的授权
@property (nonatomic, copy) NSDateComponents *dateComponents NS_AVAILABLE_IOS(10_0); // 用来设置触发推送的日期时间iOS10以上有效优先级为II
@property (nonatomic, assign) NSTimeInterval timeInterval NS_AVAILABLE_IOS(10_0); // 用来设置触发推送的时间iOS10以上有效优先级为III
@end
/*!
*
*/
@interface JPushNotificationRequest : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSString *requestIdentifier; // 推送请求标识
@property (nonatomic, copy) JPushNotificationContent *content; // 设置推送的具体内容
@property (nonatomic, copy) JPushNotificationTrigger *trigger; // 设置推送的触发方式
@property (nonatomic, copy) void (^completionHandler)(id result); // 注册或更新推送成功回调iOS10以上成功则result为UNNotificationRequest对象失败则result为nil;iOS10以下成功result为UILocalNotification对象失败则result为nil
@end
/*!
* JPush
*/
@interface JPUSHService : NSObject
///----------------------------------------------------
/// @name Setup 启动相关
///----------------------------------------------------
/*!
* @abstract SDK
*
* @param launchingOption .
* @param appKey JPush ,. JPush .
* @param channel . .
* @param isProduction . , NO; , YES.
* App profile provision的配置.
*
* @discussion SDK启动必须的参数, SDK.
* App , JPush SDK .
*/
+ (void)setupWithOption:(NSDictionary *)launchingOption
appKey:(NSString *)appKey
channel:(NSString *)channel
apsForProduction:(BOOL)isProduction;
/*!
* @abstract SDK
*
* @param launchingOption .
* @param appKey JPush ,. JPush .
* @param channel . .
* @param isProduction . , NO; , YES.
* App profile provision的配置.
* @param advertisingId 广IDFA 使IDFAnil.
*
* @discussion SDK启动必须的参数, SDK.
* App , JPush SDK .
*/
+ (void)setupWithOption:(NSDictionary *)launchingOption
appKey:(NSString *)appKey
channel:(NSString *)channel
apsForProduction:(BOOL)isProduction
advertisingIdentifier:(NSString *)advertisingId;
///----------------------------------------------------
/// @name APNs about 通知相关
///----------------------------------------------------
/*!
* @abstract
*
* @param types
* @param categories
*
*/
+ (void)registerForRemoteNotificationTypes:(NSUInteger)types
categories:(NSSet *)categories;
/*!
* @abstract iOS10
*
* @param config
* @param delegate
*
*/
+ (void)registerForRemoteNotificationConfig:(JPUSHRegisterEntity *)config delegate:(id<JPUSHRegisterDelegate>)delegate;
+ (void)registerDeviceToken:(NSData *)deviceToken;
/*!
* @abstract APNs
*/
+ (void)handleRemoteNotification:(NSDictionary *)remoteInfo;
/*!
* @abstract Token
*
* @param voipToken 使Voip Token
*/
+ (void)registerVoipToken:(NSData *)voipToken;
/*!
* @abstract Voip
*
* @param remoteInfo Voip
*/
+ (void)handleVoipNotification:(NSDictionary *)remoteInfo;
/*!
* @abstract
* @param completion status值返回JPAuthorizationStatus
*/
+ (void)requestNotificationAuthorization:(void (^)(JPAuthorizationStatus status))completion;
/*!
* @abstract iOS8及以上有效
*/
+ (void)openSettingsForNotification:(void (^)(BOOL success))completionHandler NS_AVAILABLE_IOS(8_0);
/*!
* Tags操作接口
* ////
* https://docs.jiguang.cn/jpush/client/iOS/ios_api/
*/
/**
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)addTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)setTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)deleteTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param completion
@param seq
*/
+ (void)cleanTags:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param completion
@param seq
*/
+ (void)getAllTags:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tag是否绑定
@param completion
@param seq
*/
+ (void)validTag:(NSString *)tag
completion:(JPUSHTagValidOperationCompletion)completion
seq:(NSInteger)seq;
/**
Alias
@param alias alias
@param completion
@param seq
*/
+ (void)setAlias:(NSString *)alias
completion:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/**
alias
@param completion
@param seq
*/
+ (void)deleteAlias:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/**
alias
@param completion
@param seq
*/
+ (void)getAlias:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/*!
* @abstract tags
*
* @discussion tags , tags.
* tags . SDK .
*/
+ (NSSet *)filterValidTags:(NSSet *)tags;
///----------------------------------------------------
/// @name Stats 统计功能
///----------------------------------------------------
/*!
* @abstract
*
* @param pageName
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)startLogPageView:(NSString *)pageName __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract
*
* @param pageName
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)stopLogPageView:(NSString *)pageName __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract
*
* @param pageName
* @param seconds
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)beginLogPageView:(NSString *)pageName duration:(int)seconds __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract Crash日志收集
*
* @discussion .
*/
+ (void)crashLogON;
/*!
* @abstract
*
* @param latitude .
* @param longitude .
*
*/
+ (void)setLatitude:(double)latitude longitude:(double)longitude;
/*!
* @abstract
*
* @param location CLLocation *
*
* @discussion CoreLocation.framework #import <CoreLocation/CoreLocation.h>
*/
+ (void)setLocation:(CLLocation *)location;
/**
10 iOS系统默认地理围栏最大个数为20
@param count count
*/
+ (void)setGeofenecMaxCount:(NSInteger)count;
/**
@param delegate
@param launchOptions app启动完成是收到的字段参数
*/
+ (void)registerLbsGeofenceDelegate:(id<JPUSHGeofenceDelegate>)delegate withLaunchOptions:(NSDictionary *)launchOptions;
/**
@param geofenceId id
*/
+ (void)removeGeofenceWithIdentifier:(NSString *)geofenceId;
///----------------------------------------------------
/// @name Local Notification 本地通知
///----------------------------------------------------
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param request JPushNotificationRequest类型request.requestIdentifier即更新已有的推送iOS10以上有效request.completionHandler返回
* @discussion 使
*
*/
+ (void)addNotification:(JPushNotificationRequest *)request;
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param identifier JPushNotificationIdentifier类型iOS10以上identifier设置为nilidentifier.delivered和identifier.identifiers来移除相应在通知中心显示推送或待推送请求identifier.identifiers如果设置为nil或空数组则移除相应标志下所有在通知中心显示推送或待推送请求iOS10以下identifier设置为nilidentifier.delivered属性无效identifier.notificationObj传入特定推送对象来移除此推送
* @discussion 使
*
*/
+ (void)removeNotification:(JPushNotificationIdentifier *)identifier;
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param identifier JPushNotificationIdentifier类型iOS10以上可以通过设置identifier.delivered和identifier.identifiers来查找相应在通知中心显示推送或待推送请求identifier.identifiers如果设置为nil或空数组则返回相应标志下所有在通知中心显示推送或待推送请求iOS10以下identifier.delivered属性无效identifier.identifiers如果设置nil或空数组则返回所有未触发的推送identifier.findCompletionHandler回调才能得到查找结果(NSArray *results)
* @discussion 使
*
*/
+ (void)findNotification:(JPushNotificationIdentifier *)identifier;
/*!
* @abstract 64
*
* @param fireDate
* @param alertBody
* @param badge -1
* @param alertAction IOS 8"打开", "启动"
* @param notificationKey
* @param userInfo
* @param soundName nil为默认声音
*
* @discussion 64 [addNotification:]
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract ( iOS8 )
*
* IOS8新参数
* @param region
* @param regionTriggersOnce
* @param category
* @discussion [addNotification:]
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName
region:(CLRegion *)region
regionTriggersOnce:(BOOL)regionTriggersOnce
category:(NSString *)category NS_AVAILABLE_IOS(8_0) __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notification
* @param notificationKey
*
* @discussion App在前台运行时不会进行弹窗--iOS10以下还可继续使用iOS10以上在[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:]completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert);
*/
+ (void)showLocalNotificationAtFront:(UILocalNotification *)notification
identifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notificationKey
* @discussion [removeNotification:]
*/
+ (void)deleteLocalNotificationWithIdentifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
* @discussion [removeNotification:]
*/
+ (void)deleteLocalNotification:(UILocalNotification *)localNotification __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notificationKey
* @return , [array count]0
* @discussion [findNotification:]
*/
+ (NSArray *)findLocalNotificationWithIdentifier:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
* @discussion [removeNotification:]
*/
+ (void)clearAllLocalNotifications __attribute__((deprecated("JPush 2.1.9 版本已过期")));
///----------------------------------------------------
/// @name Server badge 服务器端 badge 功能
///----------------------------------------------------
/*!
* @abstract ()
*
* @param value . ()
*
* @discussion .
* UIApplication:setApplicationIconBadgeNumber .
*
* JPush .
* , APNs , , .
*
* JPush :
*
* - API () badge ;
* - API APNs (),
* 使 "+1" , badge () +1 badge ;
*/
+ (BOOL)setBadge:(NSInteger)value;
/*!
* @abstract (0)
*
* @discussion [setBadge:0] .
* [JPUSHService setBadge:] .
*/
+ (void)resetBadge;
///----------------------------------------------------
/// @name Other Feature 其他功能
///----------------------------------------------------
/*!
* @abstract ()
*
* @param mobileNumber .
* @param completion error为空error带有错误码及错误信息
*
* @discussion completion异步返回completion设置为nil不处理结果信息
*
*/
+ (void)setMobileNumber:(NSString *)mobileNumber completion:(void (^)(NSError *error))completion;
///----------------------------------------------------
/// @name Logs and others 日志与其他
///----------------------------------------------------
/*!
* @abstract JPush标识此设备的 registrationID
*
* @discussion SDK注册成功后, registrationID .
*
* JPush registrationID .
* , registrationID , , .
* registrationIDCompletionHandler:registrationID的方法block中获取registrationID,resCode为返回码,resCode返回1011,registrationID返回nil.
* JPush .
*/
+ (NSString *)registrationID;
+ (void)registrationIDCompletionHandler:(void(^)(int resCode,NSString *registrationID))completionHandler;
/*!
* @abstract Debug
*
* @discussion JMessage iOS Android .
* : Verbose, Debug, Info, Warning, Error.
* , Android .
*
* SDK : Info. , .
*
* SDK启动后调用本接口: Debug, .
*/
+ (void)setDebugMode;
/*!
* @abstract
*
* @discussion , [JPUSHService setDebugMode]
*
* , Warning, Error . , , .
*
* , , .
*/
+ (void)setLogOFF;
/*!
* @abstract SDK地理位置权限开关
*
* @discussion SDK地理围栏的相关功能将受到影响
*
*/
+ (void)setLocationEanable:(BOOL)isEanble;
/*!
* @abstract
*
* @discussion JPushInMessageDelegate的代理对象
*
*/
+ (void)setInMessageDelegate:(id<JPushInMessageDelegate>)inMessageDelegate;
/*!
* @abstract
*
* @discussion
*
*/
+ (void)pullInMessageCompletion:(JPUSHInMssageCompletion)completion;
///----------------------------------------------------
///********************下列方法已过期********************
///**************请使用新版tag/alias操作接口**************
///----------------------------------------------------
/// @name Tag alias setting 设置别名与标签
///----------------------------------------------------
/*!
*
* ()nilhttps://docs.jiguang.cn/jpush/client/iOS/ios_api/
* setTags:alias:fetchCompletionHandle:block里面处理设置结果即可.
* WARN: 使block时需要注意循环引用问题
*/
+ (void) setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
target:(id)theTarget __attribute__((deprecated("JPush 2.1.1 版本已过期")));
+ (void) setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void) setTags:(NSSet *)tags
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void)setTags:(NSSet *)tags
alias:(NSString *)alias
fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void) setTags:(NSSet *)tags
aliasInbackground:(NSString *)alias __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void)setAlias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
@end
@class UNUserNotificationCenter;
@class UNNotificationResponse;
@protocol JPUSHRegisterDelegate <NSObject>
/*
* @brief handle UserNotifications.framework [willPresentNotification:withCompletionHandler:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param notification
* @param completionHandler callback中的options 使UNNotificationPresentationOptions
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger options))completionHandler;
/*
* @brief handle UserNotifications.framework [didReceiveNotificationResponse:withCompletionHandler:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param response
* @param completionHandler
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler;
/*
* @brief handle UserNotifications.framework [openSettingsForNotification:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param notification
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification NS_AVAILABLE_IOS(12.0);
/**
*
* @param status JPAuthorizationStatus
* @param info
*/
- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info;
@end
@protocol JPUSHGeofenceDelegate <NSObject>
/**
@param geofenceId id
@param userInfo
@param error
*/
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didEnterRegion:(NSDictionary *)userInfo error:(NSError *)error;
/**
@param geofenceId id
@param userInfo
@param error
*/
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didExitRegion:(NSDictionary *)userInfo error:(NSError *)error;
@end
@protocol JPushInMessageDelegate <NSObject>
@optional
/**
*,
*/
- (BOOL)jPushInMessageIsAllowedInMessagePop;
/**
*
*/
- (void)jPushInMessageAlreadyPop __attribute__((deprecated("JPush 3.4.0 版本已过期")));;
/**
*
*/
- (void)jPushInMessageAlreadyDisappear;
/**
inMessage展示的回调
@param messageType inMessage
@param content 广
*/
- (void)jPushInMessageAlreadyPopInMessageType:(JPushInMessageContentType)messageType Content:(NSDictionary *)content;
/**
inMessage点击的回调
@param messageType inMessage
@param content 广
*/
- (void)jpushInMessagedidClickInMessageType:(JPushInMessageContentType)messageType Content:(NSDictionary *)content;
@end

View File

@ -1,17 +0,0 @@
//
// JPushModule.h
// UniPluginJPush
//
// Created by huangshuni on 2021/1/12.
//
#import <Foundation/Foundation.h>
#import "DCUniModule.h"
NS_ASSUME_NONNULL_BEGIN
@interface JPushModule : DCUniModule
@end
NS_ASSUME_NONNULL_END

Some files were not shown because too many files have changed in this diff Show More