代码更新

This commit is contained in:
jia 2023-09-12 12:43:03 +08:00
parent 30449aaf6d
commit 44f7662fc0
96 changed files with 22564 additions and 17525 deletions

858
App.vue
View File

@ -1,371 +1,527 @@
<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
var jpushModule = uni.requireNativePlugin("JG-JPush");
// #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 {
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
//
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
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
// +----------------------------------------------------------------------
// | 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");
const mp = uni.requireNativePlugin('uniMP');
// #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';
console.log("通知", result)
//
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
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) {
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)
}
},
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(() => {});
}
},
}
}
// #ifdef APP-PLUS
//uni
mp.onUniMPEventReceive(ret => {
console.log('小程序事件: ', ret);
if (ret.event == 'closeApp') {
mp.closeUniMP(ret.fromAppid, (ret) => {
console.log('closeUniMP: ' + JSON.stringify(ret));
});
}
});
// #endif
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
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) {
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
// 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) {
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/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/iconfont/icontan.css';
@import 'static/css/style.scss';
view {
box-sizing: border-box;
}
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
view {
box-sizing: border-box;
}
&_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);
}
}
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
.bg-color-red {
background-color: #e93323 !important;
}
&_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);
}
.syspadding {
padding-top: var(--status-bar-height);
}
.custom_style-txt {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5rpx;
.flex {
display: flex;
}
}
}
.uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none
}
.bg-color-red {
background-color: #e93323 !important;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.syspadding {
padding-top: var(--status-bar-height);
}
::-moz-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.flex {
display: flex;
}
.empty-txt {
line-height: 100rpx;
font-size: 22rpx;
color: #999;
text-align: center;
}
.uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none
}
.product-con .conter img {
display: block;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.open-location {
height: 100vh;
}
::-moz-scrollbar {
width: 0;
height: 0;
color: transparent;
}
uni-tabbar {
bottom: 0;
}
.empty-txt {
line-height: 100rpx;
font-size: 22rpx;
color: #999;
text-align: center;
}
/*#endif*/
.product-con .conter img {
display: block;
}
.open-location {
height: 100vh;
}
uni-tabbar {
bottom: 0;
}
/*#endif*/
</style>

View File

@ -1,27 +1,27 @@
{
"version": "1",
"prompt": "template",
"title": "服务协议和隐私政策",
"message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<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": {
"title": "确认提示",
"message": "  进入应用前,你需先同意<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": "退出应用"
},
"styles": {
"backgroundColor": "#fff",
"borderRadius":"5px",
"title": {
"color": "#000"
"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>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {
"title" : "确认提示",
"message" : "进入应用前,你需先同意<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" : "退出应用"
},
"buttonAccept": {
"color": "#fff"
},
"buttonRefuse": {
"color": "#ccc"
"styles" : {
"backgroundColor" : "#fff",
"borderRadius" : "5px",
"title" : {
"color" : "#000"
},
"buttonAccept" : {
"color" : "#fff"
},
"buttonRefuse" : {
"color" : "#ccc"
}
}
}
}

View File

@ -13,68 +13,107 @@ 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 });
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
});
}
/**
* 订单备注
*/
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
});
}
/**
@ -82,7 +121,9 @@ export function setOrderRefund(merId, data) {
* @returns {*}
*/
export function getLogistics() {
return request.get("logistics", {}, { login: false });
return request.get("logistics", {}, {
login: false
});
}
/**
@ -90,7 +131,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);
}
/**
@ -98,7 +139,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);
}
/**
@ -106,108 +147,150 @@ export function verifierOrder(mer_id, code) {
* @returns {*}
*/
export function orderStatistics(mer_id, data) {
return request.get("admin/" + mer_id + "/statistics", data);
return request.get("admin/" + mer_id + "/statistics", data);
}
/**
* 订单
* @returns {*}
*/
export function orderStat(data) {
return request.get("admin/1/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}`);
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}`);
}

View File

@ -103,6 +103,10 @@ 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
@ -268,4 +272,22 @@ 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 });
}

View File

@ -82,11 +82,16 @@ export function videoList(data) {
});
}
/**自己的视频列表*/
export function deoList(id) {
return request.get(`community/show/${id}`);
}
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

@ -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) {
return request.get('order/group_order_detail/' + uni);
export function groupOrderDetail(uni,product_type) {
return request.get('order/group_order_detail/' + uni+'?product_type=' + product_type);
}
// 支付状态订单
@ -326,4 +326,12 @@ 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,6 +14,18 @@ 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
*/

View File

@ -24,6 +24,7 @@ export function getWechatConfig() {
);
}
/**
* 获取微信sdk配置
* @returns {*}

View File

@ -5,14 +5,14 @@ import request from "@/utils/request.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);
}
/**
@ -20,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);
}
/**
* 获取产品详情
@ -28,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
});
}
/**
* 获取预览商品详情
@ -38,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);
}
/**
* 添加收藏
@ -55,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);
}
/**
* 删除收藏产品
@ -63,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);
}
/**
@ -78,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
});
}
/**
* 批量收藏
@ -153,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);
}
/**
* 首页产品的轮播图和产品信息
@ -161,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)
}
/**
* 获取产品评论
@ -186,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
});
}
/**
* 获取商铺详情
@ -230,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
});
}
/**
* 获取商铺商品列表
@ -240,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
});
}
/**
* 获取商铺分类列表
@ -250,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");
}
/**
* 分销礼包列表
@ -328,56 +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 verify(data) {
return request.post("auth/verify", data);
return request.post("auth/verify", data);
}
/**
* 获取秒杀商品详情
@ -385,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
});
}
/**
* 获取预售商品详情
@ -422,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
});
}
/**
* 获取商户申请记录
@ -432,7 +432,7 @@ export function getPresellProductDetail(id) {
*
*/
export function getApplicationRecordList(data) {
return request.get('intention/lst', data);
return request.get('intention/lst', data);
}
/**
* 获取商户申请详情
@ -440,7 +440,7 @@ export function getApplicationRecordList(data) {
*
*/
export function getGoodsDetails(id) {
return request.get('intention/detail/' + id, {});
return request.get('intention/detail/' + id, {});
}
/**
@ -449,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);
}
/**
* 获取定位详细地址
@ -457,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
});
}
/**
* 获取店铺类型
@ -467,80 +467,109 @@ export function getGeocoder(data) {
*
*/
export function getStoreTypeApi() {
return request.get('intention/type', {}, {
noAuth: true
});
return request.get('intention/type', {
sift_store: 0
}, {
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
});
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`);
}

View File

@ -9,6 +9,14 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
import Cache from '@/utils/cache'
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
}
/**
* 提交提现
*/
@ -707,4 +715,8 @@ export function hasServiceApi(id) {
*/
export function getBankInfo() {
return request.get(`user/extract/history_bank`)
}
// 商户账单管理
export function getBillDetil() {
return request.get(`mer/financial_record`)
}

View File

@ -80,7 +80,7 @@ export default {
require: true
},
type: {
type: Number,
type: Number|String,
default: 0
},
isStore: {

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.detail}}</view>
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.brigade}}{{item.detail}}</view>
</view>
<text class='iconfont icon-complete' :class='active==index?"t-color":""'></text>
</view>

View File

@ -36,7 +36,7 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {getAddressList} from '@/api/user.js';
import { getCityV2 } from '@/api/api.js';
import { getCityV2,village } from '@/api/api.js';
import { mapGetters } from "vuex";
const CACHE_ADDRESS = {};
export default {
@ -87,25 +87,74 @@
this.loadAddress(0)
},
methods: {
change(pid,index){
change(pid){
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){
loadAddress(pid,type){
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;
})
// 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;
})
}
this.goTop()
},
selected(item){
@ -114,17 +163,49 @@
this.selectedArr.splice(this.selectedIndex + 1,999)
this.selectedArr[this.selectedIndex] = item;
this.selectedIndex = -1;
}else if(!item.parent_id){
}
// else if(!item.parent_id){
// this.selectedArr = [item];
// }else{
// this.selectedArr.push(item);
// }
else if(!item.id){
this.selectedArr = [item];
}else{
this.selectedArr.push(item);
if(this.selectedArr.length>4){
let arry=[]
arry.push(item)
this.selectedArr=arry
}else{
this.selectedArr.push(item);
}
}
if(item.snum){
this.loadAddress(item.id);
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");
} 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

@ -9,9 +9,10 @@
<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>
@ -39,77 +40,79 @@
// +----------------------------------------------------------------------
// | 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;
@ -119,45 +122,54 @@
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;
@ -168,9 +180,10 @@
background: var(--view-theme);
}
}
}
}
}
.animated {
animation-duration: .3s
}
</style>
</style>

View File

@ -7,77 +7,120 @@
</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" @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)&&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 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>
<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 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>
</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!=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 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 on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view>
</view>
</view>
</view>
</view>
</view>
@ -93,10 +136,18 @@
// +----------------------------------------------------------------------
// | 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: {
@ -131,14 +182,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
@ -149,52 +200,59 @@
},
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(() => {
@ -202,13 +260,15 @@
})
// #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
@ -221,83 +281,101 @@
.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;
@ -306,7 +384,8 @@
font-weight: bold;
position: relative;
color: var(--view-theme);
&::before{
&::before {
content: "";
display: inline-block;
width: 5rpx;
@ -317,43 +396,49 @@
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,6 +78,7 @@
});
},
goPay: function(number, paytype) {
if (this.isCall) {
return this.$emit('onChangeFun', {
action: 'payCheck',
@ -98,13 +99,17 @@
// #endif
} else if (paytype == 'balance') {
type = 'balance';
}else if(paytype == 'alipay'){
console.log('123');
} else if (paytype == 'alipay') {
// #ifndef MP
type = 'alipay';
// #endif
// #ifdef MP
type = 'alipayQr';
// #endif
} else if (paytype == 'creditBuy') {
console.log('123123');
type = 'creditBuy'
}
if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单'
@ -115,20 +120,27 @@
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: 'http://'+window.location.host+'/pages/users/order_list/index',
return_url: this.order_type == 98 ? 'http://' + window.location.host +
'/pages/users/order_list/indexCopy' : '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 = '/pages/users/order_list/index';
switch (status) {
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
'/pages/users/order_list/index'
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
@ -139,19 +151,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=1'
url: goPages + '?status=2'
});
break;
case 'alipay':
@ -159,19 +171,20 @@
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'
@ -180,35 +193,36 @@
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + 'status=1'
url: goPages + 'status=2'
});
}).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=0'
url: goPages + '?status=1'
});
}
}
}
})
// #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,
@ -219,22 +233,23 @@
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + 'status=1'
url: goPages + 'status=2'
});
},
fail: (e) => {
if(that.isCall){
console.log(e)
if (that.isCall) {
return that.$util.Tips({
title: '取消支付'
});
}else{
} else {
return that.$util.Tips({
title: '取消支付'
}, {
}, {
tab: 5,
url: goPages + '?status=0'
url: goPages + '?status=1'
});
}
},
@ -244,16 +259,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,
@ -262,21 +277,22 @@
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=1'
url: goPages + '?status=2'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + '?status=1'
url: goPages + '?status=2'
});
},
fail: function(e) {
@ -289,18 +305,19 @@
});
},
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', {
@ -311,9 +328,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
@ -322,9 +339,9 @@
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
@ -336,11 +353,11 @@
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
}, {
tab: 5,
url: goPages + 'status=1'
url: goPages + 'status=2'
});
},
fail: (e) => {
return that.$util.Tips({
@ -351,8 +368,8 @@
uni.hideLoading();
},
});
break;
// #endif
break;
// #endif
}
}).catch(err => {
uni.hideLoading();
@ -375,7 +392,7 @@
border-radius: 16rpx 16rpx 0 0;
background-color: #fff;
padding-bottom: 60rpx;
z-index: 99;
z-index: 99999;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0);
}
@ -456,4 +473,4 @@
font-size: 0.3rpx;
color: #999;
}
</style>
</style>

View File

@ -5,7 +5,7 @@
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item>
<image :src="item" class="slide-image" />
<image :src="item" class="slide-image" mode="aspectFit" />
<!-- <view class="stop" v-if="isType == 2">
<image class="image" src="/static/images/stop.png"></image>
</view> -->

View File

@ -360,27 +360,36 @@
margin-right: 30rpx;
}
.product-window .cart .carnum .item {
border: 1px solid #a4a4a4;
width: 84rpx;
width: 63rpx;
text-align: center;
height: 100%;
line-height: 54rpx;
color: #a4a4a4;
font-size: 45rpx;
line-height: 42rpx;
color: #333333;
font-weight: 400;
font-size: 26rpx;
}
.product-window .cart .carnum .reduce {
border-right: 0;
border-radius: 6rpx 0 0 6rpx;
line-height: 48rpx;
border: 1px solid #a4a4a4;
width: 44rpx;
height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx;
}
.product-window .cart .carnum .reduce.on {
border-color: #e3e3e3;
color: #dedede;
}
.product-window .cart .carnum .plus {
border-left: 0;
border-radius: 0 6rpx 6rpx 0;
line-height: 46rpx;
border: 1px solid #a4a4a4;
width: 44rpx;
height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx
}
.product-window .cart .carnum .plus.on {
border-color: #e3e3e3;

View File

@ -1,285 +1,340 @@
<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"></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>
<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>
</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: () => ({})
}
},
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);
});
},
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
},
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
},
}
}
},
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">
.zbp-head-wrapper {
position: relative;
padding-top: 78.95rpx;
overflow: hidden;
<style lang="scss" scoped>
.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: #fff;
}
.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;
.site-box {
margin: 0 auto;
width: 694.74rpx;
height: 66.67rpx;
margin-bottom: 26.32rpx;
position: relative;
z-index: 9999;
//
.place_wrapper {
color: #fff;
margin-right: 24.56rpx;
font-size: 31.58rpx;
.town_name {
margin-left: 10.53rpx;
}
}
//
.place_wrapper {
color: #fff;
margin-right: 24.56rpx;
font-size: 30rpx;
.iconfont {
font-size: 35.09rpx;
}
}
.town_name {
margin-left: 21rpx;
}
}
.my-main {
transition: background-color .5s ease;
}
.iconfont {
font-size: 35.09rpx;
}
}
.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;
.my-main {
transition: background-color .5s ease;
}
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.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;
.search_btn {
color: #fff;
width: 105.26rpx;
height: 52.63rpx;
line-height: 52.63rpx;
background: #f84221;
border-radius: 100px;
font-size: 28.07rpx;
}
}
.icon-sousuo {
font-size: 26.32rpx;
font-weight: bold;
color: #c8c7c6;
margin-right: 17.54rpx;
}
.supply_chains-head {
margin-bottom: 17.54rpx;
position: relative;
z-index: 2;
.search_btn {
color: #fff;
width: 105.26rpx;
height: 52.63rpx;
line-height: 52.63rpx;
background: #f84221;
border-radius: 100px;
font-size: 28.07rpx;
}
}
.swiper {
width: 694.74rpx;
height: 242.11rpx;
margin: 0 auto;
border-radius: 15px;
overflow: hidden;
.supply_chains-head {
margin-bottom: 17.54rpx;
position: relative;
z-index: 2;
.swi_item {
width: 100%;
height: 242.11rpx;
}
}
}
}
.swiper {
width: 724rpx;
height: 259rpx;
margin: 0 auto;
border-radius: 20rpx 20rpx 20rpx 20rpx;
overflow: hidden;
.swi_item {
width: 100%;
height: 259rpx;
}
}
}
}
</style>

View File

@ -9,23 +9,25 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// #ifdef MP-WEIXIN
httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
// #endif
// #ifdef H5
// httpApiTwo = "baseUrl" // h5跨域配置
httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
// httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif
httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325'
// #ifdef MP-WEIXIN
httpApiTwo = "https://nk.lihaink.cn"
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' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
}
// httpApi = 'https://shop.lihaink.cn' // 生产
// httpApiTwo = 'https://nk.lihaink.cn' // 生产
@ -35,37 +37,37 @@ if (process.env.NODE_ENV === "development") {
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,
VUE_APP_WS_URL: `${wsApi}?type=user`,
// #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: 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,
// #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,4 +38,6 @@ module.exports = {
CACHE_LONGITUDE: 'LONGITUDE',
//缓存纬度
CACHE_LATITUDE: 'LATITUDE',
//缓存地址信息
ADRESS_LOCATION:'ADRESS_LOCATION'
}

81
main.js
View File

@ -12,7 +12,9 @@ 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 uView from '@/uni_modules/uview-ui'
@ -23,59 +25,63 @@ 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()){
@ -86,12 +92,17 @@ 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

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.0.15",
"versionCode" : 138,
"versionName" : "1.3.5",
"versionCode" : 135,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -26,7 +26,12 @@
"Camera" : {},
"Geolocation" : {},
"Payment" : {},
"Share" : {}
"Share" : {},
"OAuth" : {},
"UniMP" : {
"description" : "uni小程序"
},
"Maps" : {}
},
"safearea" : {
"bottom" : {
@ -80,7 +85,8 @@
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店"
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店"
},
"idfa" : false,
"dSYMs" : false
@ -89,13 +95,13 @@
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "",
"appkey_android" : ""
"appkey_ios" : "048d9f3f323eea894b49c3a7edbc8d87",
"appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "android" ],
"__platform__" : [ "ios", "android" ],
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/"
}
@ -111,9 +117,7 @@
"__platform__" : [ "ios", "android" ]
}
},
"oauth" : {
"apple" : {}
},
"oauth" : {},
"ad" : {}
},
"icons" : {
@ -329,3 +333,6 @@
"template" : "template.h5.html"
}
}
//
/* ios */

2992
pages.json

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -280,6 +280,7 @@
// console.log(res)
this.detaile_address = res.data.address;
this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : res.data.address
uni.setStorageSync('adress_location',res.data.address)
})
},
fail: (res) => {

View File

@ -1,348 +1,577 @@
<template>
<view>
<view class="order-index" ref="container">
<view class="header acea-row">
<navigator class="item" :url="`/pages/admin/orderList/index?types=1&merId=${mer_id}`" hover-class="none">
<view class="num">{{ census.unpaid }}</view>
<view>待付款</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=2&merId=${mer_id}`" hover-class="none">
<view class="num">{{ census.unshipped }}</view>
<view>待发货</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=3&merId=${mer_id}`" hover-class="none">
<view class="num">{{ census.untake }}</view>
<view>待收货</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=4&merId=${mer_id}`" hover-class="none">
<view class="num">{{ census.unevaluate }}</view>
<view>待评价</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=6&merId=${mer_id}`" hover-class="none">
<view class="num">{{ census.refund }}</view>
<view>退款</view>
</navigator>
</view>
<view class="wrapper">
<view class="title">
<span class="iconfont icon-shujutongji"></span>数据统计
</view>
<view class="list acea-row" v-if="orderData">
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=today&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.today.payPrice }}</view>
<view>今日成交额</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=yesterday&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.yesterday.payPrice }}</view>
<view>昨日成交额</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=month&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.month.payPrice }}</view>
<view>本月成交额</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=today&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.today.orderNum}}</view>
<view>今日订单数</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=yesterday&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.yesterday.orderNum }}</view>
<view>昨日订单数</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=month&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.month.orderNum}}</view>
<view>本月订单数</view>
</navigator>
</view>
</view>
<view class="public-wrapper">
<view class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据
</view>
<view class="nav acea-row row-between-wrapper">
<view class="data">日期</view>
<view class="browse">订单数</view>
<view class="turnover">成交额</view>
</view>
<view class="conter">
<view class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
<view class="data">{{ item.day }}</view>
<view class="browse">{{ item.total }}</view>
<view class="turnover">{{ item.pay_price }}</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</view>
<view>
<view class="order-index" ref="container">
<view class="header acea-row">
<navigator class="item" :url="`/pages/admin/orderList/index?types=1&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unpaid }}</view>
<view>待付款</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=2&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unshipped }}</view>
<view>待发货</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=3&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.untake }}</view>
<view>待收货</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=4&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unevaluate }}</view>
<view>待评价</view>
</navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=6&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.refund }}</view>
<view>退款</view>
</navigator>
</view>
<view class="wrapper">
<view class="title">
<image src="@/static/images/sjtj.png" mode="widthFix" style="width:40rpx;translate: 0 10rpx;">
</image>数据统计
</view>
<view class="list acea-row" v-if="orderData">
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=today&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.today.payPrice }}</view>
<view>今日成交额</view>
</navigator>
<navigator class="item"
:url="`/pages/admin/statistics/index?type=price&time=yesterday&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.yesterday.payPrice }}</view>
<view>昨日成交额</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=month&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.month.payPrice }}</view>
<view>本月成交额</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=today&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.today.orderNum}}</view>
<view>今日订单数</view>
</navigator>
<navigator class="item"
:url="`/pages/admin/statistics/index?type=order&time=yesterday&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.yesterday.orderNum }}</view>
<view>昨日订单数</view>
</navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=month&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ orderData.month.orderNum}}</view>
<view>本月订单数</view>
</navigator>
</view>
</view>
<view class="public-wrapper">
<view class="title">
<image src="@/static/images/xxsj.png" mode="widthFix" style="width:40rpx;translate: 0 10rpx;">
</image>详细数据
</view>
<view class="nav acea-row row-between-wrapper">
<view class="data">日期</view>
<view class="browse">订单数</view>
<view class="turnover">成交额</view>
</view>
<view class="conter">
<view class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
<view class="data">{{ item.day }}</view>
<view class="browse">{{ item.total }}</view>
<view class="turnover">{{ item.pay_price }}</view>
</view>
</view>
</view>
<view class="public_footer" v-if="this.type_id == 12">
<view class="footer_bon">
<view class="footer_top public-wrapper ">
<image src="@/static/images/ddjk.png" mode="widthFix" style="width:40rpx;"></image>订单监控
</view>
<view v-for="(item,index) in OrderList" :key="index">
<view class="" v-for="(val, key) in item.orderProduct">
<view class="bon_top" :key="key" @click="toDetail(item)">
<view class="public_img">
<image class="public_img" :src="val.cart_info.product.image" mode=""></image>
</view>
<view>
<view class="text_top">
<view class="text">
{{ val.cart_info.product.store_name }}
</view>
<view class="monry">
{{ val.total_price }}
</view>
</view>
<view class="text_order">
订单号: {{ item.order_sn }}
</view>
</view>
</view>
<view class="bon_bon" :key="key" @click="toDetail(item)">
<view class="order">
采购数量
<view class="txt">
{{ val.product_num }}
</view>
</view>
<view class="order"
style="border-left: 1px solid #999999;border-right: 1px solid #999999;">
已售数量
<view class="txt">
{{ val.sales_volume }}
</view>
</view>
<view class="order">
库存数量
<view class="txt">
{{ val.product_num - val.sales_volume }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<button v-if="this.type_id == 12" class="footer-bnt" @click="navigator()">查看更多 ></button>
<!-- <view class="public-wrapper">
<navigator class="item" :url="`/pages/admin/order/monitor?merId=${mer_id}`"
hover-class="none">
<view class="num">订单监控</view>
</navigator>
</view> -->
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</view>
</template>
<script>
import { getStatisticsInfo, getStatisticsMonth, orderStatistics, orderPrice } from "@/api/admin";
import Loading from '@/components/Loading/index.vue'
export default {
name: 'adminOrder',
components: {
Loading
},
data() {
return {
census: {},
orderData: {
today: {},
yesterday: {},
month: {}
},
list: [],
where: {
page: 1,
limit: 15,
product_type: ''
},
loaded: false,
loading: false,
mer_id: '',
}
},
onLoad(options) {
this.where.product_type = options.product_type ?? 0
this.mer_id = options.mer_id
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id)
},
methods: {
getIndex: function() {
var that = this;
getStatisticsInfo().then(
res => {
that.census = res.data;
},
err => {
that.$util.Tips({
title: err.msg
})
}
);
},
getList: function(mer_id) {
var that = this;
if (that.loading || that.loaded) return;
that.loading = true;
orderPrice(that.where, mer_id).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.where.limit;
that.list.push.apply(that.list, res.data);
that.where.page = that.where.page + 1;
},
error => {
that.$util.Tips({
title: error.msg
})
},
300
);
},
getOrderStatistics: function(mer_id) {
let that = this;
const data = { product_type: this.where.product_type }
console.log('data', data);
orderStatistics(mer_id, data).then(
res => {
that.census = res.data.order;
that.orderData = res.data.data;
},
err => {
that.$util.Tips({
title: err.msg
})
}
);
}
},
onReachBottom() {
this.getList(this.mer_id)
}
}
import {
getStatisticsInfo,
getStatisticsMonth,
orderStatistics,
orderPrice,
purchaseOrder
} from "@/api/admin";
import Loading from '@/components/Loading/index.vue'
export default {
name: 'adminOrder',
components: {
Loading
},
data() {
return {
census: {},
orderData: {
today: {},
yesterday: {},
month: {}
},
list: [],
OrderList: [], //
where: {
page: 1,
limit: 10,
status: 1,
keyword: '',
product_type: ''
},
loaded: false,
loading: false,
mer_id: '',
type_id: '', //
}
},
onLoad(options) {
this.type_id = options.type_id
this.where.product_type = options.product_type ?? 0
this.mer_id = options.mer_id
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id)
this.purchaseOrderList(this.mer_id)
},
methods: {
getIndex: function() {
var that = this;
getStatisticsInfo().then(
res => {
that.census = res.data;
},
err => {
that.$util.Tips({
title: err.msg
})
}
);
},
getList: function(mer_id) {
var that = this;
if (that.loading || that.loaded) return;
that.loading = true;
orderPrice(that.where, mer_id).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.where.limit;
that.list.push.apply(that.list, res.data);
that.where.page = that.where.page + 1;
},
error => {
that.$util.Tips({
title: error.msg
})
},
300
);
},
getOrderStatistics: function(mer_id) {
let that = this;
const data = {
product_type: this.where.product_type
}
orderStatistics(mer_id, data).then(
res => {
that.census = res.data.order;
that.orderData = res.data.data;
},
err => {
that.$util.Tips({
title: err.msg
})
}
);
},
toDetail(item) {
uni.navigateTo({
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
})
},
navigator() {
uni.navigateTo({
url: `/pages/admin/order/monitor?merId=${this.mer_id}`
})
},
purchaseOrderList(mer_id) {
this.where.limit = 2
purchaseOrder(this.where, mer_id).then(res => {
// console.log(res);
this.OrderList = res.data
// console.log(this.OrderList);
})
}
},
onReachBottom() {
this.getList(this.mer_id)
}
}
</script>
<style lang="scss">
.popupn {
position: fixed;
width: 100%;
text-align: center;
top: 0;
left: 0;
background: transparent;
height: 90rpx;
line-height: 90rpx;
z-index: 100;
<style lang="scss" scoped>
.popupn {
position: fixed;
width: 100%;
text-align: center;
top: 0;
left: 0;
background: transparent;
height: 90rpx;
line-height: 90rpx;
z-index: 100;
.spin {
display: block;
transform: rotate(180deg);
font-size: 36rpx;
}
.spin {
display: block;
transform: rotate(180deg);
font-size: 36rpx;
}
.title {
max-width: 560rpx;
margin: 0 auto;
position: relative;
display: inline;
padding: 10rpx 30rpx 10rpx 50rpx;
background-color: rgba(0, 0, 0, 0.15);
border-radius: 30rpx;
color: #fff;
}
.title {
max-width: 560rpx;
margin: 0 auto;
position: relative;
display: inline;
padding: 10rpx 30rpx 10rpx 50rpx;
background-color: rgba(0, 0, 0, 0.15);
border-radius: 30rpx;
color: #fff;
}
.iconfont {
display: inline-block;
position: relative;
top: 4rpx;
right: 0;
}
.supervisory_img {
display: inline-block;
width: 500rpx;
height: 500rpx;
background-color: red;
overflow: hidden;
}
.mer_logo {
width: 34rpx;
height: 34rpx;
position: relative;
top: 6rpx;
right: 10px;
}
.iconfont {
display: inline-block;
position: relative;
top: 4rpx;
right: 0;
}
.mer_name {
display: inline-block;
max-width: 650rpx;
}
.mer_logo {
width: 34rpx;
height: 34rpx;
position: relative;
top: 6rpx;
right: 10px;
}
.invoice-content {
background-color: #ffffff;
}
}
.mer_name {
display: inline-block;
max-width: 650rpx;
}
/*订单首页*/
.order-index .header {
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/beijing2.png");
background-size: 100% 100%;
width: 100%;
height: 280upx;
padding: 40upx 3upx 0 3upx;
box-sizing: border-box;
}
.invoice-content {
background-color: #ffffff;
}
}
.order-index .header .item {
flex: 1;
-webkit-flex: 1;
-o-flex: 1;
-ms-flex: 1;
text-align: center;
font-size: 24upx;
color: #fff;
}
/*订单首页*/
.order-index .header {
background: url("@/static/images/beijin.png") no-repeat;
background-size: 100% 100%;
width: 100%;
height: 280upx;
padding: 40upx 3upx 0 3upx;
box-sizing: border-box;
}
.order-index .header .item .num {
font-size: 40upx;
margin-bottom: 7upx;
height: 60rpx;
}
.order-index .header .item {
flex: 1;
-webkit-flex: 1;
-o-flex: 1;
-ms-flex: 1;
text-align: center;
font-size: 24upx;
color: #fff;
}
.order-index .wrapper {
width: 690upx;
background-color: #fff;
border-radius: 10upx;
margin: -115upx auto 0 auto;
padding-top: 25upx;
}
.order-index .header .item .num {
font-size: 40upx;
margin-bottom: 7upx;
height: 60rpx;
}
.order-index .wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 40upx;
}
.order-index .wrapper {
width: 690upx;
background-color: #fff;
border-radius: 10upx;
margin: -115upx auto 0 auto;
padding-top: 25upx;
}
.order-index .wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.order-index .wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 40upx;
}
.order-index .wrapper .list .item {
width: 33.33%;
text-align: center;
font-size: 24upx;
color: #999;
margin-bottom: 45upx;
}
.order-index .wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.order-index .wrapper .list .item .num {
font-size: 40upx;
color: #333;
}
.order-index .wrapper .list .item {
width: 33.33%;
text-align: center;
font-size: 24upx;
color: #999;
margin-bottom: 45upx;
}
.public-wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 20upx;
}
.order-index .wrapper .list .item .num {
font-size: 40upx;
color: #333;
}
.public-wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.public-wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 20upx;
}
.public-wrapper {
margin: 18upx auto 0 auto;
width: 690upx;
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
}
.public-wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.public-wrapper .nav {
padding: 0 30upx;
height: 70upx;
line-height: 70upx;
font-size: 24upx;
color: #999;
}
.public-wrapper {
margin: 18upx auto 0 auto;
width: 690upx;
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
.public-wrapper .data {
width: 210upx;
text-align: left;
}
.item {
.num {
display: flex;
justify-content: flex-start;
align-items: center;
}
}
}
.public-wrapper .browse {
width: 192upx;
text-align: right;
}
.public-wrapper .nav {
padding: 0 30upx;
height: 70upx;
line-height: 70upx;
font-size: 24upx;
color: #999;
}
.public-wrapper .turnover {
width: 227upx;
text-align: right;
}
.public-wrapper .data {
width: 210upx;
text-align: left;
}
.public-wrapper .conter {
padding: 0 30upx;
}
.public-wrapper .browse {
width: 192upx;
text-align: right;
}
.public-wrapper .conter .item {
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
}
.public-wrapper .turnover {
width: 227upx;
text-align: right;
}
.public-wrapper .conter .item .turnover {
color: #d84242;
}
.public-wrapper .conter {
padding: 0 30upx;
}
.public-wrapper .conter .item {
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
}
.public-wrapper .conter .item .turnover {
color: #d84242;
}
.public_footer {
width: 90vw;
margin: auto;
.footer_top {
display: flex;
align-items: center;
margin: 16px 0 16px 25rpx;
.jk_img {
width: 18px;
height: 18px;
overflow: hidden;
// border: 1px solid red;
border-radius: 40px;
image {
width: 22px;
height: 22px;
margin-right: 5px;
}
}
}
.footer_bon {
width: 100%;
border-radius: 8px;
background-color: #fff;
padding-bottom: 10px;
margin-bottom: 10px;
.bon_top {
display: flex;
justify-content: flex-start;
align-items: center;
.public_img {
width: 60px;
height: 60px;
margin: 12px;
}
.text_top {
display: flex;
justify-content: flex-start;
align-items: center;
margin: 3px 0 3px 3px;
.text {
width: 140px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.monry {
margin-left: 10px;
color: #F84221;
}
}
.text_order {
width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 3px;
}
}
.bon_bon {
width: 90%;
height: 66px;
background: #F5F5F5;
border-radius: 4px 4px 4px 4px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
margin: auto;
margin-bottom: 10px;
margin-top: 5px;
.order {
width: 120px;
.txt {
margin-top: 5px;
}
}
}
}
}
.footer-bnt {
width: 100px;
height: 40px;
border-radius: 15px;
margin: auto;
line-height: 40px;
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
color: #999999;
font-size: 13px
}
</style>

View File

@ -86,7 +86,7 @@
</view>
<view class="item acea-row row-between">
<view>支付方式</view>
<view class="conter">{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "支付宝支付" }}</view>
<view class="conter">{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "先货后款" }}</view>
</view>
<view class="item acea-row row-between">
<view>买家留言</view>
@ -146,8 +146,14 @@
</view>
</view>
<view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);">
<view class="more"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
同意
</view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,2)">
拒绝
</view>
<view class="bnt cancel" @click="modify('0')" v-if="orderInfo.paid == 0">
一键改价
</view>
@ -158,11 +164,24 @@
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
确认付款
</view>
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
收件码
</view>
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
<view class="bnt delivery" v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1" @click="goCancellation">去核销</view>
</view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
:status="status"></PriceChange>
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view>
</u-popup>
</view>
</template>
<script>
@ -185,7 +204,9 @@
setAdminOrderRemark,
setOfflinePay,
setOrderRefund,
orderCancellation
orderCancellation,
logisticsCode,
postconfirm
} from "@/api/admin";
import { isMoney } from '@/utils/validate.js'
import { HTTP_REQUEST_URL } from '@/config/app';
@ -211,7 +232,10 @@
payType: "",
types: "",
clickNum: 1,
goname:''
goname:'',
popUpShow: false,
payCodeUrl:''
};
},
watch: {
@ -225,12 +249,12 @@
},
onLoad: function(option) {
let self = this
this.order_id = option.id
this.mer_id = option.mer_id
this.goname = option.goname
this.getIndex();
self.order_id = option.id
self.mer_id = option.mer_id
self.goname = option.goname
self.getIndex();
// #ifdef H5
this.$nextTick(function() {
self.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data');
// var copybtn = document.getElementsByClassName("copy-data");
// var clipboard = new Clipboard(copybtn);
@ -249,6 +273,42 @@
},
methods: {
//
toPostagequ(item){
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
})
},
//
popUpClose() {
this.popUpShow = false
},
//
tongyi(id,number){
let data={
id:id,
type:number
}
if(number == 1){
this.$nextTick(()=>{
uni.navigateTo({
url:`/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
})
})
}else if(number == 2){
uni.navigateTo({
url:`/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
})
}
postconfirm(this.mer_id,data).then(res=>{
})
},
more: function() {
this.order = !this.order;
},

File diff suppressed because it is too large Load Diff

View File

@ -789,6 +789,7 @@
</block>
</swiper>
</div>
</div>
<div class="recording" v-if="recording">
<image src="/static/images/recording.png" />
@ -1944,6 +1945,7 @@
position: fixed;
bottom: 0;
left: 0;
margin-bottom: var(--status-bar-height);;
}
.broadcast-details .footerCon.on {

View File

@ -158,9 +158,9 @@
} else {
this.$set(this, 'searchValue', event);
}
this.$nextTick(() => {
this.focus = true
})
// this.$nextTick(() => {
// this.focus = true
// })
this.searchBut()
},
setValue: function(event) {

View File

@ -2,19 +2,17 @@
<view :style="viewColor">
<view class='productList'>
<view class='search acea-row row-between-wrapper'>
<!--#ifdef H5-->
<view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view>
</view>
<!--#endif-->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input>
</view>
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
<view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei'
@click="showMaoLocation(latitude,longitude)"></view>
<!-- <view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei'
@click="showMaoLocation(latitude,longitude)"></view> -->
</view>
<view class="nav-wrapper">
<view v-if="hide_mer_status == 0" class="tab-bar">
@ -22,7 +20,7 @@
<view class="tab-item" :class="{on:tabIndex==2}" @click="tabIndex = 2">店铺</view>
</view>
<block v-if="tabIndex==1">
<view class='nav acea-row row-middle'>
<view class='nav acea-row row-middle' >
<view class='item' @click="downStatus = !downStatus"
:class="{'t-color':downKey>0 && firstKey == 0}">
{{downMenu[downKey].title}}
@ -413,7 +411,7 @@
}
}
});
this.mTop = this.hide_mer_status == 0 ? '238rpx' : '170rpx'
this.mTop = this.hide_mer_status == 0 ? '308rpx' : '170rpx'
},
computed: {
shopTab: function() {
@ -561,9 +559,10 @@
limit: this.sotreParam.limit,
order: this.sotreParam.order,
category_id: this.sotreParam.category_id,
type_id: 10
type_id: this.sotreParam.type_id
}
console.log(this.sotreParam.category_id)
if (this.latitude) {
serachData.location = this.latitude + ',' + this.longitude
}
@ -578,7 +577,7 @@
this.storeList = this.storeList.concat(res.data.list)
this.count = res.data.count
this.loading = false
console.log(this.storeList);
})
},
//
@ -684,6 +683,7 @@
},
//
confirm2(data) {
let arr1 = [],
arr2 = []
if (data.storeTypeArr.length == 0) {
@ -821,8 +821,10 @@
//
get_product_list: function(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';
@ -897,13 +899,14 @@
.productList .search {
width: 100%;
height: 86rpx;
padding: 0 20rpx;
box-sizing: border-box;
position: fixed;
left: 0;
top: 0;
z-index: 9;
height: 170rpx;
padding: 0 20rpx;
// box-sizing: border-box;
position: fixed;
left: 0;
top: 0rpx;
padding-top: 60rpx;
z-index: 9;
background-color: var(--view-theme);
.icon-dingwei {
@ -966,7 +969,7 @@
z-index: 9;
position: fixed;
left: 0;
top: 0;
top: 70rpx;
width: 100%;
margin-top: 86rpx;
background-color: var(--view-theme);
@ -1040,6 +1043,7 @@
.productList .list {
padding: 0 20rpx;
}
.productList .list.on {
@ -1075,6 +1079,7 @@
position: relative;
width: 100%;
height: 345rpx;
}
.productList .list .item .pictrue.on {
@ -1417,7 +1422,8 @@
}
.store-wrapper {
margin-top: 240rpx;
margin-top: 310rpx;
border-top: 1px solid #F6F6F6;
.star-box {

View File

@ -1,216 +1,94 @@
<template>
<view class="gather">
<zbpSwiper></zbpSwiper>
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
<view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']"
style="color:#000;margin-left: 20rpx;">
</view>
<view class="town_name" style="color:#000;">{{street}}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view>
</navigator>
</view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view class="bg-img">
<img :src="bgColor" alt="">
</view>
</view> -->
</view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street" @kkchange="kkchange"></zbpSwiper>
<u-empty :show="jurisdiction" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<block v-if="isShow">
<view class="special_work com" v-if="userInfoData.mer_info.type_id === 12">
<view class="special_work com" v-if="true">
<view class="title">市级供应链</view>
<view class="content">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
<image class="icon_img" :src="`${prefix}zsgl.png`" mode="aspectFill"></image>
<text class="text">在售管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98`)">
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
<text class="text">财务管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
</image>
<text class="text">入库管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
<text class="text">商户设置</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)">
<image class="icon_img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png"
mode="aspectFill">
</image>
<text class="text">视频教学</text>
</view>
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image>
<text class="text">财务公开</text>
</view> -->
<!-- <view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view> -->
</view>
<view class="business com special_work" v-if="jurisdiction == false">
<view class="title project">
<view>更多功能</view>
<view v-if="!editFlag" class="edit" @click="editFlag = true">编辑</view>
<view v-else class="edit" @click="editComfirm">完成</view>
</view>
<view class="content">
<block v-if="nowMenuList.length > 0">
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
<view class="examine" @click="
editFlag ? removeMenu(item) : clickMenu(item.type, item.data)
">
<image class="icon_img" :src="item.icon" mode="aspectFit">
</image>
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
<text class="text">{{ item.name }}</text>
</view>
</u-transition>
</block>
<view v-else-if="!editFlag" @click="editFlag = true"
style="text-align: center; width: 100%; color: #aaa">还没有应用,点我添加应用</view>
</view>
<view class="business com" v-if="userInfoData.mer_info.type_id === 10">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">我的店铺</view>
<view class="content ">
<view class="examine"
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text>
</view>
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
</image>
<text class="text">扫码出库</text>
</view>
<view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
</image>
<text class="text">入库管理</text>
</view>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image>
<text class="text">客服记录</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image>
<text class="text">订单核销</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image>
<text class="text">商户设置</text>
</view>
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image>
<text class="text">财务公开</text>
</view> -->
</view>
<view v-if="editFlag" class="business com special_work edit_card">
<view class="title project" style="padding: 0 28rpx">
<view>编辑功能</view>
<view class="edit2" @click="editComfirm">完成</view>
</view>
<view class="content">
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
<view class="examine" @click="pushMenu(item)">
<image class="icon_img" :src="item.icon" mode="aspectFit">
</image>
<u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{ item.name }}</text>
</view>
</view>
</u-transition>
</view>
</view>
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
</view>
</view>
<view class="business com" v-if="userInfoData.mer_info.type_id === 11">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">里海云仓</view>
<view class="content ">
<view class="examine"
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text>
</view>
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
</image>
<text class="text">扫码出库</text>
</view>
<view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
</image>
<text class="text">入库管理</text>
</view>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image>
<text class="text">客服记录</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image>
<text class="text">订单核销</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image>
<text class="text">商户设置</text>
</view>
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image>
<text class="text">财务公开</text>
</view> -->
</view>
</view>
</view>
</view>
</block>
<view class="" v-if="jurisdiction == false && isShow == false">
<emptyPage title="暂无信息"></emptyPage>
</view>
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
</view>
</template>
</m-tabbar> -->
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
</view>
</template>
</m-tabbar> -->
</view>
</template>
<script>
import Cache from '@/utils/cache';
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import emptyPage from '@/components/emptyPage.vue';
import zbpSwiper from '@/components/zbpSwiper'
import {
getArea,
getStreet
} from '@/api/article.js';
import {
mapState,
mapGetters
@ -224,6 +102,7 @@
getUserInfo
} from '@/api/user.js'
import {
getGeocoder,
microSeachBarCode,
microEadtProduct
} from '@/api/store.js'
@ -232,14 +111,20 @@
} from '@/libs/uniApi';
import {
getDiy
} from '@/api/api.js'
} from '@/api/api.js';
// #ifdef APP-PLUS
import uniMP from '@/utils/uniMP.js';
// #endif
export default {
components: {
mTabbar,
zbpSwiper
zbpSwiper,
emptyPage
},
data() {
return {
locationArr: ({}),
emptyText: '暂无可用应用',
jurisdiction: false, //
mer_id: '',
@ -249,14 +134,44 @@
}
},
prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/11/',
isShow: false
isShow: false,
bgColor: '',
isFshow: false,
street: '',
//
editFlag: false,
//
AllMenuList: [{
name: '商户平台',
icon: '/static/applet/shop_app.png',
data: '/pages/moreProject/moreProject',
type: 2,
},
{
name: '供销平台',
icon: '/static/applet/gx_app.png',
data: '__UNI__B5B1EDD',
type: 1,
},
],
nowMenuList: [],
street: '',
showPicker: false,
columnData: [],
bgColor: '',
isFshow: false,
backColor: 'rgba(252, 252, 252, 0)'
};
},
computed: {
...mapGetters(['userInfo', 'location', 'isLogin'])
},
created() {},
onLoad() {},
onLoad() {
this.Area()
this.initMenu();
},
onShow() {
if (this.isLogin) {
this.emptyText = '暂无可用应用'
@ -266,12 +181,231 @@
this.jurisdiction = true
}
this.getUserInfo()
},
onPullDownRefresh() {
this.getUserInfo()
uni.stopPullDownRefresh()
},
beforeDestroy() {
//
this.$bus.$off('value-updated')
},
mounted() {
if (this.street.length <= 0) {
this.appLocation()
}
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
// #endif
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
// #ifdef APP-PLUS
onPageScroll(e) {
const scrollTop = e.scrollTop;
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)'
this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(252, 252, 252, .5)'
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1)'
this.isFshow = true
}
},
// #endif
methods: {
scrolling() {
//
let scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
//
let scrollStep = scrollTop - this.oldScrollTop;
// console.log("header ", scrollTop);
//
this.oldScrollTop = scrollTop;
//windowHeight
let windowHeight =
document.documentElement.clientHeight || document.body.clientHeight;
//scrollHeight
let scrollHeight =
document.documentElement.scrollHeight || document.body.scrollHeight;
//
if (scrollTop + windowHeight == scrollHeight) {
//
// console.log("header ");
}
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)'
this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(252, 252, 252, .5)'
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1)'
this.isFshow = true
}
},
//
initMenu() {
let now = uni.getStorageSync('gatherNowMenuList');
try {
this.nowMenuList = JSON.parse(now);
this.AllMenuList = this.AllMenuList.filter((item) => {
return this.nowMenuList.find(t => t.name == item.name)?.name != item.name;
})
} catch (e) {
this.nowMenuList = [];
}
},
clickMenu(e, data) {
switch (e) {
case 1:
this.getUniMp(data);
break;
case 2:
this.navigator(data);
break;
}
},
//
pushMenu(data) {
this.nowMenuList.push(data);
this.AllMenuList = this.AllMenuList.filter((item) => {
return item.name != data.name;
})
},
//
removeMenu(data) {
this.AllMenuList.push(data);
this.nowMenuList = this.nowMenuList.filter((item) => {
return item.name != data.name;
})
},
//
editComfirm() {
this.editFlag = false;
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp(appid) {
console.log('点击供销平台');
// #ifdef APP-PLUS
uniMP.loadMP(appid);
return;
// #endif
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
this.$refs.uPicker.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);
});
},
selectLocation() {
this.showPicker = true
},
confirm(e) {
this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
this.showPicker = false
},
appLocation() {
uni.getLocation({
type: 'wgs84',
timeout: '10',
success: (res) => {
// console.log(res)
this.isshow = false
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' +
street_id);
})
}).catch(err => {
this.isshow = false
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
this.isshow = false
}
});
},
kkchange(e) {
this.bgColor = e
},
navigator(url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '') return Toast("");
uni.navigateTo({
@ -290,10 +424,11 @@
this.isShow = true
this.mer_id = res.data.service.mer_id
}
if (!res.data.mer_info) {
that.$set(this, 'jurisdiction', false);
}
console.log(that.userInfoData);
// console.log(that.userInfoData);
});
}
}
@ -302,12 +437,71 @@
<style lang="scss" scoped>
.gather {
padding-bottom: 164.91rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
position: relative;
}
.sitebox {
animation-name: fadeIn;
animation-duration: 3s;
animation-fill-mode: forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.site-box {
width: 100%;
/* #ifdef MP || APP-PLUS */
height: 160rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx;
/* #endif */
margin-bottom: 26.32rpx;
position: absolute;
top: 0rpx;
position: fixed;
z-index: 999;
/* #ifdef MP || APP-PLUS */
padding-top: 75rpx;
/* #endif */
/* #ifdef H5 */
padding-top: 25rpx;
/* #endif */
padding-right: 20rpx;
//
.place_wrapper {
color: #fff;
margin-right: 24.56rpx;
font-size: 30rpx;
opacity: 0;
.town_name {
margin-left: 21rpx;
}
}
.iconfont {
opacity: 0;
font-size: 30rpx;
font-size: 35.09rpx;
}
}
.top_box {
// padding-top: 180rpx;
background: linear-gradient(#36A2FF, #fff);
background: linear-gradient(#36a2ff, #fff);
}
.com {
@ -333,6 +527,27 @@
margin-bottom: 38.6rpx;
}
.project {
display: flex;
justify-content: space-between;
align-items: flex-end;
.edit {
font-size: 26rpx;
font-weight: 400;
&::after {
content: ">";
margin-left: 10rpx;
}
}
.edit2 {
font-size: 26rpx;
font-weight: 400;
}
}
.content {
display: flex;
align-content: center;
@ -346,11 +561,18 @@
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
// margin: 0 0 33.33rpx 33.33rpx !important;
.icon_img {
width: 63.16rpx;
height: 63.16rpx;
width: 83.16rpx;
height: 83.16rpx;
}
.icon {
position: absolute;
top: -5rpx;
right: 25rpx;
}
.text {
@ -383,4 +605,9 @@
}
}
}
.edit_card {
background-color: #fff;
padding-top: 28rpx;
}
</style>

View File

@ -585,6 +585,7 @@
])),
},
onLoad(options) {
// console.log(options)
this.referer = options.referer
if (options.product_type) {
this.product_type = options.product_type
@ -1349,9 +1350,10 @@
postCartAdd(q)
.then(function(res) {
that.isOpen = that.attr.cartAttr = false;
// console.log(that.storeInfo);
if (news) {
uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}`
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${that.storeInfo.merchant.type_id}`
});
} else {
that.$util.Tips({

View File

@ -1,364 +1,377 @@
<template>
<view class="Circle_friends">
<view class="circle_friends_wrapper">
<view class="Circle_friends">
<view class="circle_friends_wrapper">
<zbpSwiper></zbpSwiper>
<zbpSwiper></zbpSwiper>
<view class="tabs_wrapper">
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
</view>
<view class="tabs_wrapper">
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
</view>
<view class="goods">
<block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill"
class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view>
</view>
<view class="nice_box" @click.stop="giveStart(item)">
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text>
</view>
</view>
</view>
</view>
</block>
</view>
<view class="empty_wrapper" v-if="emptyShow">
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
</view>
</view>
<view class="goods">
<block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view>
</view>
<view class="nice_box" @click.stop="giveStart(item)">
<text class="iconfont"
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text>
</view>
</view>
</view>
</view>
</block>
</view>
<view class="empty_wrapper" v-if="emptyShow">
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
</view>
</view>
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<!-- <view class="bg_color"></view> -->
<!-- <view class="bg_color"></view> -->
<!-- <m-tabbar native>
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
</view>
</template>
</m-tabbar> -->
</view>
</view>
</template>
<script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper'
import { getSlideAPI } from '@/api/lihai.js'
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js'
import { getIndexData, getDiy } from '@/api/api.js'
import { getGeocoder, merClassifly } from '@/api/store.js';
import { getArea, getStreet } from '@/api/article.js';
import { Toast } from '@/libs/uniApi'
export default {
components: {
mTabbar,
zbpSwiper
},
data() {
return {
bgColor: '',
showPicker: false,
columnData: [],
show: false,
swiper: {
url: [{
img: ''
}],
indicatorDots: true, //
vertical: false, //
autoplay: true, //
interval: 2000, //
duration: 500 //
},
tabsData: {
list: [],
tabsActive: 0
},
where: {
category_id: 0,
page: 1,
limit: 30
},
currentItemId: 69, // 0 || 69
keyword: '',
location: '',
emptyShow: false,
street: '',
cateGoods: []
}
},
onPullDownRefresh() {
this.getCateList()
this.getGoods()
this.selfLocation()
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.getCateList()
this.getGoods()
this.selfLocation()
this.Area()
},
onShow() {},
methods: {
confirm(e) {
this.where.street_id = e.value[1].code
this.showPicker = false
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
this.$refs.uPicker.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);
});
},
gogogo(item) {
if (this.tabsData.tabsActive == 1) {
uni.navigateTo({
//#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
//#endif
//#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
//#endif
})
} else {
uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
})
}
},
giveStart(item) {
let status = item.relevance_id ? 0 : 1
graphicStartApi(item.community_id, {
status: status
}).then(res => {
Toast(res.message)
this.getGoods()
})
},
dianji() {
this.show = !this.show
},
//
getGoods: function() {
// category_id=69&page=1&limit=30
graphicLstApi(this.where).then(res => {
this.cateGoods = res.data.list
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
})
},
/*获取分类列表*/
async getCateList() {
const {
data
} = await getTopicList()
this.tabsData.list = [{
cate_name: "推荐",
category_id: 0
}, {
cate_name: "视频",
category_id: -1,
children: []
}, ...data]
},
tabsChange(item) {
this.where.category_id = item.category_id
this.getGoods()
this.street_id = item.id
this.tabsData.tabsActive = item.index
if (item.index == 1) {
uni.navigateTo({
// #ifdef MP || H5
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
})
}
},
selfLocation() {
uni.getLocation({
type: 'gcj02',
success: (res) => {
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
getGeocoder({ lat: latitude, long: longitude }).then(res => {
this.$store.commit('setLocation', res.data)
this.street = res.data.address_component.street
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
uni.showToast({
title: err.errMsg,
icon: 'none',
duration: 1000
});
}
});
},
}
}
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper'
import {
getSlideAPI
} from '@/api/lihai.js'
import {
graphicLstApi,
getTopicList,
graphicStartApi
} from '@/api/community.js'
import {
getIndexData,
getDiy
} from '@/api/api.js'
import {
getGeocoder,
merClassifly
} from '@/api/store.js';
import {
getArea,
getStreet
} from '@/api/article.js';
import {
Toast
} from '@/libs/uniApi'
export default {
components: {
mTabbar,
zbpSwiper
},
data() {
return {
bgColor: '',
showPicker: false,
columnData: [],
show: false,
swiper: {
url: [{
img: ''
}],
indicatorDots: true, //
vertical: false, //
autoplay: true, //
interval: 2000, //
duration: 500 //
},
tabsData: {
list: [],
tabsActive: 0
},
where: {
category_id: 0,
page: 1,
limit: 30
},
currentItemId: 69, // 0 || 69
keyword: '',
location: '',
emptyShow: false,
street: '',
cateGoods: []
}
},
onPullDownRefresh() {
this.getCateList()
this.getGoods()
this.selfLocation()
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.getCateList()
this.getGoods()
this.selfLocation()
this.Area()
},
onShow() {},
methods: {
confirm(e) {
this.where.street_id = e.value[1].code
this.showPicker = false
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
this.$refs.uPicker.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);
});
},
gogogo(item) {
if (this.tabsData.tabsActive == 1) {
uni.navigateTo({
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
})
} else {
uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
})
}
},
giveStart(item) {
let status = item.relevance_id ? 0 : 1
graphicStartApi(item.community_id, {
status: status
}).then(res => {
Toast(res.message)
this.getGoods()
})
},
dianji() {
this.show = !this.show
},
//
getGoods: function() {
// category_id=69&page=1&limit=30
graphicLstApi(this.where).then(res => {
this.cateGoods = res.data.list
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
})
},
/*获取分类列表*/
async getCateList() {
const {
data
} = await getTopicList()
this.tabsData.list = [{
cate_name: "推荐",
category_id: 0
}, {
cate_name: "视频",
category_id: -1,
children: []
}, ...data]
},
tabsChange(item) {
this.where.category_id = item.category_id
this.getGoods()
this.street_id = item.id
this.tabsData.tabsActive = item.index
if (item.index == 1) {
uni.navigateTo({
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
})
}
},
selfLocation() {
uni.getLocation({
type: 'gcj02',
success: (res) => {
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
this.$store.commit('setLocation', res.data)
this.street = res.data.address_component.street
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
uni.showToast({
title: err.errMsg,
icon: 'none',
duration: 1000
});
}
});
},
}
}
</script>
<style lang="scss">
page {
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
page {
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
.Circle_friends {
position: relative;
padding: 0 0 87.72rpx 0;
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
.Circle_friends {
position: relative;
padding: 0 0 87.72rpx 0;
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
.circle_friends_wrapper {
position: relative;
z-index: 2;
}
.circle_friends_wrapper {
position: relative;
z-index: 2;
}
.search_wrapper {
width: 694.74rpx;
margin: 0 auto;
}
.search_wrapper {
width: 694.74rpx;
margin: 0 auto;
}
.tabs_wrapper {
width: 694.74rpx;
margin: 0 auto;
margin-bottom: 21.05rpx;
}
.tabs_wrapper {
width: 694.74rpx;
margin: 0 auto;
margin-bottom: 21.05rpx;
}
.empty_wrapper {
display: flex;
align-items: center;
justify-content: center;
}
.empty_wrapper {
display: flex;
align-items: center;
justify-content: center;
}
.goods {
margin: 0 auto;
width: 694.74rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.goods {
margin: 0 auto;
width: 694.74rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.goods_item {
width: 342.11rpx;
height: 491.23rpx;
border-radius: 8px;
overflow: hidden;
background-color: #fff;
display: flex;
flex-direction: column;
margin-bottom: 10.53rpx;
.goods_item {
width: 342.11rpx;
height: 491.23rpx;
border-radius: 8px;
overflow: hidden;
background-color: #fff;
display: flex;
flex-direction: column;
margin-bottom: 10.53rpx;
.goods_img {
width: 100%;
height: 294.74rpx;
}
.goods_img {
width: 100%;
height: 294.74rpx;
}
.botm {
flex: 1;
padding: 0 14.04rpx;
padding-bottom: 21.05rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.botm {
flex: 1;
padding: 0 14.04rpx;
padding-bottom: 21.05rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
margin: 12px 0;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.title {
margin: 12px 0;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.goods_info {
justify-content: space-between;
.goods_info {
justify-content: space-between;
.g_img {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.g_img {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.g_name {
margin-left: 8.77rpx;
width: 100.63rpx;
text-overflow: ellipsis;
/* 溢出显示省略号 */
overflow: hidden;
/* 溢出隐藏 */
white-space: nowrap;
/* 强制不换行 */
}
.g_name {
margin-left: 8.77rpx;
width: 100.63rpx;
text-overflow: ellipsis;
/* 溢出显示省略号 */
overflow: hidden;
/* 溢出隐藏 */
white-space: nowrap;
/* 强制不换行 */
}
.nice_box {
display: flex;
align-items: center;
.nice_box {
display: flex;
align-items: center;
.isshow {
color: #FE3530 !important;
}
.isshow {
color: #FE3530 !important;
}
.iconfont {
font-size: 30rpx;
}
.iconfont {
font-size: 30rpx;
}
.icon-shoucang1 {
color: #F84221;
}
.icon-shoucang1 {
color: #F84221;
}
.collect {
font-size: 24rpx;
margin-left: 5rpx;
}
}
}
}
}
}
.collect {
font-size: 24rpx;
margin-left: 5rpx;
}
}
}
}
}
}
</style>

View File

@ -28,7 +28,7 @@
</view>
<view class="advertItem02 advertItem05 acea-row" v-if="style==4">
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)">
<image :src="item.image" mode="aspectFill" :style="'height:'+ imageH +'rpx;'"></image>
<image :src="item.image" mode="aspectFit" :style="'height:'+ imageH +'rpx;'"></image>
</view>
</view>
<view class="advertItem02 advertItem06 acea-row" v-if="style==5">

File diff suppressed because it is too large Load Diff

View File

@ -1,269 +1,352 @@
<template>
<view>
<view class='newsDetail' style="padding-bottom: 50px;">
<view class='title'>{{articleInfo.title}}</view>
<view class='list acea-row row-middle'>
<view class='label'>{{articleInfo.author}}</view>
<view class='item'></text>{{articleInfo.create_time}}</view>
<!-- <view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view> -->
</view>
<view class='conters'>
<!-- <rich-text :nodes="content" class="conter"></rich-text> -->
<jyf-parser :html="content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
<view class="picTxt acea-row row-between-wrapper" v-if="store_info.id">
<view class="pictrue">
<image :src="store_info.image" ></image>
</view>
<view class="text">
<view class="name line1">{{store_info.store_name}}</view>
<view class="money font-color">
<text class="num">{{store_info.price}}</text>
</view>
<view class="y_money">{{store_info.ot_price}}</view>
</view>
<navigator :url="'/pages/goods_details/index?id='+store_info.id" hover-class="none" class="label"><text
class="span">查看商品</text></navigator>
</view>
<!-- #ifdef H5 -->
<button class="bnt bg-color" hover-class='none' @click="listenerActionSheet"
>和好友一起分享</button>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<button class="bnt bg-color" open-type="share" hover-class='none' @click="listenerActionSheet" >和好友一起分享</button>
<!-- #endif -->
</view>
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
<!-- <home></home> -->
</view>
<view>
<view class='newsDetail' style="padding-bottom: 50px;">
<view class='title'>{{articleInfo.title}}</view>
<view class='list acea-row row-middle'>
<view class='label'>{{articleInfo.author}}</view>
<view class='item'></text>{{articleInfo.create_time}}</view>
<!-- <view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view> -->
</view>
<view class='conters'>
<!-- <rich-text :nodes="content" class="conter"></rich-text> -->
<jyf-parser :html="content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
<view class="picTxt acea-row row-between-wrapper" v-if="store_info.id">
<view class="pictrue">
<image :src="store_info.image"></image>
</view>
<view class="text">
<view class="name line1">{{store_info.store_name}}</view>
<view class="money font-color">
<text class="num">{{store_info.price}}</text>
</view>
<view class="y_money">{{store_info.ot_price}}</view>
</view>
<navigator :url="'/pages/goods_details/index?id='+store_info.id" hover-class="none" class="label"><text
class="span">查看商品</text></navigator>
</view>
<!-- #ifdef H5 -->
<button class="bnt bg-color" hover-class='none' @click="listenerActionSheet">和好友一起分享</button>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<button class="bnt bg-color" open-type="share" hover-class='none' @click="uniShare">分享</button>
<!-- #endif -->
</view>
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
<!-- <home></home> -->
</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 parser from "@/components/jyf-parser/jyf-parser";
import {
getArticleDetails
} from '@/api/api.js';
import shareInfo from '@/components/shareInfo';
import home from '@/components/home';
export default {
components: {
shareInfo,
home,
"jyf-parser": parser,
},
data() {
return {
id: 0,
articleInfo: [],
store_info: {},
content: '',
shareInfoStatus: false,
tagStyle: {
img: 'width:100%;display:block;'
},
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.hasOwnProperty('id')) {
this.id = options.id;
} else {
// #ifndef H5
uni.navigateBack({
delta: 1
});
// #endif
// #ifdef H5
history.back();
// #endif
}
},
onShow: function() {
this.getArticleOne();
},
methods: {
getArticleOne: function() {
let that = this;
getArticleDetails(that.id).then(res => {
uni.setNavigationBarTitle({
title: res.data.title.substring(0, 7) + "..."
});
that.$set(that, 'articleInfo', res.data);
that.$set(that, 'store_info', res.data.store_info ? res.data.store_info : {});
that.content = res.data.content.content;
// #ifdef H5
if (this.$wechat.isWeixin()) {
this.setShareInfo();
}
// #endif
});
},
listenerActionSheet() {
this.shareInfoStatus = true
},
setShareInfoStatus() {
this.shareInfoStatus = false
},
setShareInfo: function() {
let href = location.href;
let configAppMessage = {
desc: this.articleInfo.synopsis,
title: this.articleInfo.title,
link: href,
imgUrl: this.articleInfo.image_input
};
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage);
}
}
}
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import parser from "@/components/jyf-parser/jyf-parser";
import {
getArticleDetails
} from '@/api/api.js';
import shareInfo from '@/components/shareInfo';
import home from '@/components/home';
import UniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare();
export default {
components: {
shareInfo,
home,
"jyf-parser": parser,
},
onBackPress({
from
}) {
if (from == 'backbutton') {
this.$nextTick(function() {
uniShare.hide()
})
return uniShare.isShow;
}
},
data() {
return {
id: 0,
articleInfo: [],
store_info: {},
content: '',
shareInfoStatus: false,
tagStyle: {
img: 'width:100%;display:block;'
},
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.hasOwnProperty('id')) {
this.id = options.id;
} else {
// #ifndef H5
uni.navigateBack({
delta: 1
});
// #endif
// #ifdef H5
history.back();
// #endif
}
},
onShow: function() {
this.getArticleOne();
},
methods: {
//
uniShare() {
uniShare.show({
content: { // typeherftitlesummaryimageUrl
type: 0,
href: 'https://uniapp.dcloud.io/',
title: '标题',
summary: '描述',
imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png'
},
menus: [{
"img": "/static/images/weixin.png",
"text": "微信好友",
"share": { //type=5
"provider": "weixin",
"scene": "WXSceneSession"
}
},
{
"img": "/static/images/weixin.png",
"text": "微信朋友圈",
"share": {
"provider": "weixin",
"scene": "WXSceneTimeline"
}
},
{
"img": "/static/images/weixin.png",
"text": "微信小程序",
"share": {
provider: "weixin",
scene: "WXSceneSession",
type: 5,
miniProgram: {
id: '123',
path: '/pages/list/detail',
webUrl: '/#/pages/list/detail',
type: 0
},
}
},
// {
// "img": "/static/app-plus/sharemenu/weibo.png",
// "text": "",
// "share": {
// "provider": "sinaweibo"
// }
// },
// {
// "img": "/static/app-plus/sharemenu/qq.png",
// "text": "QQ",
// "share": {
// "provider": "qq"
// }
// },
// {
// "img": "/static/app-plus/sharemenu/copyurl.png",
// "text": "",
// "share": "copyurl"
// },
// {
// "img": "/static/app-plus/sharemenu/more.png",
// "text": "",
// "share": "shareSystem"
// }
],
cancelText: "取消分享",
}, e => { //callback
console.log(uniShare.isShow);
console.log(e);
})
},
getArticleOne: function() {
let that = this;
getArticleDetails(that.id).then(res => {
uni.setNavigationBarTitle({
title: res.data.title.substring(0, 7) + "..."
});
that.$set(that, 'articleInfo', res.data);
that.$set(that, 'store_info', res.data.store_info ? res.data.store_info : {});
that.content = res.data.content.content;
// #ifdef H5
if (this.$wechat.isWeixin()) {
this.setShareInfo();
}
// #endif
});
},
listenerActionSheet() {
this.shareInfoStatus = true
},
setShareInfoStatus() {
this.shareInfoStatus = false
},
setShareInfo: function() {
let href = location.href;
let configAppMessage = {
desc: this.articleInfo.synopsis,
title: this.articleInfo.title,
link: href,
imgUrl: this.articleInfo.image_input
};
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage);
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff !important;
}
page {
background-color: #fff !important;
}
.newsDetail .title {
padding: 0 30rpx;
font-size: 34rpx;
color: #282828;
font-weight: bold;
margin: 45rpx 0 23rpx 0;
line-height: 1.5;
}
.newsDetail .title {
padding: 0 30rpx;
font-size: 34rpx;
color: #282828;
font-weight: bold;
margin: 45rpx 0 23rpx 0;
line-height: 1.5;
}
.newsDetail .list {
margin: 0 30rpx;
padding-bottom: 25rpx;
}
.newsDetail .list {
margin: 0 30rpx;
padding-bottom: 25rpx;
}
.newsDetail .list .label {
font-size: 30rpx;
color: #B1B2B3;
}
.newsDetail .list .label {
font-size: 30rpx;
color: #B1B2B3;
}
.newsDetail .list .item {
margin-left: 27rpx;
font-size: 30rpx;
color: #B1B2B3;
}
.newsDetail .list .item {
margin-left: 27rpx;
font-size: 30rpx;
color: #B1B2B3;
}
.newsDetail .list .item .iconfont {
font-size: 28rpx;
margin-right: 10rpx;
}
.newsDetail .list .item .iconfont {
font-size: 28rpx;
margin-right: 10rpx;
}
.newsDetail .list .item .iconfont.icon-shenhezhong {
font-size: 26rpx;
}
.newsDetail .list .item .iconfont.icon-shenhezhong {
font-size: 26rpx;
}
.newsDetail .conters {
padding: 0 30rpx;
font-size: 32rpx;
line-height: 1.7;
.newsDetail .conters {
padding: 0 30rpx;
font-size: 32rpx;
line-height: 1.7;
/deep/ img {
max-width: 100%;
}
}
/deep/ img {
max-width: 100%;
}
}
.newsDetail .picTxt {
width: 690rpx;
height: 200rpx;
border-radius: 20rpx;
border: 1px solid #e1e1e1;
position: relative;
margin: 30rpx auto 0 auto;
}
.newsDetail .picTxt {
width: 690rpx;
height: 200rpx;
border-radius: 20rpx;
border: 1px solid #e1e1e1;
position: relative;
margin: 30rpx auto 0 auto;
}
.newsDetail .picTxt .pictrue {
width: 200rpx;
height: 200rpx;
}
.newsDetail .picTxt .pictrue {
width: 200rpx;
height: 200rpx;
}
.newsDetail .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 20rpx 0 0 20rpx;
display: block;
}
.newsDetail .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 20rpx 0 0 20rpx;
display: block;
}
.newsDetail .picTxt .text {
width: 460rpx;
}
.newsDetail .picTxt .text {
width: 460rpx;
}
.newsDetail .picTxt .text .name {
font-size: 30rpx;
color: #282828;
}
.newsDetail .picTxt .text .name {
font-size: 30rpx;
color: #282828;
}
.newsDetail .picTxt .text .money {
font-size: 24rpx;
margin-top: 40rpx;
font-weight: bold;
}
.newsDetail .picTxt .text .money {
font-size: 24rpx;
margin-top: 40rpx;
font-weight: bold;
}
.newsDetail .picTxt .text .money .num {
font-size: 36rpx;
}
.newsDetail .picTxt .text .money .num {
font-size: 36rpx;
}
.newsDetail .picTxt .text .y_money {
font-size: 26rpx;
color: #999;
text-decoration: line-through;
}
.newsDetail .picTxt .text .y_money {
font-size: 26rpx;
color: #999;
text-decoration: line-through;
}
.newsDetail .picTxt .label {
position: absolute;
background-color: #303131;
width: 160rpx;
height: 50rpx;
right: -7rpx;
border-radius: 25rpx 0 6rpx 25rpx;
text-align: center;
line-height: 50rpx;
bottom: 24rpx;
}
.newsDetail .picTxt .label {
position: absolute;
background-color: #303131;
width: 160rpx;
height: 50rpx;
right: -7rpx;
border-radius: 25rpx 0 6rpx 25rpx;
text-align: center;
line-height: 50rpx;
bottom: 24rpx;
}
.newsDetail .picTxt .label .span {
background-image: linear-gradient(to right, #fff71e 0%, #f9b513 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.newsDetail .picTxt .label .span {
background-image: linear-gradient(to right, #fff71e 0%, #f9b513 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.newsDetail .picTxt .label:after {
content: " ";
position: absolute;
width: 0;
height: 0;
border-bottom: 8rpx solid #303131;
border-right: 8rpx solid transparent;
top: -7rpx;
right: 0;
}
.newsDetail .picTxt .label:after {
content: " ";
position: absolute;
width: 0;
height: 0;
border-bottom: 8rpx solid #303131;
border-right: 8rpx solid transparent;
top: -7rpx;
right: 0;
}
.newsDetail .bnt {
color: #fff;
font-size: 30rpx;
width: 690rpx;
height: 90rpx;
border-radius: 45rpx;
margin: 48rpx auto;
text-align: center;
line-height: 90rpx;
}
.newsDetail .bnt {
color: #fff;
font-size: 30rpx;
width: 690rpx;
height: 90rpx;
border-radius: 45rpx;
margin: 48rpx auto;
text-align: center;
line-height: 90rpx;
}
</style>

View File

@ -1,339 +1,352 @@
<template>
<view>
<view class='newsList'>
<view class='swiper' v-if="imgUrls.length > 0">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" indicator-color="rgba(102,102,102,0.3)" indicator-active-color="#666">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<navigator :url="'/pages/news_details/index?id='+item.id">
<image :src="item.image_input[0]" class="slide-image" />
</navigator>
</swiper-item>
</block>
</swiper>
</view>
<view class='nav' v-if="navList.length > 0">
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
style="width:auto;overflow:hidden;">
<block v-for="(item,index) in navList" :key="index">
<view class='item' style="text-align: center;" :class='active==item.article_category_id?"on":""'
@click='tabSelect(item.article_category_id)'>
<view>{{item.title}}</view>
<view class='line bg-color' v-if="active==item.article_category_id"></view>
</view>
</block>
</scroll-view>
</view>
<view class='list'>
<block v-for="(item,index) in articleList" :key="index">
<navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none'
class='item acea-row row-between-wrapper'>
<view class='text acea-row row-column-between'>
<view class='name line2'>{{item.title}}</view>
<view>{{item.create_time}}</view>
</view>
<view class='pictrue'>
<image :src='item.image_input'></image>
</view>
</navigator>
</block>
</view>
</view>
<view class='empty-box acea-row row-middle' v-if="articleList.length == 0 && (page != 1 || active== 0)">
<view class='pictrue'>
<image src='../../static/images/empty-box.png'></image>
<view class="txt">暂无新闻信息~</view>
</view>
</view>
<!-- <home></home> -->
</view>
<view>
<view class='newsList'>
<view class='swiper' v-if="imgUrls.length > 0">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" indicator-color="rgba(102,102,102,0.3)" indicator-active-color="#666">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<navigator :url="'/pages/news_details/index?id='+item.id">
<image :src="item.image_input[0]" class="slide-image" />
</navigator>
</swiper-item>
</block>
</swiper>
</view>
<view class='nav' v-if="navList.length > 0">
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
style="width:auto;overflow:hidden;">
<block v-for="(item,index) in navList" :key="index">
<view class='item' style="text-align: center;" :class='active==item.article_category_id?"on":""'
@click='tabSelect(item.article_category_id)'>
<view>{{item.title}}</view>
<view class='line bg-color' v-if="active==item.article_category_id"></view>
</view>
</block>
</scroll-view>
</view>
<view class='list'>
<block v-for="(item,index) in articleList" :key="index">
<navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none'
class='item acea-row row-between-wrapper'>
<view class='text acea-row row-column-between'>
<view class='name line2'>{{item.title}}</view>
<view>{{item.create_time}}</view>
</view>
<view class='pictrue'>
<image :src='item.image_input'></image>
</view>
</navigator>
</block>
</view>
</view>
<view class='empty-box acea-row row-middle' v-if="articleList.length == 0 && (page != 1 || active== 0)">
<view class='pictrue'>
<image src='../../static/images/empty-box.png'></image>
<view class="txt">暂无新闻信息~</view>
</view>
</view>
<!-- <home></home> -->
</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 {
getArticleCategoryList,
getArticleList,
getArticleHotList,
getArticleBannerList
} from '@/api/api.js';
import home from '@/components/home';
export default {
components: {
home
},
data() {
return {
imgUrls: [],
articleList: [],
indicatorDots: false,
circular: true,
autoplay: true,
interval: 3000,
duration: 500,
navList: [],
active: 0,
page: 1,
limit: 8,
status: false,
scrollLeft: 0
};
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {},
/**
* 生命周期函数--监听页面显示
*/
onLoad: function() {
this.getArticleCate();
this.status = false;
this.page = 1;
this.articleList = [];
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
this.getCidArticle();
},
methods: {
getArticleHot: function() {
let that = this;
getArticleHotList().then(res => {
that.$set(that, 'articleList', res.data);
});
},
getArticleBanner: function() {
let that = this;
getArticleBannerList().then(res => {
that.imgUrls = res.data;
});
},
getCidArticle: function() {
let that = this;
if (that.active == 0) return;
let limit = that.limit;
let page = that.page;
let articleList = that.articleList;
if (that.status) return;
getArticleList(that.active, {
page: page,
limit: limit
}).then(res => {
let articleListNew = [];
let len = res.length;
articleListNew = articleList.concat(res.data.list);
that.page++;
that.$set(that, 'articleList', articleListNew);
that.status = limit > len;
that.page = that.page;
});
},
getArticleCate: function() {
let that = this;
getArticleCategoryList().then(res => {
this.active = res.data[0].article_category_id
that.$set(that, 'navList', res.data);
this.getCidArticle();
});
},
tabSelect(active) {
this.active = active;
if (this.active == 0) this.getArticleHot();
else {
this.$set(this, 'articleList', []);
this.page = 1;
this.status = false;
this.getCidArticle();
}
}
}
}
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
getArticleCategoryLists,
getArticleCategoryList,
getArticleList,
getArticleHotList,
getArticleBannerList
} from '@/api/api.js';
import home from '@/components/home';
export default {
components: {
home
},
data() {
return {
imgUrls: [],
articleList: [],
indicatorDots: false,
circular: true,
autoplay: true,
interval: 3000,
duration: 500,
navList: [],
active: 0,
page: 1,
limit: 8,
status: false,
scrollLeft: 0,
type: 0
};
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {},
/**
* 生命周期函数--监听页面显示
*/
onLoad: function(e) {
this.type = e.type
this.getArticleCate();
this.status = false;
this.page = 1;
this.articleList = [];
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
this.getCidArticle();
},
methods: {
getArticleHot: function() {
let that = this;
getArticleHotList().then(res => {
that.$set(that, 'articleList', res.data);
});
},
getArticleBanner: function() {
let that = this;
getArticleBannerList().then(res => {
that.imgUrls = res.data;
});
},
getCidArticle: function() {
let that = this;
if (that.active == 0) return;
let limit = that.limit;
let page = that.page;
let articleList = that.articleList;
if (that.status) return;
getArticleList(that.active, {
page: page,
limit: limit
}).then(res => {
let articleListNew = [];
let len = res.length;
articleListNew = articleList.concat(res.data.list);
that.page++;
that.$set(that, 'articleList', articleListNew);
that.status = limit > len;
that.page = that.page;
});
},
getArticleCate: function() {
let that = this;
if (this.type == 1) {
getArticleCategoryLists().then(res => {
this.active = res.data[0].article_category_id
that.$set(that, 'navList', res.data);
this.getCidArticle();
});
} else {
getArticleCategoryList().then(res => {
this.active = res.data[0].article_category_id
that.$set(that, 'navList', res.data);
this.getCidArticle();
});
}
},
tabSelect(active) {
this.active = active;
if (this.active == 0) this.getArticleHot();
else {
this.$set(this, 'articleList', []);
this.page = 1;
this.status = false;
this.getCidArticle();
}
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #fff !important;
}
page {
background-color: #fff !important;
}
.newsList .swiper {
width: 100%;
position: relative;
box-sizing: border-box;
padding: 0 30rpx;
}
.newsList .swiper {
width: 100%;
position: relative;
box-sizing: border-box;
padding: 0 30rpx;
}
.newsList .swiper swiper {
width: 100%;
height: 365rpx;
position: relative;
}
.newsList .swiper swiper {
width: 100%;
height: 365rpx;
position: relative;
}
.newsList .swiper .slide-image {
width: 100%;
height: 335rpx;
border-radius: 6rpx;
}
.newsList .swiper .slide-image {
width: 100%;
height: 335rpx;
border-radius: 6rpx;
}
// #ifdef MP-WEIXIN
.newsList .swiper .wx-swiper-dot {
width: 12rpx !important;
height: 12rpx !important;
border-radius: 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
// #ifdef MP-WEIXIN
.newsList .swiper .wx-swiper-dot {
width: 12rpx !important;
height: 12rpx !important;
border-radius: 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
.newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
margin-left: 5rpx;
}
.newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
margin-left: 5rpx;
}
.newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
margin-bottom: -15rpx;
}
.newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
margin-bottom: -15rpx;
}
// #endif
// #ifdef APP-PLUS || H5
.newsList .swiper .uni-swiper-dot {
width: 12rpx !important;
height: 12rpx !important;
border-radius: 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
// #endif
// #ifdef APP-PLUS || H5
.newsList .swiper .uni-swiper-dot {
width: 12rpx !important;
height: 12rpx !important;
border-radius: 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
.newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
margin-left: 5rpx;
}
.newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
margin-left: 5rpx;
}
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
margin-bottom: -15rpx;
}
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
margin-bottom: -15rpx;
}
// #endif
.newsList .nav {
padding: 0 30rpx;
width: 100%;
white-space: nowrap;
box-sizing: border-box;
margin-top: 43rpx;
}
// #endif
.newsList .nav {
padding: 0 30rpx;
width: 100%;
white-space: nowrap;
box-sizing: border-box;
margin-top: 43rpx;
}
.newsList .nav .item {
display: inline-block;
font-size: 32rpx;
color: #999;
min-width: 130rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: relative;
padding-bottom: 20rpx;
}
.newsList .nav .item {
display: inline-block;
font-size: 32rpx;
color: #999;
min-width: 130rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: relative;
padding-bottom: 20rpx;
}
.newsList .nav .item.on {
color: #282828;
}
.newsList .nav .item.on {
color: #282828;
}
.newsList .nav .item~.item {
margin-left: 46rpx;
}
.newsList .nav .item~.item {
margin-left: 46rpx;
}
.newsList .nav .item .line {
width: 24rpx;
height: 4rpx;
border-radius: 2rpx;
margin: 10rpx auto 0 auto;
position: absolute;
bottom: 5rpx;
left: 50%;
margin-left: -12rpx;
}
.newsList .nav .item .line {
width: 24rpx;
height: 4rpx;
border-radius: 2rpx;
margin: 10rpx auto 0 auto;
position: absolute;
bottom: 5rpx;
left: 50%;
margin-left: -12rpx;
}
.newsList .list .item {
margin: 0 30rpx;
border-bottom: 1px solid #f0f0f0;
padding: 35rpx 0;
}
.newsList .list .item {
margin: 0 30rpx;
border-bottom: 1px solid #f0f0f0;
padding: 35rpx 0;
}
.newsList .list .item .pictrue {
width: 250rpx;
height: 156rpx;
}
.newsList .list .item .pictrue {
width: 250rpx;
height: 156rpx;
}
.newsList .list .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.newsList .list .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.newsList .list .item .text {
width: 420rpx;
height: 156rpx;
font-size: 24rpx;
color: #999;
}
.newsList .list .item .text {
width: 420rpx;
height: 156rpx;
font-size: 24rpx;
color: #999;
}
.newsList .list .item .text .name {
font-size: 30rpx;
color: #282828;
}
.newsList .list .item .text .name {
font-size: 30rpx;
color: #282828;
}
.newsList .list .item .picList .pictrue {
width: 335rpx;
height: 210rpx;
margin-top: 30rpx;
}
.newsList .list .item .picList .pictrue {
width: 335rpx;
height: 210rpx;
margin-top: 30rpx;
}
.newsList .list .item .picList.on .pictrue {
width: 217rpx;
height: 136rpx;
}
.newsList .list .item .picList.on .pictrue {
width: 217rpx;
height: 136rpx;
}
.newsList .list .item .picList .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.newsList .list .item .picList .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.newsList .list .item .time {
text-align: right;
font-size: 24rpx;
color: #999;
margin-top: 22rpx;
}
.newsList .list .item .time {
text-align: right;
font-size: 24rpx;
color: #999;
margin-top: 22rpx;
}
.noCommodity {
border: none;
}
.noCommodity {
border: none;
}
.empty-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 200rpx;
.empty-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 200rpx;
image {
width: 414rpx;
height: 240rpx;
}
image {
width: 414rpx;
height: 240rpx;
}
.txt {
font-size: 26rpx;
color: #999;
text-align: center;
}
}
.txt {
font-size: 26rpx;
color: #999;
text-align: center;
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
<view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view>
<view class="name">{{ store_item.mer_name }}</view>
</view>
<image class="high_img" :src="youZhiImg" mode="aspectFill"></image>
<image class="high_img" :src="youZhiImg" mode="aspectFit"></image>
</view>
<view class="mct_msg_detail flex_a_c">
<view class="product_score">{{ store_item.product_score }}</view>
@ -32,7 +32,7 @@
<scroll-view scroll-x="true" class="goods_info">
<view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item"
@click.stop="navTogoodsDetail(itemn.product_id)">
<image class="goods_info_img" :src="itemn.image" mode="aspectFill"></image>
<image class="goods_info_img" :src="itemn.image" mode="aspectFit"></image>
<view class="goods_info_name">{{itemn.store_name}}</view>
<view class="goods_info_price">{{itemn.price}}</view>
</view>

View File

@ -1,334 +1,358 @@
<template>
<view class="goods_list">
<view class="head_search flex_a_c">
<view class="search_content flex_a_c_j_sb">
<view class="flex_a_c">
<view class="iconfont icon-sousuo"></view>
<input type="text" v-model="params.keyword" placeholder="请搜索">
</view>
<button class="search_btn" @click="searchClick">搜索</button>
</view>
</view>
<block v-for="(item,i) in goodsList" :key="i">
<view class="list_item flex_a_c">
<image class="goods_img" :src="item.image" mode="aspectFill"></image>
<view class="r_box flex_a_c_j_sb">
<view class="message">
<view class="title">{{item.store_name}}</view>
<view class="flex_a_c">
<view class="">分类{{item.storeCategory.cate_name}}</view>
<view class="unit">单位{{item.unit_name}}</view>
</view>
<view class="bar_code">条形码{{ item.bar_code || "0" }}</view>
</view>
<view class="redact_box">
<view class="order_price">订货价{{item.price}}</view>
<button class="redact" @click="redactShow(item)">编辑</button>
</view>
</view>
</view>
</block>
<view class="goods_list">
<view class="head_search flex_a_c">
<view class="search_content flex_a_c_j_sb">
<view class="flex_a_c">
<view class="iconfont icon-sousuo"></view>
<input type="text" v-model="params.keyword" placeholder="请搜索">
</view>
<button class="search_btn" @click="searchClick">搜索</button>
</view>
</view>
<block v-for="(item,i) in goodsList" :key="i">
<view class="list_item flex_a_c">
<image class="goods_img" :src="item.image" mode="aspectFit"></image>
<view class="r_box flex_a_c_j_sb">
<view class="message">
<view class="goodstitle">{{item.store_name}}</view>
<view class="flex_a_c">
<view class="">分类{{item.storeCategory.cate_name}}</view>
<view class="unit">单位{{item.unit_name}}</view>
</view>
<view class="bar_code">条形码{{ item.bar_code || "" }}</view>
</view>
<view class="redact_box">
<view class="order_price">订货价{{item.price}}</view>
<button class="redact" @click="redactShow(item)">编辑</button>
</view>
</view>
</view>
</block>
<u-popup :show="popupShow" @close="popupShow = false" mode="center" :round="10" closeOnClickOverlay>
<view class="popup_cont" v-if="redactGoods.store_name">
<view class="title">{{redactGoods.store_name}}</view>
<view class="message flex_a_c_j_sb">
<view class="">分类{{redactGoods.storeCategory.cate_name}}</view>
<view class="">单位{{redactGoods.unit_name}}</view>
<view class="">订货价{{redactGoods.price}}</view>
</view>
<view class="bar_code flex_a_c_j_sb">
<view>条形码{{ redactGoods.bar_code || "0" }}</view>
<view>库存{{ redactGoods.stock }}</view>
</view>
<view class="sub_title">订货价</view>
<input class="input" type="text" placeholder="请输入价格" v-model="goodsPrive">
<view class="sub_title">库存量</view>
<input class="input" type="number" placeholder="请输入库存数量" v-model="goodsNum">
<view class="btns_box">
<view class="cancel" @click="popupClose">取消</view>
<view class="save" @click="submitCreatedGoods">保存</view>
</view>
</view>
</u-popup>
</view>
<u-popup :show="popupShow" @close="popupShow = false" mode="center" :round="10" closeOnClickOverlay>
<view class="popup_cont" v-if="redactGoods.store_name">
<view class="title">{{redactGoods.store_name}}</view>
<view class="message flex_a_c_j_sb">
<view class="">分类{{redactGoods.storeCategory.cate_name}}</view>
<view class="">单位{{redactGoods.unit_name}}</view>
<view class="">订货价{{redactGoods.price}}</view>
</view>
<view class="bar_code flex_a_c_j_sb">
<view>条形码{{ redactGoods.bar_code || "" }}</view>
<view>库存{{ redactGoods.stock }}</view>
</view>
<view class="sub_title">订货价</view>
<input class="input" type="text" placeholder="请输入价格" v-model="goodsPrive">
<!-- <view class="sub_title">库存量</view>
<input class="input" type="number" placeholder="请输入库存数量" v-model="goodsNum"> -->
<view class="btns_box">
<view class="cancel" @click="popupClose">取消</view>
<view class="save" @click="submitCreatedGoods">保存</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
getStorage,
removeStorage,
Toast,
Loading,
hideLoading,
Modal
} from '@/libs/uniApi.js';
import { productLstApi, productCreate, productUpdate, productDetail } from '@/api/product.js'
import { checkLogin } from '../../../libs/login';
export default {
data() {
return {
goodsPrive: '',
goodsNum: '',
goodsList: [],
redactGoods: {},
search: '',
popupShow: false,
merId: '',
product_id: '',
addGoodsSecoundData: {
is_good: 0, //
is_gift_bag: 0,
sort: '',
once_count: '', //
video_link: ''
},
disModel: false,
particulars: {},
mer_id: '',
status: 'loadmore',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '实在没有了',
params: {
page: 1,
limit: 10,
keyword: ''
},
// page: 1,
}
},
onLoad(e) {
this.mer_id = e.merid
this.getGoodsList()
this.initData();
import {
getStorage,
removeStorage,
Toast,
Loading,
hideLoading,
Modal
} from '@/libs/uniApi.js';
import {
productLstApi,
productCreate,
productUpdate,
productDetail
} from '@/api/product.js'
import {
checkLogin
} from '../../../libs/login';
export default {
data() {
return {
goodsPrive: '',
goodsNum: '',
goodsList: [],
redactGoods: {},
search: '',
popupShow: false,
merId: '',
product_id: '',
addGoodsSecoundData: {
is_good: 0, //
is_gift_bag: 0,
sort: '',
once_count: '', //
video_link: ''
},
disModel: false,
particulars: {},
mer_id: '',
status: 'loadmore',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '实在没有了',
params: {
page: 1,
limit: 10,
keyword: ''
},
// page: 1,
}
},
onLoad(e) {
this.mer_id = e.merid
this.getGoodsList()
this.initData();
// uni.setNavigationBarTitle({
// title: e.title
// })
},
onShow() {},
methods: {
async searchClick() {
const { data } = await productLstApi(this.mer_id, this.params)
this.goodsList = data.list
},
async getGoodsList() {
const { data } = await productLstApi(this.mer_id, this.params)
this.goodsList.push(...data.list)
if (data.length < 9) this.status = 'nomore';
},
redactShow(item) {
this.product_id = item.product_id
this.merId = item.mer_id
this.redactGoods = item
this.popupShow = true
productDetail(item.mer_id, item.product_id).then(res => {
this.particulars = res.data
})
// console.log('', item);
},
popupClose() {
this.goodsPrive = ''
this.goodsNum = ''
this.popupShow = false
},
//
async submitCreatedGoods() {
this.particulars.attrValue[0].stock = Number(this.goodsNum)
this.particulars.attrValue[0].price = this.goodsPrive
const res = await productUpdate(this.merId, this.product_id, this.particulars)
// Toast(message)
this.getGoodsList()
this.popupShow = false
this.goodsPrive = ''
this.goodsNum = ''
},
initData() {
let editGoodsDetils = {};
if (getStorage('goodsDis')) {
this.disModel = true;
}
if (this.product_id) {
editGoodsDetils = getStorage('editGoodsDetils');
Object.keys(this.addGoodsSecoundData).forEach(item => {
this.addGoodsSecoundData[item] = editGoodsDetils[item];
});
// uni.setNavigationBarTitle({
// title: e.title
// })
},
onShow() {},
methods: {
async searchClick() {
const {
data
} = await productLstApi(this.mer_id, this.params)
this.goodsList = data.list
},
async getGoodsList() {
const {
data
} = await productLstApi(this.mer_id, this.params)
this.goodsList.push(...data.list)
if (data.length < 9) this.status = 'nomore';
},
redactShow(item) {
this.product_id = item.product_id
this.merId = item.mer_id
this.redactGoods = item
this.popupShow = true
productDetail(item.mer_id, item.product_id).then(res => {
this.particulars = res.data
})
// console.log('', item);
},
popupClose() {
this.goodsPrive = ''
this.goodsNum = ''
this.popupShow = false
},
//
async submitCreatedGoods() {
this.particulars.attrValue[0].stock = Number(this.goodsNum)
this.particulars.attrValue[0].price = this.goodsPrive
const res = await productUpdate(this.merId, this.product_id, this.particulars)
// Toast(message)
this.getGoodsList()
this.goodsList = []
this.popupShow = false
this.goodsPrive = ''
this.goodsNum = ''
},
initData() {
let editGoodsDetils = {};
if (getStorage('goodsDis')) {
this.disModel = true;
}
if (this.product_id) {
editGoodsDetils = getStorage('editGoodsDetils');
Object.keys(this.addGoodsSecoundData).forEach(item => {
this.addGoodsSecoundData[item] = editGoodsDetils[item];
});
if (editGoodsDetils.content) {
setStorage('goodsDis', {
store_name: editGoodsDetils.content.title,
imageList: editGoodsDetils.content.image
});
this.disModel = true;
}
setStorage('canChangeSecound', true);
return;
}
if (editGoodsDetils.content) {
setStorage('goodsDis', {
store_name: editGoodsDetils.content.title,
imageList: editGoodsDetils.content.image
});
this.disModel = true;
}
setStorage('canChangeSecound', true);
return;
}
if (getStorage('addGoodsSecoundData')) {
Object.keys(this.addGoodsSecoundData).forEach(item => {
if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] == 0) {
this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item];
}
});
}
},
},
//
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.params.page = ++this.params.page;
this.getGoodsList()
},
onPullDownRefresh() {
this.params.page = 1
this.goodsList = []
this.getGoodsList()
uni.stopPullDownRefresh()
}
}
if (getStorage('addGoodsSecoundData')) {
Object.keys(this.addGoodsSecoundData).forEach(item => {
if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] ==
0) {
this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item];
}
});
}
},
},
//
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.params.page = ++this.params.page;
this.getGoodsList()
},
onPullDownRefresh() {
this.params.page = 1
this.goodsList = []
this.getGoodsList()
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss" scoped>
.goods_list {}
.goods_list {}
.head_search {
width: 100%;
background-color: #fff;
height: 108.77rpx;
.head_search {
width: 100%;
background-color: #fff;
height: 108.77rpx;
.search_content {
margin: 0 auto;
width: 694.74rpx;
height: 66.67rpx;
padding: 2px 2px 2px 21.05rpx;
border: 1px solid $uni-theme-color;
border-radius: 100px;
.search_content {
margin: 0 auto;
width: 694.74rpx;
height: 66.67rpx;
padding: 2px 2px 2px 21.05rpx;
border: 1px solid $uni-theme-color;
border-radius: 100px;
.icon-sousuo {
font-weight: bold;
color: $uni-theme-color;
margin-right: 17.54rpx;
}
.icon-sousuo {
font-weight: bold;
color: $uni-theme-color;
margin-right: 17.54rpx;
}
.search_btn {
color: #fff;
width: 135.09rpx;
height: 59.65rpx;
line-height: 59.65rpx;
background: $uni-theme-bg-color;
border-radius: 100px;
}
}
}
.search_btn {
color: #fff;
width: 135.09rpx;
height: 59.65rpx;
line-height: 59.65rpx;
background: $uni-theme-bg-color;
border-radius: 100px;
font-size: 25rpx;
}
}
}
.list_item,
.popup_cont {
margin: 0 auto;
width: 694.74rpx;
// height: 236.84rpx;
background: #FFFFFF;
border-radius: 8px;
padding: 21.05rpx;
margin-top: 21.05rpx;
.list_item,
.popup_cont {
margin: 0 auto;
width: 694.74rpx;
// height: 236.84rpx;
background: #FFFFFF;
border-radius: 8px;
padding: 21.05rpx;
margin-top: 21.05rpx;
.title {
font-size: 31.58rpx;
font-weight: bold;
color: #333;
}
}
.title {
.list_item {
font-size: 24.56rpx;
font-weight: bold;
color: #333;
}
}
.redact_box {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
.list_item {
font-size: 24.56rpx;
}
.redact_box {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
.redact {
margin-top: 7.02rpx;
color: #fff;
width: 129.82rpx;
height: 50.88rpx;
line-height: 50.88rpx;
background: $uni-theme-bg-color;
border-radius: 7px;
}
}
.r_box {
flex: 1;
}
.redact {
margin-top: 7.02rpx;
color: #fff;
width: 129.82rpx;
height: 50.88rpx;
line-height: 50.88rpx;
background: $uni-theme-bg-color;
border-radius: 7px;
font-size: 25rpx
}
.unit {
margin-left: 35.09rpx;
margin: 7.02rpx 0 7.02rpx 35.09rpx;
}
.r_box {
flex: 1;
}
.goods_img {
width: 119.3rpx;
height: 119.3rpx;
border-radius: 8px;
margin-right: 26.32rpx;
}
}
.unit {
margin-left: 35.09rpx;
margin: 7.02rpx 0 7.02rpx 35.09rpx;
}
.popup_cont {
width: 680.7rpx;
padding: 31.58rpx;
font-size: 28.07rpx;
.goods_img {
width: 119.3rpx;
height: 119.3rpx;
border-radius: 8px;
margin-right: 26.32rpx;
}
}
.message {
margin: 28.07rpx 0 21.05rpx 0;
}
.goodstitle {
width: 42vw;
font-weight: bold;
white-space: nowrap;
/* 不换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
.title {
text-align: center;
font-size: 31.58rpx;
font-weight: bold;
}
}
.sub_title {
font-size: 28.07rpx;
margin: 35.09rpx 0 14.04rpx 0;
}
.popup_cont {
width: 680.7rpx;
padding: 31.58rpx;
font-size: 28.07rpx;
.input {
width: 100%;
height: 84.21rpx;
background-color: #F5F5F5;
border-radius: 4px;
padding-left: 4px;
}
.message {
margin: 28.07rpx 0 21.05rpx 0;
.btns_box {
margin-top: 49.12rpx;
display: flex;
justify-content: end;
align-items: center;
.cancel {
font-size: 31.58rpx;
}
}
.save {
color: #FFFFFF;
text-align: center;
line-height: 77.19rpx;
margin-left: 57.89rpx;
width: 250.88rpx;
height: 77.19rpx;
background: #009E56;
border-radius: 100px;
}
}
}
.sub_title {
font-size: 28.07rpx;
margin: 35.09rpx 0 14.04rpx 0;
}
.input {
width: 100%;
height: 84.21rpx;
background-color: #F5F5F5;
border-radius: 4px;
padding-left: 4px;
}
.btns_box {
margin-top: 49.12rpx;
display: flex;
justify-content: end;
align-items: center;
.cancel {
font-size: 31.58rpx;
}
.save {
color: #FFFFFF;
text-align: center;
line-height: 77.19rpx;
margin-left: 57.89rpx;
width: 250.88rpx;
height: 77.19rpx;
background: #009E56;
border-radius: 100px;
}
}
}
</style>

View File

@ -20,7 +20,7 @@
<block v-for="(item,index) in list" :key="index">
<view class="item_list flex">
<view>
<image class="goods_image" :src="item.image" mode="aspectFill"></image>
<image class="goods_image" :src="item.image" mode="aspectFit"></image>
</view>
<view class="left_goods_msg">
<view class="name">{{ item.store_name }}</view>
@ -41,6 +41,35 @@
<navigator class="bottom_purchase" url="./shopping_trolley" open-type="navigate">采购清单</navigator>
<goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup>
<u-popup :show="show" @close="close">
<view>
<h3 style=" margin: 15px 5px 5px 24px;">颜色规格</h3>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y">
<view class="scroll-view-item" v-for="(item,index) in attrValue" :key="index">
<view class="scroll_item_top">
<image :src="Image" mode=""></image>
<view class="text">
<view>{{item.sku}}</view>
<view>库存: <text>{{item.stock}}</text> </view>
</view>
</view>
<view class="scroll_item_bon">
<view class="reduce" @click.stop='subCart(item,index)'>-</view>
<input type="text" disabled="true" v-model="goods[index].cart_num" />
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(item,index)'>+</view>
<!-- <u-number-box
button-size="36"
color="#ffffff"
bgColor="#2979ff"
iconStyle="color: #fff"
v-model="number.cart_num"
></u-number-box> -->
</view>
</view>
</scroll-view>
<button class="btn" @click="addshopcart">确定</button>
</view>
</u-popup>
</view>
</template>
@ -52,6 +81,9 @@
} from '@/api/store.js'
import { Toast } from '@/libs/uniApi'
import goodsPopup from '../cpns/goodsPopup.vue'
import {
changeCartNum
} from '@/api/order.js';
export default {
components: {
goodsPopup
@ -88,7 +120,16 @@
},
id: '',
order: true,
num: ''
num: '',
show: false,
scrollTop: 0,
attrValue: [],
Image: '',
goods: [{
cart_num: 0
}],
goodsLite: {},
goodsindexL: ''
}
},
onLoad(e) {
@ -176,23 +217,27 @@
* 获取产品详情
*/
getGoodsDetails(item) {
// console.log('e,item',e,item);
// let that = this;
// const count = e.value
// getProductDetail(item.product_id).then(res => {
// const unique = Object.values(res.data.sku)[0].unique
// console.log(res.data.product_id, count, unique,'123123');
// that.goCat(res.data.product_id, count, unique)
// })
let that = this;
const count = '1'
// console.log(111);
getProductDetail(item.product_id, { product_type: 98 }).then(res => {
const unique = Object.values(res.data.sku)[0].unique
that.goCat(res.data.product_id, count, unique)
}).catch(err => {
Toast(err)
})
console.log(item);
if (item.product.attrValue.length == 1) {
let that = this;
const count = '1'
getProductDetail(item.product_id, { product_type: 98 }).then(res => {
const unique = Object.values(res.data.sku)[0].unique
that.goCat(res.data.product_id, count, unique)
}).catch(err => {
Toast(err)
})
} else {
this.show = true
this.attrValue = item.product.attrValue
this.Image = item.image
for (let i = 1; i < item.product.attrValue.length; i++) {
this.goods.push({
cart_num: 0
})
}
}
},
/*
* 加入购物车
@ -220,7 +265,96 @@
});
});
},
close() {
this.show = false
},
//
addCart(item, index) {
let that = this
that.goods[index].cart_num = that.goods[index].cart_num + 1
that.goods.numAdd = true
that.goodsLite = item
that.goodsindexL = index
let q = {
is_new: 0,
product_id: that.goodsLite.product_id,
cart_num: that.goods[that.goodsindexL].cart_num,
product_attr_unique: that.goodsLite.unique,
// source: this.source,
product_type: 98,
spread_id: ''
};
postCartAdd(q).then(res => {
that.$util.Tips({
title: "添加购物车成功",
});
})
.catch(res => {
this.show = false
return that.$util.Tips({
title: res
});
});
},
subCart(item, index) {
let that = this
if (that.goods[index].cart_num == 0) {
return
} else {
that.goods[index].cart_num = that.goods[index].cart_num - 1
that.goods.numAdd = true
that.goodsLite = item
that.goodsindexL = index
let q = {
is_new: 0,
product_id: that.goodsLite.product_id,
cart_num: that.goods[that.goodsindexL].cart_num,
product_attr_unique: that.goodsLite.unique,
// source: this.source,
product_type: 98,
spread_id: ''
};
postCartAdd(q).then(res => {
that.$util.Tips({
title: "添加购物车成功",
});
})
.catch(res => {
this.show = false
return that.$util.Tips({
title: res
});
});
}
},
addshopcart() {
console.log(this.goodsLite);
console.log(this.goodsindexL);
this.show = false
// let that = this
// let q = {
// is_new: 0,
// product_id: that.goodsLite.product_id,
// cart_num: that.goods[that.goodsindexL].cart_num,
// product_attr_unique: that.goodsLite.unique,
// // source: this.source,
// product_type: 98,
// spread_id: ''
// };
// postCartAdd(q).then(res => {
// this.show = false
// that.$util.Tips({
// title: "",
// });
// })
// .catch(res => {
// this.show = false
// return that.$util.Tips({
// title: res
// });
// });
}
},
onReachBottom() {
//nomore
@ -395,4 +529,91 @@
background-color: $uni-theme-color;
color: #fff;
}
.scroll-Y {
height: 50vh;
width: 90%;
margin: auto;
}
.scroll-view-item {
font-size: 36rpx;
border-bottom: 1px solid #ccc;
.scroll_item_top {
height: 60px;
display: flex;
justify-content: flex-start;
align-items: center;
image {
width: 50px;
height: 50px;
margin: 5px;
}
.text {
width: 200px;
height: 60px;
float: left;
view {
height: 30px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text {
color: #F84221;
}
}
}
}
.scroll_item_bon {
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
align-items: center;
.reduce {
width: 30px;
height: 30px;
text-align: center;
color: #BDC4CE;
background: #EEEEEE;
}
input {
width: 50px;
height: 30px;
text-align: center;
}
.plus {
width: 30px;
text-align: center;
height: 30px;
color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
}
.on {
background-color: #e3e3e3;
color: #dedede;
}
}
}
.btn {
width: 100%;
height: 50px;
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
border-radius: 24px 24px 24px 24px;
line-height: 50px;
color: white;
}
</style>

View File

@ -242,6 +242,7 @@
currSku: '',
newData: {},
activeRouter: '',
type_id:''
};
},
computed: configMap({ hide_mer_status: 1, recommend_switch: 0, navigation: {} }, mapGetters(['isLogin',
@ -348,7 +349,7 @@
this.cartList.valid.forEach(el => {
el.list.forEach(goods => {
if (goods.check) {
type_id.push(goods.spu.spu_id)
type_id.push(goods.product_id)
}
})
})
@ -357,6 +358,8 @@
title: '请选择产品'
});
} else {
collectAll({
type_id: type_id,
type: 1
@ -568,7 +571,7 @@
})
if (selectValue.length > 0) {
uni.navigateTo({
url: '/pages/users/order_confirm/index?product_type=98&cartId=' + selectValue.join(',')
url: `/pages/users/order_confirm/index?product_type=98&cartId=${selectValue.join(',')}&type_id=12`
});
} else {
return this.$util.Tips({
@ -578,12 +581,13 @@
},
//
addCart: function(goods, index) {
console.log(goods.cart_id);
let that = this;
changeCartNum(goods.cart_id, {
cart_num: goods.cart_num + 1
}).then(res => {
goods.cart_num = Number(goods.cart_num) + 1
that.cartTotalCount = Number(that.cartTotalCount) + 1;
// that.cartTotalCount = Number(that.cartTotalCount) + 1;
if (goods.hasOwnProperty('productAttr') && goods.cart_num > goods.productAttr.stock) {
goods.cart_num = goods.productAttr.stock;
goods.numAdd = true;
@ -649,7 +653,7 @@
goods.numSub = true;
}
goods.cart_num = Number(goods.cart_num) - 1
this.cartTotalCount = Number(this.cartTotalCount) - 1;
// this.cartTotalCount = Number(this.cartTotalCount) - 1;
this.cartAllCheck('goodsCheck')
}).catch(error => {
this.$util.Tips({
@ -671,6 +675,7 @@
let that = this;
getCartList({ product_type: 98 }).then(res => {
// console.log("", res)
this.type_id=res.data.list[0].type_id
res.data.list.forEach((item, index) => {
item.allCheck = true
item.list.forEach((goods, j) => {

View File

@ -33,7 +33,7 @@
<view class="right_storee">
<scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true'
@scrolltolower="scrolltolower" class="my-scroll-view">
<image class="banner" :src="src" mode="aspectFill"></image>
<image class="banner" :src="src" mode="aspectFit"></image>
<view style="background-color: #fff;width: 100%;">
<view class="tabs_box flex_a_c_j_sb">
<view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''">

View File

@ -1,26 +1,112 @@
<template>
<view>
<view style="background-color: #F0F2F5;">
<!-- <view style="height: var(--status-bar-height);background-color: red;height: 10vh;">dsfdsfsdfds</view> -->
<view class='productList' :style="viewColor">
<view class='search acea-row row-between-wrapper' :class="'styleType'+store_street_theme">
<!--#ifdef H5-->
<view class="back" @click='backjJump()'>
<view class="iconfont icon-xiangzuo"></view>
<!-- 顶部 -->
<view class="top">
<view style="height: 10px;">
</view>
<!--#endif-->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='sotreParam.keyword' @confirm="searchSubmit"></input>
</view>
<view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
<view class="iconfont icon-dingwei"></view>
<view class="right-text" v-if="recommend_address">
{{recommend_address}}
<view class="head_tit">
<view class="" style="display: flex;align-items: center;">
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view>
</view>
<view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
供销综合云市场
</view>
</view>
<view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" @change="test" :showAction="false"
placeholder="请输入..." v-model="sotreParam.keyword" class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SS.png" width="115.65rpx" height="56.82rpx"></u--image>
</view>
<view class='iconfont search-right'
@click="goMap(`/pages/nongKe/supply_chain/maps?street_id=${street_id}`)">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx"
height="50.82rpx"></u--image>
</view>
<view class="iconfont icon-xiangyou" v-if="recommend_address"></view>
</view>
</view>
<view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view class="content">
<view style="background-color: red;height: 10px">
asdasd
</view>
<view class="hot_serch">
<text>热搜:</text> <text @click="hotSerchFn('小张副食')">小张副食</text> <text
@click="hotSerchFn('正新酒店')">正新酒店</text>
<text @click="hotSerchFn('麻辣鸡')">麻辣鸡</text>
<text @click="hotSerchFn('手撕椒麻鸡')">手撕椒麻鸡</text>
</view>
<view class="menu_cls">
<u-scroll-list indicatorActiveColor='#FF6D20'>
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
:key="index">
<!-- {{item.merchant_category_id}} -->
<u--image :showLoading="true" :src="imgList[index]" width="94.63rpx" height="99.63rpx"
style="margin-bottom: 20rpx;"></u--image>
<text
style="display: block;font-size: 26.29rpx; width: 15vw;">{{item.category_name}}</text>
</view>
</u-scroll-list>
</view>
<view class="goods_list">
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
:key="index">
<view class="left">
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
height="157.71rpx"></u--image>
</view>
<view class="right">
<view class="li head">
<text class="com_name">{{item.mer_name}}</text>
<text
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
</view>
<view class="li">
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
<text>月销{{item.sales}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text> {{item.service_phone}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text>{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text class="address">{{item.mer_address}}</text>
</view>
</view>
</view>
</view>
</view>
<!-- 热搜 -->
<!-- <view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
<view v-for="item in downMenus" :key="item.key" class='item'
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
@ -30,16 +116,14 @@
<view class="line" :class="{'font-line':firstKey == item.key}">
</view>
</view>
<view class="item" @click="bindRight">
<view>筛选
<!-- <text class="iconfont icon-shaixuan"></text> -->
</view>
<view class="line">
</view>
</view>
</view>
</view>
-->
<!-- 店铺 -->
<!--
<block>
<view class="store-wrapper">
<view class="store-item" v-for="(item,index) in storeList" :key="index">
@ -48,7 +132,7 @@
</view>
<view class="zhezhao">
</view>
<view class="zhezhao1" @click="goStore(item.mer_id)">
<view class="zhezhao1" @click="goStore(item.mer_id)">
<view class="title">
<view>{{item.mer_name}}
</view>
@ -175,9 +259,12 @@
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
-->
</view>
<view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak>
<view class='pictrue' style="margin: 0 auto;">
<view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
<image src='../../../static/images/noCart.png'></image>
<text>暂无店铺快去搜索其他店铺吧</text>
</view>
@ -188,14 +275,15 @@
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
</u-popup>
</view>
</view>
</template>
<script>
import {
storeMerchantList,
getGeocoder
getGeocoder,
supMenuApi
} from '@/api/store.js';
import recommend from './component/recommend';
import rightSlider from './component/rightSlider';
@ -222,6 +310,25 @@
},
data() {
return {
imgList: [
"/static/images/GXSC/BBY.png",
"/static/images/GXSC/NYSC.png",
"/static/images/GXSC/SHFW.png",
"/static/images/GXSC/SCFW.png",
"/static/images/GXSC/NFCP.png",
"/static/images/GXSC/WLSY.png",
"/static/images/GXSC/WYLY.png",
"/static/images/GXSC/MSGY.png",
"/static/images/GXSC/YLBJ.png",
"/static/images/GXSC/JYPX.png",
"/static/images/GXSC/JJRB.png",
"/static/images/GXSC/ZXJZ.png",
"/static/images/GXSC/NMJD.png",
"/static/images/GXSC/GXZH.png",
"/static/images/GXSC/DFTC.png",
"/static/images/GXSC/JDMS.png",
],
street_id: "",
price: 0,
stock: 0,
nows: false,
@ -238,6 +345,7 @@
brandList: [],
downKey: 0,
downStatus: false,
menuList: [],
//
downMenu: [{
title: '默认',
@ -288,16 +396,19 @@
storeTypeArr: [], //
merList: [], //
product_type: 0,
show:false,
image: '' //
show: false,
image: '', //,
credit_buy: '', //
};
},
onLoad(options) {
console.log(options);
// console.log(options);
this.street_id = options.street_id
this.product_type = options.product_type ?? 0
if (options.street_id != undefined) {
this.sotreParam.street_id = options.street_id
}
this.credit_buy = options.credit_buy
this.sotreParam.type_id = options.type_id
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
@ -308,6 +419,10 @@
this.storeMerchantList();
this.getClassfication();
this.getStoreType();
supMenuApi().then(res => {
this.menuList = res.data
})
},
computed: {
downMenus: function() {
@ -328,6 +443,28 @@
}, mapGetters(['viewColor'])),
},
methods: {
test() {
if (this.sotreParam.keyword.length > 3) {
this.sotreParam.keyword.slice(0, 3)
this.sotreParam.keyword = this.sotreParam.keyword.slice(0, 3) + "..."
console.log(this.sotreParam.keyword)
}
// console.log(this.sotreParam.keyword.length)
},
hotSerchFn(keywords) {
this.sotreParam.keyword = keywords
this.searchSubmit()
},
goMap(url) {
uni.navigateTo({
url
})
},
navGo(id) {
uni.navigateTo({
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&merchant_category_id=${id}&street_id=${this.street_id}`
})
},
go_details: function(product_type, product_id) {
if (product_type == 98) {
uni.navigateTo({
@ -496,7 +633,8 @@
order: this.sotreParam.order,
category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_id,
street_id: this.sotreParam.street_id
street_id: this.sotreParam.street_id,
credit_buy: this.credit_buy
}
if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude
@ -523,9 +661,9 @@
}
}
},
searchSubmit: function(e) {
searchSubmit: function() {
let that = this;
that.$set(that.sotreParam, 'keyword', e.detail.value);
that.$set(that.sotreParam, 'keyword', this.sotreParam.keyword);
this.set_where(this.firstKey)
},
//
@ -613,54 +751,127 @@
this.storeMerchantList()
}
}
}
</script>
<style lang="scss" scoped>
.productList .search {
width: 100%;
height: 86rpx;
padding: 0 20rpx;
box-sizing: border-box;
position: fixed;
left: 0;
top: 0;
z-index: 9;
* {
margin: 0;
padding: 0;
}
.com_name {
font-size: 33.29rpx;
// background-color: red;
// max-width: 45vw;
max-width: 40vw;
white-space: nowrap;
/* 防止文字换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 使用省略号表示溢出的内容 */
// width: 200px;
/* 可根据实际情况调整容器宽度 */
}
.head_tit {
display: flex;
flex-wrap: nowrap;
background-color: #fff;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0 20rpx;
}
&.styleType1 {
background-color: var(--view-theme);
.productList {
// padding-top: 50rpx;
// padding: 0 20rpx 0;
.top {
padding-top: var(--status-bar-height);
/* #ifdef H5 */
padding-top: 30rpx;
/* #endif */
// padding-top: 80rpx;
background-color: #F0F2F5;
position: fixed;
z-index: 999;
width: 100%;
// margin-top: 10px;
}
.search-right {
display: flex;
align-items: center;
justify-content: space-between;
max-width: max-content;
flex: 1;
padding-left: 20rpx;
.content {
padding: 20rpx;
}
.right-text {
.menu_cls {
background-color: white;
// height: 199.77rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
padding: 20rpx 20rpx 0 20rpx;
.menu_li {
margin-right: 50rpx;
// background-color: red;
width: 50vw;
// width: 120rpx;
// display: inline-block;
}
}
.goods_list {
margin-top: 20rpx;
.goods_card {
margin-top: 20rpx;
height: auto;
background-color: white;
padding: 20rpx;
border-radius: 20rpx;
display: flex;
// align-items: center;
.left {
margin-right: 20rpx;
width: 158rpx;
height: 158rpx;
border-radius: 20rpx;
overflow: hidden;
}
.right {
.head {
font-weight: bold;
// color: red;
}
.li {
display: flex;
font-size: 26.29rpx;
margin-bottom: 10rpx;
align-items: center;
text {
margin: 0 20rpx 0 5rpx;
}
}
}
}
}
.address {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
width: max-content;
color: #fff;
padding: 0 10rpx;
}
.icon-xiangyou,
.icon-dingwei {
font-size: 30rpx;
color: #fff;
width: 200px;
}
}
.search-right.styleType2 .right-text,
.search-right.styleType3 .right-text {
color: #282828;
@ -688,6 +899,27 @@
}
}
.hot_serch {
color: #B3B3B3;
display: flex;
justify-content: space-around;
margin-top: 40rpx;
flex-wrap: wrap;
// margin-top: 50rpx;
// padding-top: 100rpx;
padding-top: var(--status-bar-height);
// margin-top: 10px;
/* #ifdef H5 */
padding-top: 50rpx;
/* #endif */
// margin-top: 200rpx;
text {
margin: 10rpx;
}
}
.productList .search .input {
flex: 1;
height: 60rpx;
@ -731,7 +963,7 @@
z-index: 9;
position: fixed;
left: 0;
top: 0;
top: 25px;
width: 100%;
margin-top: 86rpx;
background-color: #fff;
@ -853,7 +1085,7 @@
}
.store-wrapper {
margin-top: 165rpx;
margin-top: 235rpx;
border-top: 1px solid #F6F6F6;
.store-item {
@ -1110,7 +1342,7 @@
.no-shop {
background-color: #fff;
padding-bottom: calc(100% - 176rpx);
// padding-bottom: calc(100% - 176rpx);
.pictrue {
display: flex;
@ -1124,12 +1356,21 @@
}
}
}
.guanbi {
width: 20px;
height: 20px;
margin: 30px auto;
}
.img_cls {
position: absolute;
top: 50%;
right: 7rpx;
transform: translateY(-50%);
}
.pop {
z-index: 1;
}

View File

@ -8,8 +8,9 @@
</view>
<view class='nav acea-row row-between-wrapper'>
<view>购物数量 <text class='num t-color'>{{cartTotalCount}}</text></view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper'
@click='manage'>{{ footerswitch ? '管理' : '取消'}}</view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"
class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
</view>
</view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0">
<view class='list'>
@ -20,31 +21,38 @@
<text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text>
</view>
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info">
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'"
class="info">
<text class="iconfont icon-shangjiadingdan"></text>
<view class="name">{{item.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text>
</navigator>
<view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
</view>
<navigator v-for="goods in item.list" :key="goods.cart_id" :url='"/pages/goods_details/index?id="+goods.product.product_id'
hover-class='none' class='picTxt acea-row'>
<navigator v-for="goods in item.list" :key="goods.cart_id"
:url='"/pages/goods_details/index?id="+goods.product.product_id' hover-class='none'
class='picTxt acea-row'>
<view class="checkbox" @click.stop="goodsCheck(goods,index)">
<text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text>
</view>
<view class='pictrue'>
<image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'></image>
<image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'>
</image>
<!-- <image v-else :src='item.productInfo.image'></image> -->
</view>
<view class='text'>
<view class='line1'>{{goods.product.store_name}}</view>
<view class='infor line1' v-if="goods.productAttr.sku" @click.stop='changeCart(goods,goods.cart_id)'>
<view class='infor line1' v-if="goods.productAttr.sku"
@click.stop='changeCart(goods,goods.cart_id)'>
{{goods.productAttr.sku}}
<text class="iconfont icon-xiala1"></text>
</view>
<view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0" class="buy_limit">
<text v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购,</text><text v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
<view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0"
class="buy_limit">
<text
v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购</text><text
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view>
<view class='money acea-row row-middle'>
<text>{{goods.productAttr.price}}</text>
@ -54,9 +62,11 @@
</view>
</view>
<view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>
-</view>
<view class='num'>{{goods.cart_num}}</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+
</view>
</view>
</navigator>
</view>
@ -64,15 +74,18 @@
</view>
<view class='invalidGoods' v-if="cartList.invalid.length > 0">
<view class='goodsNav acea-row row-between-wrapper'>
<view @click='goodsOpen'><text class='iconfont' :class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
<view @click='goodsOpen'><text class='iconfont'
:class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
<view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view>
</view>
<view class='goodsList' :hidden='goodsHidden'>
<block v-for="(item,index) in cartList.invalid" :key='index'>
<navigator :url="'/pages/goods_details/index?id='+item.product_id" class='item acea-row row-between-wrapper' hover-class='none'>
<navigator :url="'/pages/goods_details/index?id='+item.product_id"
class='item acea-row row-between-wrapper' hover-class='none'>
<view class='invalid'>失效</view>
<view class='pictrue'>
<image :src='(item.productAttr && item.productAttr.image) || item.product.image'></image>
<image :src='(item.productAttr && item.productAttr.image) || item.product.image'>
</image>
</view>
<view class='text acea-row row-column-between'>
@ -88,17 +101,20 @@
</view>
</view>
</view>
<view class='noCart' v-if="recommend" :style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }">
<view class='noCart' v-if="recommend"
:style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }">
<view class='pictrue'>
<image src='../../static/images/noCart.png'></image>
<view>暂无商品去添加点什么吧</view>
</view>
</view>
<recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend>
<view class='loadingicon acea-row row-center-wrapper' v-if="hostProduct.length>5 && recommend_switch == 1">
<view class='loadingicon acea-row row-center-wrapper'
v-if="hostProduct.length>5 && recommend_switch == 1">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
<view class='footer acea-row row-between-wrapper' :class="isFooter?'':'on'" v-if="cartList.valid.length > 0">
<view class='footer acea-row row-between-wrapper' :style="`bottom:${appInfo.bottom+40}px`"
:class="isFooter?'':'on'" v-if="cartList.valid.length > 0">
<view>
<view class="allcheckbox" @click.stop="checkboxAllChange">
<text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text>
@ -124,19 +140,16 @@
</view>
<!-- 优惠券弹窗 -->
<block v-if="coupon.coupon">
<couponListWindow
:coupon='coupon'
@ChangCouponsClone="ChangCouponsClone"
@ChangCouponsUseState="ChangCouponsUseState"
></couponListWindow>
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone"
@ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
</block>
<!-- 组件 -->
<addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow>
<addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow>
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<view class="foot" v-if="newData.status && newData.status.status">
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index"
@click="goRouter(item)">
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
<block v-if="item.link == activeRouter">
<image :src="item.imgList[0]"></image>
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
@ -183,14 +196,16 @@
} from "vuex";
import recommend from '@/components/recommend';
import authorize from '@/components/Authorize';
import { configMap } from '@/utils';
import {
configMap
} from '@/utils';
const app = getApp();
export default {
props: {
image: {
type: String,
default: '',
}
}
},
components: {
recommend,
@ -200,10 +215,11 @@
},
data() {
return {
appInfo: null,
loading: false, //
loadend: false, //
loadTitle: '加载更多', //
isFooter:false,
isFooter: false,
cartCount: 0,
goodsHidden: true,
footerswitch: true,
@ -226,7 +242,7 @@
list: [],
},
//
cartTotalCount:0,
cartTotalCount: 0,
recommend: false,
productValue: [], //
attr: {
@ -248,13 +264,18 @@
activeRouter: '',
};
},
computed: configMap({hide_mer_status: 1,recommend_switch:0,navigation: {}}, mapGetters(['isLogin','viewColor'])),
onReady(){},
computed: configMap({
hide_mer_status: 1,
recommend_switch: 0,
navigation: {}
}, mapGetters(['isLogin', 'viewColor'])),
onReady() {},
mounted: function() {},
onLoad: function(options) {
},
onShow: function() {
this.appInfo = this.$appInfo.safeAreaInsets
let that = this
let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].route
@ -270,12 +291,12 @@
this.selectValue = []; //
this.isShowAuth = false;
uni.setStorage({
key:'invoice_Data',
data:{},
success: function(){}
key: 'invoice_Data',
data: {},
success: function() {}
})
}else{
setTimeout(() =>{
} else {
setTimeout(() => {
this.isAuto = true;
this.isShowAuth = true
}, 300);
@ -284,10 +305,10 @@
methods: {
//
authColse: function(e) {
// console.log(e,'authColse')
console.log(e, 'authColse')
this.isShowAuth = e;
},
onLoadFun(){
onLoadFun() {
this.isShowAuth = false;
},
goRouter(item) {
@ -311,27 +332,27 @@
} else {
uni.showTabBar()
this.isFooter = false
}
}
},
//
subDel: function(event) {
let that = this
let type_id = []
this.cartList.valid.forEach(el=>{
el.list.forEach(goods=>{
if(goods.check){
this.cartList.valid.forEach(el => {
el.list.forEach(goods => {
if (goods.check) {
type_id.push(goods.cart_id)
}
})
})
if(type_id.length == 0){
if (type_id.length == 0) {
return that.$util.Tips({
title: '请选择产品'
});
}else{
} else {
cartDel({
cart_id:type_id,
}).then(res=>{
cart_id: type_id,
}).then(res => {
this.getCartList();
this.getCartNum();
return that.$util.Tips({
@ -349,22 +370,22 @@
subCollect: function(event) {
let that = this
let type_id = []
this.cartList.valid.forEach(el=>{
el.list.forEach(goods=>{
if(goods.check){
this.cartList.valid.forEach(el => {
el.list.forEach(goods => {
if (goods.check) {
type_id.push(goods.spu.spu_id)
}
})
})
if(type_id.length == 0){
if (type_id.length == 0) {
return that.$util.Tips({
title: '请选择产品'
});
}else{
} else {
collectAll({
type_id:type_id,
type:1
}).then(res=>{
type_id: type_id,
type: 1
}).then(res => {
return that.$util.Tips({
title: res.message,
icon: 'success'
@ -385,25 +406,25 @@
*/
changeCart: function(goods, id) {
let that = this;
if(that.goods == goods){
if (that.goods == goods) {
that.isOpen = that.attr.cartAttr = true;
return
}else{
} else {
that.goods = JSON.parse((JSON.stringify(goods)));
that.currSku = goods.productAttr.sku.split(",");
that.$set(that.attr, 'productAttr', goods.attr);
const sku = {}
that.attrValue = goods.productAttr.sku
that.attrImage = goods.product.image
goods.attrValue.forEach((itemn)=>{
sku[itemn.sku] = itemn;
goods.attrValue.forEach((itemn) => {
sku[itemn.sku] = itemn;
})
that.$set(that, 'productValue',sku);
let productSelect = sku[that.attrValue];
that.$set(that, 'productValue', sku);
let productSelect = sku[that.attrValue];
that.isOpen = that.attr.cartAttr = true;
//
that.DefaultSelect(goods)
}
}
},
/**
* 默认选中属性
@ -413,10 +434,10 @@
let productAttr = this.attr.productAttr;
let value = [];
let arr = []
// console.log(arr, 'arr')
if(this.currSku){
console.log(arr, 'arr')
if (this.currSku) {
value = this.currSku
}else{
} else {
for (var key in this.productValue) {
if (this.productValue[key].stock > 0) {
value = this.attr.productAttr.length ? key.split(",") : [];
@ -434,7 +455,8 @@
"store_name",
goods.product.store_name
);
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product.image);
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods
.product.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -495,7 +517,7 @@
}
this.goCart(productSelect);
},
goCart(productSelect){
goCart(productSelect) {
let that = this;
//,,
if (
@ -513,28 +535,30 @@
}
},
attrVal(val) {
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val.indexn]);
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
.indexn]);
},
/**
* 属性变动赋值
*
*/
ChangeAttr: function(res) {
let productSelect = this.productValue[res];
let productSelect = this.productValue[res];
this.currSku = res;
this.newVal = this.productValue[res];
if(productSelect)this.$set(this, "uniqueValue", productSelect.unique);
if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res);
}
else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
} else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
@ -545,9 +569,9 @@
//
subOrder: function(event) {
let selectValue = []
this.cartList.valid.forEach(el=>{
el.list.forEach(goods=>{
if(goods.check){
this.cartList.valid.forEach(el => {
el.list.forEach(goods => {
if (goods.check) {
selectValue.push(goods.cart_id)
}
})
@ -593,7 +617,8 @@
cart_num: that.goods.cart_num,
product_attr_unique: that.newVal.unique
}).then(res => {
if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods.productAttr.stock) {
if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods
.productAttr.stock) {
that.goods.cart_num = that.goods.productAttr.stock;
that.goods.numAdd = true;
that.goods.numSub = false;
@ -631,7 +656,7 @@
}).then(res => {
goods.numSub = false;
goods.numAdd = false;
if(goods.cart_num <= 1){
if (goods.cart_num <= 1) {
goods.numSub = true;
}
goods.cart_num = Number(goods.cart_num) - 1
@ -673,12 +698,12 @@
})
this.cartList.valid = res.data.list
this.cartList.invalid = res.data.fail
if(res.data.list.length == 0 && res.data.list.length == 0){
if (res.data.list.length == 0 && res.data.list.length == 0) {
this.recommend = true;
if(!this.hostProduct.length){
if (!this.hostProduct.length) {
this.getHostProduct();
}
}else{
} else {
this.recommend = false
}
const sku = {}
@ -732,7 +757,8 @@
// //
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num))
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr
.price, e.cart_num))
totalNum += e.cart_num
}
})
@ -778,12 +804,13 @@
},
//
unsetCart: function() {
let that = this,ids = [];
let that = this,
ids = [];
for (let i = 0, len = that.cartList.invalid.length; i < len; i++) {
ids.push(that.cartList.invalid[i].cart_id);
}
cartDel({
cart_id:ids
cart_id: ids
}).then(res => {
that.$util.Tips({
title: '清除成功'
@ -793,13 +820,13 @@
}).catch(res => {});
},
//
giveCoupon(item){
giveCoupon(item) {
let that = this;
let goodsArr = []
let couponList = [];
let activeList = [];
let ids = []
item.list.map(el=>{
item.list.map(el => {
ids.push(el.product_id)
})
uni.showLoading({
@ -807,15 +834,17 @@
mask: true
});
getCoupons({
ids:ids.join(',')
ids: ids.join(',')
}).then(res => {
goodsArr = res.data
getShopCoupons(item.mer_id).then(({data})=>{
getShopCoupons(item.mer_id).then(({
data
}) => {
uni.hideLoading();
couponList = goodsArr.concat(data)
this.$set(this.coupon, 'list', couponList);
this.$set(this.coupon, 'coupon', true);
}).catch(error=>{})
}).catch(error => {})
});
},
ChangCouponsClone: function() {
@ -824,7 +853,7 @@
ChangCouponsUseState(index) {
let that = this;
that.coupon.list[index].issue = true;
// console.log(that.coupon.list[index])
console.log(that.coupon.list[index])
},
},
onReachBottom() {
@ -852,19 +881,23 @@
z-index: 5;
top: 0;
}
.icon-xiala1{
.icon-xiala1 {
display: inline-block;
transform: rotate(180deg);
font-size: 14rpx;
padding: 0 5rpx;
}
.shoppingCart .labelNav .item .iconfont {
font-size: 25rpx;
margin-right: 10rpx;
}
.t-color {
color: var(--view-theme);
}
.shoppingCart {
/* #ifndef MP */
padding-bottom: 180rpx;
@ -872,13 +905,15 @@
/* #ifdef MP */
padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
/* #endif */
&.showFoot{
&.showFoot {
padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
}
}
.shoppingCart .nav {
width: 100%;
height: 80rpx;
@ -892,6 +927,7 @@
z-index: 5;
top: 76rpx;
}
.shoppingCart .nav .administrate {
font-size: 26rpx;
color: #282828;
@ -900,30 +936,37 @@
border-radius: 6rpx;
border: 1px solid #868686;
}
.shoppingCart .noCart {
margin-top: 20rpx;
margin-bottom: 20rpx;
background-color: #fff;
padding-top: 0.1rpx;
}
.shoppingCart .noCart .pictrue {
text-align: center;
margin: 78rpx auto 56rpx auto;
padding-bottom: 60rpx;
}
.shoppingCart .noCart .pictrue image {
width: 414rpx;
height: 305rpx;
}
.shoppingCart .noCart .pictrue view{
.shoppingCart .noCart .pictrue view {
color: #999;
}
.shoppingCart .list {
margin: 171rpx 0 20rpx;
}
.shoppingCart .list .item {
background-color: #fff;
margin-bottom: 15rpx;
.store-title {
display: flex;
align-items: center;
@ -931,35 +974,43 @@
padding: 0 30rpx;
height: 85rpx;
border-bottom: 1px solid #f0f0f0;
.checkbox {
width: 60rpx;
.iconfont {
font-size: 40rpx;
color: #CCCCCC;
}
.icon-xuanzhong1 {
color: var(--view-theme);
}
}
.info {
flex: 1;
display: flex;
align-items: center;
.iconfont {
font-size: 36rpx;
}
.name {
margin: 0 0 0 10rpx;
font-size: 28rpx;
color: #282828;
font-weight: bold;
}
.icon-xiangyou {
margin-top: 6rpx;
font-size: 22rpx;
color: #999;
}
}
.coupon-btn {
color: var(--view-theme);
font-size: 22rpx;
@ -971,53 +1022,64 @@
}
}
}
.vipImg {
width: 65rpx;
height: 28rpx;
margin-left: 10rpx;
image {
width: 100%;
height: 100%;
display: block;
}
}
.shoppingCart .list .item .picTxt {
width: 100%;
padding: 25rpx 30rpx;
position: relative;
align-items: center;
border-bottom: 1px solid #f0f0f0;
.checkbox {
width: 60rpx;
.iconfont {
font-size: 40rpx;
color: #CCCCCC;
}
.icon-xuanzhong1 {
color: var(--view-theme);
}
}
}
.shoppingCart .list .item .picTxt .pictrue {
width: 160rpx;
height: 160rpx;
}
.shoppingCart .list .item .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.shoppingCart .list .item .picTxt .text {
width: 444rpx;
margin-left: 20rpx;
font-size: 28rpx;
color: #282828;
}
.shoppingCart .list .item .picTxt .buy_limit {
margin-top: 10rpx;
color: #E93323;
font-size: 22rpx;
}
.shoppingCart .list .item .picTxt .text .infor {
display: inline-block;
padding: 6rpx;
@ -1028,17 +1090,20 @@
background-color: #F5F5F5;
max-width: 460rpx;
}
.shoppingCart .list .item .picTxt .text .money {
font-size: 32rpx;
color: #282828;
margin-top: 28rpx;
}
.shoppingCart .list .item .picTxt .carnum {
height: 47rpx;
position: absolute;
bottom: 30rpx;
right: 30rpx;
}
.shoppingCart .list .item .picTxt .carnum view {
border: 1px solid #a4a4a4;
min-width: 66rpx;
@ -1048,24 +1113,30 @@
font-size: 28rpx;
color: #a4a4a4;
}
.shoppingCart .list .item .picTxt .carnum .reduce {
border-right: 0;
border-radius: 3rpx 0 0 3rpx;
}
.shoppingCart .list .item .picTxt .carnum .reduce.on {
border-color: #e3e3e3;
color: #dedede;
}
.shoppingCart .list .item .picTxt .carnum .plus {
border-left: 0;
border-radius: 0 3rpx 3rpx 0;
}
.shoppingCart .list .item .picTxt .carnum .num {
color: #282828;
}
.shoppingCart .invalidGoods {
background-color: #fff;
}
.shoppingCart .invalidGoods .goodsNav {
width: 100%;
height: 66rpx;
@ -1074,25 +1145,30 @@
font-size: 28rpx;
color: #282828;
}
.shoppingCart .invalidGoods .goodsNav .iconfont {
color: #424242;
font-size: 28rpx;
margin-right: 17rpx;
}
.shoppingCart .invalidGoods .goodsNav .del {
font-size: 26rpx;
color: #999;
}
.shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 {
color: #999;
font-size: 33rpx;
vertical-align: -2rpx;
margin-right: 8rpx;
}
.shoppingCart .invalidGoods .goodsList .item {
padding: 20rpx 30rpx;
border-top: 1px solid #f5f5f5;
}
.shoppingCart .invalidGoods .goodsList .item .invalid {
font-size: 22rpx;
color: #fff;
@ -1103,31 +1179,38 @@
text-align: center;
line-height: 36rpx;
}
.shoppingCart .invalidGoods .goodsList .item .pictrue {
width: 140rpx;
height: 140rpx;
}
.shoppingCart .invalidGoods .goodsList .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
.shoppingCart .invalidGoods .goodsList .item .text {
width: 433rpx;
font-size: 28rpx;
color: #999;
height: 140rpx;
}
.shoppingCart .invalidGoods .goodsList .item .text .name {
width: 100%;
}
.shoppingCart .invalidGoods .goodsList .item .text .infor {
font-size: 24rpx;
}
.shoppingCart .invalidGoods .goodsList .item .text .end {
font-size: 26rpx;
color: #bbb;
}
.shoppingCart .footer {
z-index: 9;
width: 100%;
@ -1137,23 +1220,27 @@
padding: 0 30rpx;
box-sizing: border-box;
border-top: 1px solid #eee;
bottom: 98rpx;
bottom: calc(98rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
bottom: 40px;
bottom: calc(40px + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(40px + env(safe-area-inset-bottom)); /// IOS>11.2/
}
.shoppingCart .footer.on {
// #ifndef H5
bottom: 0rpx;
// #endif
}
.shoppingCart .footer .checkAll {
font-size: 28rpx;
color: #282828;
margin-left: 16rpx;
}
.shoppingCart .footer .money {
font-size: 30rpx;
}
.shoppingCart .footer .placeOrder {
color: #fff;
font-size: 30rpx;
@ -1165,6 +1252,7 @@
margin-left: 22rpx;
background-color: var(--view-theme);
}
.shoppingCart .footer .button .bnt {
font-size: 28rpx;
color: #999;
@ -1174,27 +1262,33 @@
height: 60rpx;
text-align: center;
line-height: 60rpx;
&.bt-color {
color: var(--view-theme);
border: 1px solid var(--view-theme);
}
}
.shoppingCart .footer .button form~form {
margin-left: 17rpx;
}
.allcheckbox {
display: flex;
align-items: center;
width: 260rpx;
.iconfont {
margin-right: 20rpx;
font-size: 40rpx;
color: #CCCCCC;
}
.icon-xuanzhong1 {
color: var(--view-theme);
}
}
.page-footer {
position: fixed;
bottom: 0;
@ -1211,9 +1305,11 @@
box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
&.filter{
&.filter {
filter: blur(2rpx);
}
.foot-item {
display: flex;
width: max-content;
@ -1221,6 +1317,7 @@
justify-content: center;
flex-direction: column;
position: relative;
.count-num {
position: absolute;
display: flex;
@ -1237,15 +1334,16 @@
padding: 4rpx;
}
}
.foot-item image {
height: 50rpx;
width: 50rpx;
text-align: center;
margin: 0 auto;
}
.foot-item .txt {
font-size: 24rpx;
}
}
</style>
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<view :style="viewColor">
<view class='payment-status'>
<!--失败时 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-->
<view class='iconfont icon-duihao2 icon' v-if ="order_pay_info.paid !=0"></view>
<view class='iconfont icon-duihao2 icon' v-if="order_pay_info.paid !=0"></view>
<view class='iconfont icon-iconfontguanbi icon' v-else></view>
<!-- 失败时订单支付失败 -->
<view class='status'>{{order_pay_info.paid == 1 ?'支付成功':'订单未支付'}}</view>
@ -14,26 +14,30 @@
</view>
<view class='item acea-row row-between-wrapper'>
<view>支付方式</view>
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3" class='itemCom'>微信</view>
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝</view>
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3"
class='itemCom'>微信</view>
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝
</view>
<view v-else class='itemCom'>余额</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>支付金额</view>
<view class='itemCom'>{{order_pay_info.pay_price}}</view>
</view>
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid" class='item acea-row row-between-wrapper'>
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid"
class='item acea-row row-between-wrapper'>
<view>赠送积分</view>
<view class='itemCom t-color'>{{order_pay_info.give_integral}}</view>
</view>
<!--失败时加上这个 -->
<view class='item acea-row row-between-wrapper' v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
<view class='item acea-row row-between-wrapper'
v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
<view>失败原因</view>
<view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view>
</view>
</view>
<!--失败时 重新购买 -->
<view @tap="goOrderDetails">
<view @tap="goOrderDetails(order_pay_info.paid)">
<button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button>
</view>
<!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1">
@ -42,8 +46,10 @@
<!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2">
<button class='returnBnt bg-color' hover-class='none'>重新支付</button>
</view> -->
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit" hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex" class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit"
hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex"
class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
<view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
<view class="hd">
<view class="line"></view>
@ -53,12 +59,16 @@
<view class="coupon-box" :class="{on:isOpen}">
<block v-for="(item,index) in couponList" :key="index">
<view class="coupon-item flex">
<view class="left-bg" :style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }"><text></text>{{item.coupon_price}}</view>
<view class="left-bg"
:style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }">
<text></text>{{item.coupon_price}}
</view>
<view class="info">
<view class="title">{{item.title}}</view>
<view class="des">{{item.use_min_price}}元可用</view>
<block v-if="item.coupon_type == 1">
<view class="des">有效期:{{ item.use_start_time |timeYMD }}-{{ item.use_end_time |timeYMD}}</view>
<view class="des">
有效期:{{ item.use_start_time |timeYMD }}-{{ item.use_end_time |timeYMD}}</view>
</block>
<block v-if="item.coupon_type == 0">
<view class="des">领取后{{ item.coupon_time}}天内可用</view>
@ -88,22 +98,30 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {getPayOrder} from '@/api/order.js';
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js';
import {mapGetters} from "vuex";
import {
getPayOrder
} from '@/api/order.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import { HTTP_REQUEST_URL } from '@/config/app';
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
components: {
authorize,
},
filters: {
timeYMD: function (value) {
if(value){
var newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(value)
timeYMD: function(value) {
if (value) {
var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(value)
return newDate[0]
}
}
}
},
data() {
return {
@ -115,14 +133,16 @@
isShowAuth: false, //
status: 0,
msg: '',
couponList:[], //
isOpen:false ,//
couponList: [], //
isOpen: false, //
moneyBg: '/static/images/couponBg',
text: '展开更多',
timer: null
timer: null,
product_type: '',
};
},
computed: mapGetters(['isLogin','viewColor','keyColor']),
computed: mapGetters(['isLogin', 'viewColor', 'keyColor']),
onLoad: function(options) {
if (!options.order_id) return this.$util.Tips({
title: '缺少参数无法查看订单支付状态'
@ -134,21 +154,21 @@
this.order_type = options.order_type;
this.status = options.status || 0;
this.msg = options.msg || '';
this.product_type = options.product_type
if (this.isLogin) {
this.refreshData();
} else {
this.isAuto = true;
this.isShowAuth = true
}
}
},
methods: {
refreshData(){
this.timer = setInterval(()=>{
this.getOrderPayInfo();
},1000)
refreshData() {
this.getOrderPayInfo();
},
//
bindMore(){
bindMore() {
this.isOpen = !this.isOpen
this.text = this.text == '展开更多' ? '收起' : '展开更多';
},
@ -158,7 +178,7 @@
},
//
authColse: function(e) {
this.isShowAuth = e;
this.isShowAuth = e;
},
/**
*
@ -173,7 +193,7 @@
uni.setNavigationBarTitle({
title: res.data.paid == 1 ? '支付成功' : '支付失败'
});
if(res.data.paid == 1){
if (res.data.paid == 1) {
clearInterval(this.timer);
this.timer = null;
}
@ -199,16 +219,41 @@
*
* 去订单详情页面
*/
goOrderDetails: function(e) {
goOrderDetails: function(val) {
let that = this;
if (this.order_pay_info.paid == 0) {
uni.redirectTo({
url: '/pages/users/order_list/index'
})
if (this.product_type == 98) {
if(val==1){
uni.navigateTo({
url: `/pages/users/order_list/indexCopy?status=1&product_type=${this.product_type}`
})
}else{
uni.navigateTo({
url: `/pages/users/order_list/indexCopy?status=0&product_type=${this.product_type}`
})
}
} else if (this.product_type == 99) {
if(val==1){
uni.navigateTo({
url: `/pages/users/order_list/relase?status=1&product_type=${this.product_type}`
})
}else{
uni.navigateTo({
url: `/pages/users/order_list/relase?status=0&product_type=${this.product_type}`
})
}
} else {
uni.redirectTo({
url: '/pages/users/order_list/index?status=1'
})
if(val==1){
uni.navigateTo({
url: '/pages/users/order_list/index?status=1&product_type=0'
})
}else{
uni.navigateTo({
url: '/pages/users/order_list/index?status=0&product_type=0'
})
}
}
}
@ -231,6 +276,7 @@
border-radius: 10rpx;
padding: 1rpx 0 28rpx 0;
}
.payment-status .icon {
font-size: 70rpx;
width: 140rpx;
@ -242,19 +288,23 @@
border: 6rpx solid #f5f5f5;
margin: -76rpx auto 0 auto;
background-color: #999;
&.icon-duihao2{
&.icon-duihao2 {
background-color: var(--view-theme);
}
}
.payment-status .icon.fail {
text-shadow: 0px 4px 0px #7a7a7a;
}
.payment-status .status {
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin: 25rpx 0 37rpx 0;
}
.payment-status .wrapper {
border: 1px solid #eee;
margin: 0 30rpx 47rpx 30rpx;
@ -262,16 +312,20 @@
border-left: 0;
border-right: 0;
}
.payment-status .wrapper .item {
font-size: 28rpx;
color: #282828;
}
.payment-status .wrapper .item~.item {
margin-top: 20rpx;
}
.payment-status .wrapper .item .itemCom {
color: #666;
}
.payment-status .returnBnt {
width: 630rpx;
height: 86rpx;
@ -281,46 +335,56 @@
text-align: center;
line-height: 86rpx;
margin: 0 auto 20rpx auto;
&.gColor{
&.gColor {
background-color: var(--view-theme);
}
&.s-Color{
&.s-Color {
color: var(--view-theme);
border: 1px solid var(--view-theme);
border: 1px solid var(--view-theme);
}
}
.t-color {
color: var(--view-theme)!important;
color: var(--view-theme) !important;
}
.coupon-wrapper{
.hd{
.coupon-wrapper {
.hd {
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx 0;
color: #999999;
font-size: 24rpx;
.line{
.line {
width: 70rpx;
height: 1px;
background: #DCDCDC;
}
.txt{
.txt {
margin: 0 20rpx;
}
}
.coupon-box{
.coupon-box {
height: 356rpx;
padding: 0 20rpx;
overflow: hidden;
&.on{
&.on {
height: auto;
}
.coupon-item{
.coupon-item {
width: 100%;
margin-bottom: 20rpx;
box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.06);
.left-bg{
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
.left-bg {
display: flex;
align-items: center;
justify-content: center;
@ -328,40 +392,46 @@
height: 160rpx;
color: #fff;
font-size: 64rpx;
text{
text {
margin-top: 26rpx;
font-size: 36rpx;
}
}
.info{
.info {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 20rpx;
padding: 20rpx 0;
.title{
.title {
color: #282828;
font-size: 30rpx;
}
.des{
.des {
font-size: 24rpx;
color: #999999;
}
}
}
}
.more{
.more {
display: flex;
align-items: center;
justify-content: center;
padding-top: 24rpx;
font-size: 24rpx;
color: #999999;
.iconfont{
.iconfont {
margin-top: 6rpx;
margin-left: 10rpx;
font-size: 20rpx;
}
}
}
</style>
</style>

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,9 @@
<view :style="viewColor">
<form @submit="formSubmit" report-submit='true'>
<view class="release_content">
<view v-if="community_app_switch.length == 1" class="release_tab acea-row">
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value" :class="{on:tabActive == item.value}" @click="changeTab(item)">
<!-- v-if="community_app_switch.length == 1" -->
<view class="release_tab acea-row">
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value" :class="{on:tabActive == index}" @click="changeTab(index)">
<text class="iconfont" :class="item.icon"></text>{{item.name}}
</view>
</view>
@ -11,7 +12,7 @@
<view class="release_item">
<view class="photo_count">
<view class="input_photo acea-row row-middle">
<block v-if="tabActive == 2">
<block v-if="tabActive == 1">
<view class="pictrue" v-if="formData.video_link">
<image class="video-bg" mode="widthFix" src="../static/images/video_bg.png"></image>
<view class="videoHover" @click="videoshow">
@ -26,7 +27,7 @@
<view><text class='iconfont icon-tianjiashipin'></text></view>
<view class="text">添加视频</view>
</view>
<view v-if="formData.image.length < 1" class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk">
<view class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk">
<view><text class='iconfont icon-fengmian'></text></view>
<view class="text">添加封面</view>
</view>
@ -36,7 +37,7 @@
<text class="cover_text" v-if="tabActive == 2">封面</text>
<view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view>
</view>
<block v-if="tabActive == 1">
<block v-if="tabActive == 0">
<view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add" @click.stop="clk">
<view><text class='iconfont icon-icon25201'></text></view>
<view class="text">添加图片</view>
@ -186,7 +187,7 @@
// #endif
},
onLoad(options) {
console.log(this.community_app_switch);
console.log(options.type);
this.id = options.id;
this.order_id = options.order_id;
this.tabActive = options.type || 1;
@ -246,9 +247,10 @@
})
},
/*切换tab*/
changeTab(item) {
if(this.tabActive == item.value) return
this.tabActive = item.value
changeTab(index) {
this.tabActive =index
this.formData.image = []
},
/*删除话题*/
@ -467,6 +469,7 @@
});
}
}else{
if (value.image.length == 0) return that.$util.Tips({
title: '请添加话题图片'
});

View File

@ -17,7 +17,7 @@
<text>{{userInfo.focus}}</text>关注
</navigator>
<navigator :url="userInfo.is_self ? '/pages/plantGrass/plant_user_fans/index' : ''" class="item" hover-class="none">
<text>{{userInfo.fans}}</text>粉丝
<text>{{userInfo.fans==null?0:userInfo.fans}}</text>粉丝
</navigator>
<view class="item">
<text>{{userInfo.start}}</text>获赞
@ -37,6 +37,7 @@
</view>
</view>
<view class="main">
<view v-if="userInfo.is_self" class="tab_count">
<text @click.stop="changeTab(0)" :class="tab==0 ? 'on' : ''">作品</text>
<text @click.stop="changeTab(1)" :class="tab==1 ? 'on' : ''">赞过</text>

File diff suppressed because it is too large Load Diff

View File

@ -162,22 +162,22 @@
<checkbox-group class="select_group flex_start" @change="deliveryWayChange">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value)" />
<checkbox :value="val.value" disabled :checked="setFormData.delivery_way.includes(val.value)" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
<view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
<!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
<view class="popup_group_item_label">是否包邮</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<switch :checked="setFormData.delivery_free == '1'" color="#E93323"
style="transform:scale(0.8)" @change="deliveryFreeChange" />
style="transform:scale(0.8)" @change="deliveryFreeChange" disabled="true"/>
</view>
</view>
</view>
</view> -->
<view class="popup_group_item"
v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0"
@ -304,7 +304,7 @@
specifica: '', //
setSpecificaValue: '', //
setSpecificaValue2: '',
delivery_way: [], // 1 2
delivery_way: [1,2], // 1 2
delivery_free: '1', // 0 1
temp_id: '', // ID
tempName: '' //

View File

@ -39,11 +39,6 @@
</view>
<view v-if="item.more_thanFlag">
<view class="multiSpecifica_container_item">
<view class="multiSpecifica_container_item_label flex-start">库存</view>
<view class="multiSpecifica_container_item_value"><input v-model="item.stock" type="number" placeholder="请填写商品库存" /></view>
</view>
<view class="multiSpecifica_container_item">
<view class="multiSpecifica_container_item_label flex-start">商品编号</view>
<view class="multiSpecifica_container_item_value"><input v-model="item.bar_code" type="text" placeholder="请填写商品编号" /></view>
@ -112,12 +107,6 @@
<view class="changePopup_container_content_item_label">原价</view>
<view class="changePopup_container_content_item_value"><input v-model="batchData.ot_price" type="number" placeholder="0.00" /></view>
</view>
<view class="changePopup_container_content_item">
<view class="changePopup_container_content_item_label">库存</view>
<view class="changePopup_container_content_item_value"><input v-model="batchData.stock" type="number" placeholder="0.00" /></view>
</view>
<view class="popup_moreThan" @click="popupOpenModel = !popupOpenModel" v-if="!popupOpenModel">
<text>展开</text>
<text class="iconfont">&#xe8ca;</text>
@ -182,7 +171,6 @@ export default {
price: '', //
cost: '', //
ot_price: '', //
stock: '', //
bar_code: '', //
weight: '', //
volume: '', //
@ -363,7 +351,6 @@ export default {
price: 0,
cost: 0,
ot_price: 0,
stock: 0,
bar_code: '',
weight: 0,
volume: 0,
@ -397,7 +384,6 @@ export default {
price: 0,
cost: 0,
ot_price: 0,
stock: 0,
bar_code: '',
weight: 0,
volume: 0,

View File

@ -48,12 +48,41 @@
<view class="content_list_video">
<view class="content_list_video_title">商品视频</view>
<view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()">
<video :src="addGoodsSecoundData.video_link"></video>
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png" style=" width:150rpx" ></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image>
</view>
<!--#ifndef APP-PLUS-->
<view style="position: absolute;">
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view>
<view class="photo" @click="uploadVideo" v-else>
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
@ -63,7 +92,17 @@
</view>
</view>
</view>
<view v-if="showVideo" class="video-count">
<!--#ifndef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video>
<!--#endif-->
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<view class="handle dobuButton">
<view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view>
@ -109,6 +148,7 @@
},
data() {
return {
showVideo:false,
disModel: false,
upload_max: 10,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
@ -144,6 +184,16 @@
}
},
methods: {
videoshow() {
this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.videoContext.play();
})
// this.video_link = this.formData.video_link;
// this.videoContext.requestFullScreen({ direction: 90 });
// this.videoContext.play(); this.videoplay = true;
},
initData() {
let editGoodsDetils = {};
if (getStorage('goodsDis')) {
@ -199,8 +249,10 @@
video_link: this.addGoodsSecoundData.video_link
};
postData.attrValue = attrValue.filter(item => item != '');
postData.attrValue[0].bar_code
if(attrValue){
postData.attrValue = attrValue.filter(item => item != '');
postData.attrValue[0].bar_code
}
// console.log(postData);
if (getStorage('addGoodsFormData').spec_type == 0) {
// postData.attr = [getStorage('singleSpecification')];
@ -270,6 +322,8 @@
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: res => {
console.log(res)
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({
url: this.uploadUrl, //
@ -301,9 +355,11 @@
}
},
fail: err => {
uni.showModal({
content: JSON.stringify(err)
});
//
// uni.showModal({
// content: JSON.stringify(err)
// });
console.log(err)
}
});
},
@ -357,7 +413,32 @@
}
}
}
.videoHover {
width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view {
width: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
color: #ffffff;
font-size: 21rpx;
}
}
}
.photo {
border: 1px solid #dddddd;
opacity: 1;
@ -400,7 +481,10 @@
height: 150rpx;
}
}
.preview_video{
position: absolute;
}
.container_input {
background: #fff;
padding: 0 20rpx;
@ -519,7 +603,24 @@
.marginTop_none {
margin-top: 0;
}
.video-count {
position: fixed;
width: 600rpx;
height: 500rpx;
top: 50%;
left: 50%;
margin-left: -300rpx;
margin-top: -250rpx;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
.videoLink {
width: 600rpx;
height: 500rpx;
}
}
// .writeBg {
// background: #fff;
// }

View File

@ -26,7 +26,6 @@
price: '', //
cost: '', //
ot_price: '', //
stock: '', //
bar_code: '', //
weight: '', //
volume: '', //
@ -56,13 +55,6 @@
type: 'digit',
holder: '请填写原价',
model: 'ot_price'
},
{
id: 4,
label: '库存',
type: 'number',
holder: '请填写库存',
model: 'stock'
}
],
moreThanList: [

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -13,8 +13,16 @@
-->
<!-- 头部导航 -->
<!-- 头部导航 -->
<view v-if="!isUser" class="header">
<view class="header">
<view class="tool-bar">
<view class='xiangzuo' @tap='goBack'>
<!-- <image src="@/static/images/icon-back.png" mode="aspectFit"></image> -->
</view>
</view>
<!-- <view class="tool-bar">
<view class='iconfont icon-xiangzuo' @tap='goBack'></view>
</view>
<view class="items" @click.stop="navTap(2)">
@ -24,14 +32,30 @@
<text class="tName" :class="currentNav==1?'on':''">推荐</text>
</view>
<view class="items" @click.stop="navTap(3)">
<text class="tName" :class="currentNav==3?'on':''">列表</text>
<text class="tName" :class="currentNav==3?'on':''">热点资讯</text>
</view>
<view class="items" @click.stop="navTap(4)">
<text class="tName" :class="currentNav==4?'on':''">社区</text>
</view> -->
</view>
<swiper v-show="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"
:vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
<swiper v-show="currentNav !== 3&&currentNav != 4"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" :vertical="true"
@animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
<swiper-item v-for="(list,index) in dataList">
<view v-if="max > index">
<!-- <view style="width: 100px;height: 100px;background-color: red;">
5666
</view> -->
<view>
<!-- 这种视频背景模糊的效果怎么做呢 -->
<!--
1.v-if用于控制视频在节点的渲染数
2.muted的默认值是 false代表默认是禁音视频的
@ -46,13 +70,18 @@
:show-center-play-btn="false" :enable-progress-gesture="false" :src="list.video_link"
@ended="ended" @play="play(index)" @click="tapVideoHover(list.state,$event)"
@waiting="waiting(index)"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;z-index: -1;'"></video>
style="width: 100vw; height: 100vh;z-index: -1;transform: scale(4)">
</video>
</view>
<!-- 播放状态pause 的时候就会暂停 -->
<view class="videoHover" @click="tapVideoHover(list.state,$event)"
<!-- <view class="videoHover" @click="tapVideoHover(list.state,$event)"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'">
<image v-if="list.state=='pause'" class="playState" src="../static/img/index/play.png"></image>
</view>
</view> -->
<!--审核状态-->
<view v-if="list.status==-1 || list.status==0 || list.status==-2" class="video-status">
<view v-if="list.status == -1 || list.status == -2" class="status-title">
@ -226,6 +255,7 @@
</view>
</block>
</scroll-view>
<!-- <view class="video-list" v-if="currentNav === 3"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'">
@ -275,6 +305,8 @@
</view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
@ -291,10 +323,12 @@
} from '@/utils';
import comment from '@/components/comment.vue';
import mentioned from '@/components/mentioned.vue';
import {
HTTP_REQUEST_URL
} from '@/config/app';
import {
deoList,
videoList,
myVideoList,
graphicStartApi,
@ -314,11 +348,13 @@
components: {
comment,
mentioned,
authorize
authorize,
},
computed: configMap({
community_reply_status: 0
}, mapGetters(['isLogin', 'uid'])),
data() {
return {
isTriggered: false,
@ -394,6 +430,7 @@
communityId: '',
Listcount: '',
loadMore: true,
videoshow: true
}
},
watch: {
@ -711,16 +748,13 @@
}
},
get() {
let that = this
// 1.这里引入后端请求数据
that.isUser ?
myVideoList(that.userUid, {
page: that.page,
limit: that.limit,
is_star: that.isSatrt,
community_id: that.videoID
}).then(res => {
that.videoData(res.data.list)
if (that.videoshow) {
deoList(this.videoID).then(res => {
that.videoData([res.data])
if (res.data.list.length < that.limit) {
this.loadMore = false;
}
@ -730,11 +764,18 @@
icon: 'none',
duration: 2000
});
}) :
graphicLstApi({
})
this.videoshow = false
} else {
// videoList().then(res=>{
// that.videoData(res.data.list);
// })
// console.log(that.userUid,that.videoID)
videoList({
page: that.page,
limit: that.limit,
category_id: -1
id: this.videoID
}).then(res => {
that.videoData(res.data.list)
if (res.data.list.length < that.limit) {
@ -747,6 +788,43 @@
duration: 2000
});
})
}
// that.isUser ?
// myVideoList(that.userUid, {
// page: that.page,
// limit: that.limit,
// is_star: that.isSatrt,
// community_id: that.videoID
// }).then(res => {
// that.videoData(res.data.list)
// if (res.data.list.length < that.limit) {
// this.loadMore = false;
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
//:
// graphicLstApi({
// page: that.page,
// limit: that.limit,
// category_id: -1
// }).then(res => {
// that.videoData(res.data.list)
// if (res.data.list.length < that.limit) {
// this.loadMore = false;
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
that.loadVideo = true
},
getFocusList() {
@ -1135,10 +1213,11 @@
<style lang="scss" scoped>
.video-list {
padding: 200rpx 28.07rpx 28.07rpx 28.07rpx;
padding: 150rpx 28.07rpx 28.07rpx 28.07rpx;
/* #ifdef MP */
padding-top: 200rpx;
padding-top: 150rpx;
/* #endif */
background-color: #F5F5F5;
.goods_item {
width: 342.11rpx;
@ -1237,13 +1316,13 @@
position: fixed;
z-index: 9;
width: 750rpx;
height: 86rpx;
height: 120rpx;
flex-direction: row;
justify-content: center;
align-items: center;
top: 20rpx;
padding-top: 20rpx;
/* #ifdef MP */
top: 75rpx;
padding-top: 75rpx;
/* #endif */
.tool-bar {
@ -1255,23 +1334,40 @@
display: flex;
justify-content: center;
.icon-xiangzuo {
.xiangzuo {
width: 23rpx;
height: 42rpx;
margin-right: 40rpx;
margin-left: 20rpx;
font-size: 26rpx;
color: #fff;
image {
width: 100%;
height: 100%;
}
}
}
.items {
margin: 0 30rpx;
image {
width: 58rpx;
height: 58rpx;
}
.tName {
color: #ffffff;
font-size: 32rpx;
font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #737373;
line-height: 50px;
&.on {
font-size: 38rpx;
font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
@ -1290,6 +1386,7 @@
.shortVideo,
.container {
background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, #000000 100%);
}
.item {
@ -1336,6 +1433,7 @@
flex: 1;
justify-content: center;
align-items: center;
// background-color: red;
}
.playState {
@ -1346,7 +1444,7 @@
.userInfo {
position: absolute;
bottom: 60rpx;
bottom: 420rpx;
right: 20rpx;
flex-direction: column;
text-align: center;
@ -1861,4 +1959,8 @@
color: #999;
}
}
.videoa {
background-color: red;
}
</style>

View File

@ -83,7 +83,7 @@
},
//
jump(item) {
// console.log(item)
console.log(item)
if ([0, 2].includes(item.status)) {
uni.navigateTo({
url: `/pages/store/settled/index?mer_i_id=${item.mer_intention_id}`

View File

@ -1198,7 +1198,7 @@
this.isTriggered = true;
const newList = this.goods.reverse();
this.goods = newList;
this.getProductSpu()
// this.getProductSpu()
setTimeout(() => {
this.isTriggered = false;
}, 500)
@ -1210,7 +1210,7 @@
//
if (this.tabActive == 0) {
setTimeout(() => {
this.goods.push(...this.goods);
// this.goods.push(...this.goods);
}, 500)
}
},
@ -1220,7 +1220,8 @@
setTimeout(() => {
const newList = this.goods.reverse();
this.goods = newList;
this.getProductSpu()
// this.getGoods()
// this.getProductSpu()
// uni.startPullDownRefresh();
// uni.stopPullDownRefresh();
}, 500)

View File

@ -2,9 +2,11 @@
<view :style="viewColor">
<view class='productList'>
<view class='search acea-row row-between-wrapper'>
<!-- #ifdef H5 -->
<view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view>
</view>
<!-- #endif -->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='where.keyword'
@confirm="searchSubmit"></input>

View File

@ -1,6 +1,65 @@
<template>
<view class="merchant-details">
<view class="top">
<view style="height: var(--status-bar-height);"></view>
<view class="tit">
<u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/succes.png"
width="348.83rpx" height="271.77rpx" @click="goBack"></u--image>
恭喜您的申请已通过
</view>
<view class="content">
<view class="steps">
<u-steps current="3" direction="column" mode="number">
<u-steps-item title="运输中" desc="11:40">
<!-- <u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/CGBZ.png"
width="31.54rpx" height="31.54rpx"></u--image> -->
<!-- <u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/succes.png" width="348.83rpx" height="271.77rpx"
@click="goBack"></u--image> -->
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="待审核" desc="10:35">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="审核通过" desc="11:40">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
</u-steps>
</view>
<view class="msg" v-if="mer_id > 0 && resData.login_url" @click="copyTBL()">
<view style="margin-bottom: 20rpx;">
<text style="font-weight: bold;">登录地址</text>
<text class="">{{resData.login_url}}</text>
</view>
<view>
<text style="font-weight: bold;">商户账号</text>
<text class="">{{resData.phone}}</text>
</view>
<!-- <view class=" phone">
<view class="">
<text class="head">商户账号</text>
<text class="content">{{resData.phone}}</text>
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view> -->
</view>
</view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
<view class="btn_bottom" @click="navgo(`/pages/product/basicSet?mer_id=${mer_id}`)">
<u-button type="primary" style="background-color: #3274F9;border-radius: 30rpx;border: none;"
text="完善商户信息"></u-button>
</view>
<!-- <view class="top">
<image class="img" src="../static/images/successTop.png" mode=""></image>
<view class="title">
恭喜您的申请已通过
@ -18,12 +77,8 @@
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view>
</view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
</view> -->
</view>
</template>
@ -54,6 +109,11 @@
}
},
methods: {
navgo(url) {
uni.navigateTo({
url
})
},
getGoodsDetails(id) {
getGoodsDetails(id).then(res => {
this.resData = res.data
@ -138,69 +198,100 @@
<style lang="scss" scoped>
.merchant-details {
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
padding: 0 4vw;
// padding: ;
height: 100vh;
position: relative;
// background-color: #C5D9FD;
background-image: url("../../../static/images/SJRZ/bg.png");
background-repeat: no-repeat;
position: relative;
.tit {
color: white;
font-size: 33.29rpx;
text-align: center;
// padding: 50vh 0;
transform: translateY(5vh);
display: flex;
// justify-content: space-around;
flex-direction: column;
align-items: center;
}
.content {
background-color: white;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
// transform: translateY(20vh);
margin-top: 100rpx;
box-sizing: border-box;
padding: 2vw;
// .steps {}
.msg {
width: 85%;
padding: 30rpx;
// height: 150rpx;
margin: 30rpx auto;
background-color: #F4F7FE;
border-radius: 8rpx;
.li {
// margin-: ;
// display: flex;
// justify-content: left;
// display: flex;
// flex-shrink: 1;
}
}
}
.top {
display: flex;
flex-direction: column;
align-items: center;
.img {
width: 340rpx;
height: 280rpx;
margin: 140rpx 0 30rpx 0;
}
.title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
}
.msg {
width: 85%;
padding: 30rpx;
height: 150rpx;
margin: 70rpx 70rpx;
background-color: #F6F6F6;
border-radius: 8rpx;
.url {
display: flex;
flex-wrap: nowrap;
margin-bottom: 20rpx;
}
.phone {
display: flex;
justify-content: space-between;
}
.head {
color: #333333;
font-size: 28rpx;
font-weight: 500;
white-space: nowrap;
}
.content {
color: #999999;
font-size: 26rpx;
}
.cope {
padding: 5rpx 16rpx;
color: #FFFFFF;
border-radius: 30rpx;
background-color: #999999;
margin-left: 40rpx;
font-size: 20rpx;
}
}
.btn {
width: 70%;
position: absolute;
text-align: center;
color: #999999;
font-size: 24rpx;
bottom: 80rpx
// width: 70%;
// position: absolute;
// text-align: center;
// color: #999999;
// font-size: 24rpx;
// bottom: 80rpx
// background-color: red;
// height: 100vw;
margin-top: 5vw;
}
.btn_bottom {
position: fixed;
width: 92vw;
bottom: 20rpx;
}
}
</style>
</style>

View File

@ -367,7 +367,7 @@
//
getGoodsDetails(id) {
getGoodsDetails(id).then(res => {
// console.log(res);
console.log(res);
let arr = Object.keys(this.merchantData)
let resData = res.data
arr.map(item => {
@ -411,7 +411,7 @@
this.validateBtn()
},
bindPickerChange1: function(e) {
// console.log(e);
console.log(e);
this.index1 = e.target.value
let idx = e.target.value
this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id']
@ -443,7 +443,7 @@
getStoreType: function() {
getStoreTypeApi()
.then(res => {
// console.log(res);
console.log(res);
this.storeTypeArr = res.data
})
.catch(res => {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -51,7 +51,7 @@
</view>
<view class='tip mt25'>
当前可提现金额: <text
class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}}
class="price">{{extract_money}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view>
<view class='tip'>
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
@ -92,7 +92,7 @@
<view class='tip mt25'>
当前可提现金额: <text
class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}}
class="price">{{extract_money}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view>
<view class='tip'>
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
@ -100,7 +100,7 @@
<button formType="submit" class='bnt b-color'>提现</button>
</view>
<view v-else class="auto_arrival">
<view class='tip'>当前可提现金额: <text class="price">{{userInfo.brokerage_price}}</text>
<view class='tip'>当前可提现金额: <text class="price">{{extract_money}}</text>
</view>
<view class='input'><input placeholder-class='placeholder1' name="extract_price"
type='digit' :placeholder="placeholderValue" @focus="placeholderValue = ''"
@ -141,7 +141,7 @@
</view>
<view class='tip mb25'>
当前可提现金额: <text
class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}}
class="price">{{extract_money}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view>
<view class='tip' v-if="userInfo.broken_day>0">
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
@ -166,7 +166,8 @@
getAdminApplyAPI,
getLisApplyAPI,
getAccountApplyAPI,
postAccountApplyAPI
postAccountApplyAPI,
} from '@/api/user.js'
import {
extractCash,
@ -192,6 +193,7 @@
},
data() {
return {
extract_money:"",
mode: {
bank_address: "",
bank_code: "",
@ -276,6 +278,8 @@
this.mode.bank_code = res.data.financial_bank_code
this.mode.bank_name = res.data.financial_bank_bank
this.mode.bank_address = res.data.financial_bank_branch
this.extract_money=res.data.extract_money
console.log(this.extract_money)
} catch (err) {
//TODO handle the exception
Toast(err)
@ -443,6 +447,11 @@
console.log(res);
}).catch(err => {
Toast(err)
setTimeout(()=>{
uni.navigateBack({
delta: 1
})}, 1000)
})
},
async postCreate(price) {

View File

@ -1,5 +1,5 @@
<template>
<view class="list">
<view class="list">
<view class="head">
<view class="head_conent">
<view class="tatil">
@ -8,8 +8,9 @@
<h3>提现次数</h3>
</view>
<view class="sum">
<u-count-to :startVal="0" :endVal="sum"></u-count-to>
<u-count-to :startVal="0" :endVal="sumTofixed" :decimals="2"></u-count-to>
<h3>提现总额</h3>
</view>
</view>
</view>
@ -66,7 +67,11 @@
UserApplylist:[]
}
},
computed: {},
computed: {
sumTofixed(){
return this.returnFloat(this.sum)
}
},
watch: {
},
@ -79,6 +84,21 @@
// })
},
methods: {
/**数字强制转为两位小数*/
returnFloat(value){
var value=Math.round(parseFloat(value)*100)/100;
var xsd=value.toString().split(".");
if(xsd.length==1){
value=value.toString()+".00";
return value;
}
if(xsd.length>1){
if(xsd[1].length<2){
value=value.toString()+"0";
}
return value;
}
},
tixian() {
uni.navigateBack({
delta: 1

View File

@ -80,39 +80,7 @@
class="font_pro">隐私政策</text></text>
</checkbox-group>
</div>
<!-- #ifdef MP -->
<!-- <view class="appLogin">
<view class="hds">
<span class="line"></span>
<p>其他方式登录</p>
<span class="line"></span>
</view>
<view class="btn-wrapper">
<button form-type="submit" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<view class="btn wx">
<span class="iconfont icon-s-weixindenglu1"></span>
</view>
</button>
</view>
</view> -->
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<!-- <view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
<view class="hds">
<span class="line"></span>
<p>其他方式登录</p>
<span class="line"></span>
</view>
<view class="btn-wrapper">
<view class="btn wx" @click="wxLogin">
<span class="iconfont icon-s-weixindenglu1"></span>
</view>
<view class="btn wx btn-apple" @click="appleLogin" v-if="appleShow">
<span class="iconfont icon-s-pingguo"></span>
</view>
</view>
</view> -->
<!-- #endif -->
</div>
<div class="whiteBg" v-else>
<div class="title">注册账号</div>
@ -168,24 +136,6 @@
class="font_pro">隐私政策</text></text>
</checkbox-group>
</div>
<!-- #ifdef APP-PLUS -->
<view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
<view class="hds">
<span class="line"></span>
<p>其他方式登录</p>
<span class="line"></span>
</view>
<view class="btn-wrapper">
<view class="btn wx" @click="wxLogin">
<span class="iconfont icon-s-weixindenglu1"></span>
</view>
<view class="btn wx btn-apple" @click="appleLogin" v-if="appleShow">
<span class="iconfont icon-s-pingguo"></span>
</view>
</view>
</view>
<!-- #endif -->
</div>
</div>
<div class="bottom"></div>

View File

@ -8,8 +8,10 @@
<text class='phone'>{{addressInfo.phone}}</text>
</view>
<view>
<text class='default t-color'
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}{{addressInfo.detail}}
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
<text v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
</view>
</view>
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
@ -119,6 +121,7 @@
<view class="boxs">
<view class='item acea-row row-between-wrapper'>
<view>配送方式</view>
<view
v-if="item.delivery_way.length == 2 && (item.order.allow_delivery && item.order.allow_take)"
class='discount' @tap="openShowBox(item,index)">
@ -161,13 +164,13 @@
<view class='discount'>暂无优惠券</view>
</block>
</view>
<view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
<!-- <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
{{(item.invoiceData && item.invoiceData.receipt_title) ? item.invoiceData.receipt_title : '不开发票'}}
<text class='iconfont icon-jiantou'></text>
</view>
</view>
</view> -->
<view v-if="order_type === 2 && item.list[0].productPresell.presell_type ==2"
class="item acea-row row-between-wrapper"
style="border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;">
@ -188,6 +191,10 @@
<view class="price" v-if="item.isTake == 0"><text></text>{{ item.order.pay_price }}</view>
<view class="price" v-if="item.isTake == 1"><text></text>{{ item.order.org_price}}</view>
</view>
<view class="total" v-if="item.credit_buy == 1 && active == 4">
实付价
<view class="price"><text></text>0.00</view>
</view>
</view>
</view>
</view>
@ -379,7 +386,11 @@
<view class="footer_count">
<view>
合计:
<text class='pColor'>{{totalPrice || 0}}</text>
<text class='pColor' v-if="cartArr[4].payStatus == 1 && active == 4">0.00</text>
<text class='pColor' v-else>{{totalPrice }}</text>
</view>
<view style="font-size: 14px;color: #F84221;" v-if="cartArr[4].payStatus == 1 && active == 4">
可结算周期到期后再付款{{totalPrice}}
</view>
<view class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{couponData.total_coupon}}
@ -524,6 +535,12 @@
value: 'offline',
title: '线下支付',
payStatus: 2,
}, {
"name": "先货后款",
"icon": "tan-a-lujing17324",
value: 'creditBuy',
title: `结算周期:${this.settle_cycle}天 日利率:${this.interest_rate}%`,
payStatus: '',
},
],
tagStyle: {
@ -638,6 +655,10 @@
order_key: '',
is_take: '',
domain: HTTP_REQUEST_URL,
product_type: '',
interest_rate: '', //
settle_cycle: '', //
type_id: '', //
};
},
computed: {
@ -655,6 +676,8 @@
onReady() {},
mounted: function() {},
onLoad: function(options) {
this.type_id = options.type_id
this.product_type = options.product_type
this.seckillId = options.seckillId
// #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
@ -794,6 +817,7 @@
getUserInfo() {
getUserInfo().then(res => {
this.userInfo = res.data
})
},
/*获取发票说明*/
@ -989,6 +1013,9 @@
*/
getConfirm: function(address_id) {
// console.log(address_id, 'address_id')
// console.log(this.take,)
// console.log(this.subCoupon,)
// console.log(this.use_integral, )
let that = this;
// console.log(that.cartId.split(","))
uni.showLoading({
@ -1003,6 +1030,7 @@
use_integral: that.use_integral
}).then(res => {
//
that.product_type=res.data.order_type
that.is_take = false
res.data.order.forEach(el => {
if (el.order.isTake == 1) that.is_take = true
@ -1053,6 +1081,16 @@
that.allow_address = res.data.allow_address
that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
that.order_key = res.data.key
that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
if (res.data.order[0].credit_buy == 1 && this.type_id == 12) {
this.cartArr[4].payStatus = 1
} else {
this.cartArr[4].payStatus = 0
}
uni.getStorage({
key: "invoice_Data",
success: function(res) {
@ -1080,6 +1118,7 @@
if (that.addressId) {
getAddressDetail(that.addressId).then(res => {
res.data.is_default = parseInt(res.data.is_default);
that.addressInfo = res.data || {};
that.addressId = res.data.address_id || 0;
that.address.addressId = res.data.address_id || 0;
@ -1087,8 +1126,12 @@
real_name: res.data.real_name,
phone: res.data.phone
}
this.getConfirm(that.addressId);
this.$nextTick(() => {
this.getConfirm(that.addressId);
})
})
} else {
getAddressList().then(res => {
that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {};
@ -1106,10 +1149,10 @@
}
},
payItem: function(e) {
console.log(e);
let that = this;
let active = e;
that.active = active;
// console.log(this.active);
that.animated = true;
that.payType = that.cartArr[active].value;
if (that.payType == 'weixin') {
@ -1174,7 +1217,12 @@
orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config,
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message;
//
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
'&product_type=' + that.product_type,
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
'&credit_buy=1&product_type=' + that.product_type;
that.orderPay = true;
uni.hideLoading();
switch (status) {
@ -1186,7 +1234,7 @@
title: res.message
}, {
tab: 5,
url: goPages
url: goPagesOrder
});
break;
case 'success':
@ -1200,10 +1248,10 @@
break;
case 'alipay':
case "alipayQr":
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
jsConfig
})
// uni.navigateTo({
// url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
// jsConfig
// })
return;
break;
// #ifndef MP
@ -1240,8 +1288,10 @@
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
//
let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=支付成功';
'&msg=支付成功' + '&product_type=' + that.product_type;
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@ -1251,8 +1301,10 @@
});
},
fail: (e) => {
console.log(e,'111111111')
//
let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付';
'&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({
title: '取消支付',
}, {
@ -1260,15 +1312,17 @@
url: url
});
},
complete: () => {
let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付';
return that.$util.Tips({
title: '取消支付',
}, {
tab: 4,
url: url
});
complete: (res) => {
uni.hideLoading();
//
// let url = '/pages/order_pay_status/index?order_id=' + orderId +
// '&msg=' + '&product_type=' + that.product_type;
// return that.$util.Tips({
// title: '',
// }, {
// tab: 4,
// url: url
// });
},
});
// #endif
@ -1297,8 +1351,10 @@
});
},
fail: function(e) {
//
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付'
orderId + '&msg=取消支付' + '&product_type=' + that
.product_type
return that.$util.Tips({
title: '取消支付'
}, {
@ -1322,10 +1378,11 @@
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url =
`${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}`
`${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
//
setTimeout(() => {
location.href = locations;
}, 100);
@ -1346,8 +1403,10 @@
});
},
fail: (e) => {
//
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=支付失败'
orderId + '&msg=支付失败' + '&product_type=' + that
.product_type
return that.$util.Tips({
title: '支付失败'
}, {
@ -1357,21 +1416,26 @@
},
complete: () => {
uni.hideLoading();
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付'
return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: pages
});
// //
// let pages = '/pages/order_pay_status/index?order_id=' +
// orderId + '&msg=' + '&product_type=' + that
// .product_type
// return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: pages
// });
},
});
break;
// #endif
default:
//
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付'
orderId + '&msg=取消支付' + '&product_type=' + that.product_type
return that.$util.Tips({
title: '取消支付'
}, {
@ -1429,8 +1493,7 @@
this.virtualIndex = index;
},
SubOrder: function(e) {
console.log(this.active);
let that = this,
data = {};
if (!that.payType) return that.$util.Tips({
@ -1555,6 +1618,15 @@
.Tips({
title: '余额不足!'
});
//
// if (this.payType == 'creditBuy') {
// uni.navigateTo({
// ur
// })
// return
// }
uni.showLoading({
title: '订单支付中',
mask: true
@ -1567,92 +1639,90 @@
// #ifndef MP
that.payment(data);
// #endif
},
//
openShowBox(item, index) {
if (item.delivery_way.length == 2) {
this.activeObj = item
this.activeIndex = index
this.isShowBox = true
this.getDeliveryType(item.order)
}
},
//
getDeliveryType(item) {
if (item.allow_delivery && item.allow_take) {
this.radioList = [{
},
//
openShowBox(item, index) {
if (item.delivery_way.length == 2) {
this.activeObj = item
this.activeIndex = index
this.isShowBox = true
this.getDeliveryType(item.order)
}
},
//
getDeliveryType(item) {
if (item.allow_delivery && item.allow_take) {
this.radioList = [{
title: this.deliveryName,
check: true
},
{
title: '到店核销',
check: false
}
]
} else if (item.allow_delivery && !item.allow_take) {
this.radioList = [{
title: this.deliveryName,
check: true
},
{
}]
} else if (!item.allow_delivery && item.allow_take) {
this.radioList = [{
title: '到店核销',
check: false
}
]
} else if (item.allow_delivery && !item.allow_take) {
this.radioList = [{
title: this.deliveryName,
check: true
}]
} else if (!item.allow_delivery && item.allow_take) {
this.radioList = [{
title: '到店核销',
check: false
}]
}
},
boxClose() {
this.isShowBox = false
},
getData(data) {
this.cartInfo[this.activeIndex] = data
if (data.order.isTake) {
this.take.push(data.mer_id)
} else {
this.take.forEach((item, i) => {
if (data.mer_id == item) {
this.take.splice(i, 1)
}
})
}
this.isShowBox = false
this.getConfirm(this.addressId);
},
//
goMap(item) {
let that = this;
let lat = Number(item.take.mer_take_location[0]),
long = Number(item.take.mer_take_location[1])
//#ifdef H5
if (that.$wechat.isWeixin() === true) {
that.$wechat.seeLocation({
latitude: lat,
longitude: long,
name: item.mer_name,
address: item.take ? item.take.mer_take_address : '',
}).then(res => {
// console.log('success');
})
} else {
}]
}
},
boxClose() {
this.isShowBox = false
},
getData(data) {
this.cartInfo[this.activeIndex] = data
if (data.order.isTake) {
this.take.push(data.mer_id)
} else {
this.take.forEach((item, i) => {
if (data.mer_id == item) {
this.take.splice(i, 1)
}
})
}
this.isShowBox = false
this.getConfirm(this.addressId);
},
//
goMap(item) {
let that = this;
let lat = Number(item.take.mer_take_location[0]),
long = Number(item.take.mer_take_location[1])
//#ifdef H5
if (that.$wechat.isWeixin() === true) {
that.$wechat.seeLocation({
latitude: lat,
longitude: long,
name: item.mer_name,
address: item.take ? item.take.mer_take_address : '',
}).then(res => {
// console.log('success');
})
} else {
//#endif
uni.openLocation({
latitude: parseFloat(lat),
longitude: parseFloat(long),
scale: 8,
name: item.mer_name,
address: item.take ? item.take.mer_take_address : '',
success: function(res) {
that.go_map = true
},
});
// #ifdef H5
}
//#endif
uni.openLocation({
latitude: parseFloat(lat),
longitude: parseFloat(long),
scale: 8,
name: item.mer_name,
address: item.take ? item.take.mer_take_address : '',
success: function(res) {
that.go_map = true
},
});
// #ifdef H5
}
//#endif
}
}
}
</script>
<style lang="scss" scoped>

File diff suppressed because it is too large Load Diff

View File

@ -110,11 +110,24 @@
<view class="store-name">{{item.merchant.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text>
</view>
<view v-if="item.status == 0" class='t-color'>待发货</view>
<view v-if="item.status == 1" class='t-color'>待收货</view>
<view v-if="item.status == 2" class='t-color'>待评价</view>
<view v-if="item.status == 3" class='t-color'>已完成</view>
<view v-if="item.status == -1" class='t-color'>已退款</view>
<view v-if="item.order_status == 2 &&item.pay_type==0&& item.pay_type !=3"
class='t-color'>待发货</view>
<view v-if="item.order_status == 1 &&item.pay_type==0 && item.pay_type==3"
class='t-color'>待付款</view>
<view v-if="item.order_status == 3" class='t-color'>待收货</view>
<view v-if="item.order_status == 4 && item.pay_type !== 8" class='t-color'>待评价
</view>
<view v-if="item.order_status == 5" class='t-color'>已完成</view>
<view v-if="item.order_status == 6" class='t-color'>已退款</view>
<view v-if="item.order_status == 8 && item.pay_type == 8" class='t-color'>待结算
</view>
</view>
<view v-if="item.activity_type === 2">
<view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index">
@ -185,18 +198,18 @@
<view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view>
</block>
<block v-if="item.status == 2">
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id+'&type='+1" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text>
发布种草
</navigator>
</navigator> -->
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view>
</block>
<block v-if="item.status == 3">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view>
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id+'&type='+1" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text>
发布种草
</navigator>
</navigator> -->
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view>
</block>
</view>

View File

@ -1,7 +1,8 @@
<template>
<view class="refund-list" :style="viewColor">
<view class="tab-box">
<view class="item" v-for="(item,index) in tabList" :key="index" :class="{'active':index == tabIndex}" @click="bindTab(index)">{{item.title}}</view>
<view class="item" v-for="(item,index) in tabList" :key="index" :class="{'active':index == tabIndex}"
@click="bindTab(index)">{{item.title}}</view>
</view>
<view class="goods-wrapper">
<view v-if="goodsList.length > 0">
@ -15,7 +16,9 @@
<view class="product-item" v-for="goods in item.refundProduct" :key="goods.order_product_id">
<image class="img-box" :src="goods.product.cart_info.product.image" mode=""></image>
<view class="msg">
<view class="name line1"><text v-if="goods.product.cart_info.product_type === 2" class="event_name event_bg">预售</text>{{goods.product.cart_info.product.store_name}}</view>
<view class="name line1"><text v-if="goods.product.cart_info.product_type === 2"
class="event_name event_bg">预售</text>{{goods.product.cart_info.product.store_name}}
</view>
<view class="des">{{goods.product.cart_info.productAttr.sku}}</view>
<view class="price">退款{{goods.refund_price}}</view>
<view class="num">x {{goods.refund_num}}</view>
@ -24,7 +27,7 @@
</view>
<view class="btn-box" v-if="item.status == 1">
<view class="btn gray" @click="goDetail(item)">查看详情</view>
<view class="btn" @click="goPage(item.refund_order_id)">退回商品</view>
<view class="btn" @click="goPage(item.refund_order_id)">退回商品</view>
</view>
<view class="btn-box" v-else-if="item.status == -1">
<view class="btn gray" @click="goDetail(item)">查看详情</view>
@ -76,105 +79,135 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
let app = getApp();
import { refundList,refundDel } from '@/api/order.js'
import { mapGetters } from "vuex";
import { configMap } from '@/utils';
export default{
computed:{
import {
refundList,
refundDel
} from '@/api/order.js'
import {
mapGetters
} from "vuex";
import {
configMap
} from '@/utils';
export default {
computed: {
...mapGetters(['viewColor']),
...configMap(['hide_mer_status'])
},
data(){
data() {
return {
tabIndex:0,
tabList:[
{
title:'全部'
tabIndex: 0,
tabList: [{
title: '全部'
},
{
title:'处理中'
title: '处理中'
},
{
title:'已处理'
title: '已处理'
},
],
goodsList:[],
isScroll:true,
page:1,
limit:15,
goodsList: [],
isScroll: true,
page: 1,
limit: 15,
type: 0
}
},
onLoad() {
this.getList();
onLoad(e) {
if (e.type) {
this.type = e.type
this.getList(this.type);
} else {
this.getList();
}
},
onReady(){
},
mounted: function() {
},
methods:{
goStore(item){
if(this.hide_mer_status == 0){
onReady() {},
mounted: function() {},
methods: {
goStore(item) {
if (this.hide_mer_status == 0) {
uni.navigateTo({
url:`/pages/store/home/index?id=${item.merchant.mer_id}`
url: `/pages/store/home/index?id=${item.merchant.mer_id}`
})
}
}
},
goPage(id){
goPage(id) {
uni.navigateTo({
url:'/pages/users/refund/goods/index?id='+id
url: '/pages/users/refund/goods/index?id=' + id
})
},
applyAgain(item){
applyAgain(item) {
uni.navigateTo({
url:`/pages/order_details/index?order_id=${item.refundProduct[0].product.order_id}`
url: `/pages/order_details/index?order_id=${item.refundProduct[0].product.order_id}`
})
},
bindTab(index){
bindTab(index) {
this.tabIndex = index
this.page =1
this.page = 1
this.isScroll = true
this.goodsList = []
this.getList()
},
getList(){
if(!this.isScroll) return
refundList({
type:this.tabIndex,
page:this.page,
limit:this.limit
}).then(({data})=>{
this.isScroll = data.list.length>=this.limit
this.goodsList = this.goodsList.concat(data.list)
this.page+=1
})
getList() {
if (!this.isScroll) return
if (this.type == 0) {
refundList({
type: this.tabIndex,
page: this.page,
limit: this.limit
}).then(({
data
}) => {
this.isScroll = data.list.length >= this.limit
this.goodsList = this.goodsList.concat(data.list)
this.page += 1
})
} else {
refundList({
product_type: this.type,
type: this.tabIndex,
page: this.page,
limit: this.limit
}).then(({
data
}) => {
this.isScroll = data.list.length >= this.limit
this.goodsList = this.goodsList.concat(data.list)
this.page += 1
})
}
},
//
goDetail(item){
goDetail(item) {
uni.navigateTo({
url:'/pages/users/refund/detail?id='+item.refund_order_id
url: '/pages/users/refund/detail?id=' + item.refund_order_id
})
},
//
bindDetele(item,index){
bindDetele(item, index) {
let self = this
uni.showModal({
title: '提示',
content: '确定删除该记录吗?',
success: function (res) {
success: function(res) {
if (res.confirm) {
refundDel(item.refund_order_id).then(res=>{
self.goodsList.splice(index,1)
})
uni.showToast({
title:'删除成功',
icon:'none'
})
refundDel(item.refund_order_id).then(res => {
self.goodsList.splice(index, 1)
})
uni.showToast({
title: '删除成功',
icon: 'none'
})
} else if (res.cancel) {
// console.log('');
}
}
});
}
},
onReachBottom() {
@ -183,15 +216,16 @@
}
</script>
<style lang="scss">
.refund-list{
.tab-box{
.refund-list {
.tab-box {
z-index: 50;
position: fixed;
left: 0;
top: 0;
width: 100%;
display: flex;
.item{
.item {
flex: 1;
display: flex;
justify-content: center;
@ -199,67 +233,80 @@
height: 90rpx;
background-color: #fff;
border-bottom: 1px solid transparent;
&.active{
&.active {
color: var(--view-theme);
border-color: var(--view-theme);
}
}
}
.goods-wrapper{
.goods-wrapper {
margin-top: 102rpx;
}
.info-box{
.info-box {
position: relative;
margin-top: 12rpx;
background-color: #fff;
.title{
.title {
display: flex;
align-items: center;
padding: 0 32rpx;
height: 86rpx;
border-bottom: 1px solid #F0F0F0;
color: #282828;
.icon-shangjiadingdan{
.icon-shangjiadingdan {
font-size: 32rpx;
}
.txt{
margin: 0 5rpx ;
.txt {
margin: 0 5rpx;
}
.icon-xiangyou{
.icon-xiangyou {
color: #999;
font-size: 20rpx;
margin-top: 6rpx;
}
}
.product-box{
.product-item{
.product-box {
.product-item {
display: flex;
padding: 25rpx 30rpx;
.img-box{
width:130rpx;
height:130rpx;
border-radius:16rpx;
.img-box {
width: 130rpx;
height: 130rpx;
border-radius: 16rpx;
}
.msg{
.msg {
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 440rpx;
margin-left: 26rpx;
.name{
.name {
font-size: 28rpx;
color: #282828;
}
.des{
.des {
font-size: 20rpx;
color: #868686;
}
.price{
.price {
font-size: 26rpx;
}
.num{
.num {
position: absolute;
right: -80rpx;
top: 4rpx;
@ -268,61 +315,71 @@
}
}
}
.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;
}
}
.btn-box{
.btn-box {
display: flex;
justify-content: flex-end;
padding:0 20rpx 20rpx;
.btn{
width:176rpx;
height:60rpx;
padding: 0 20rpx 20rpx;
.btn {
width: 176rpx;
height: 60rpx;
line-height: 60rpx;
margin-left: 18rpx;
text-align: center;
background: var(--view-theme);
border-radius:30rpx;
border-radius: 30rpx;
color: #fff;
font-size: 27rpx;
&.gray{
border:1px solid #ddd;
&.gray {
border: 1px solid #ddd;
background: transparent;
color: #aaa;
}
}
}
.status{
.status {
position: absolute;
right: 30rpx;
top: 0;
.iconfont{
.iconfont {
font-size: 120rpx;
opacity: .3;
}
.p-color{
.p-color {
color: var(--view-theme);
}
}
}
}
.event_bg{
.event_bg {
background: #FF7F00;
}
.nothing {
margin-top: 200rpx;
text-align: center;
text-align: center;
}
.nothing_text{
.nothing_text {
margin-top: 20rpx;
color: #999999;
}
</style>
</style>

View File

@ -5,37 +5,52 @@
<view class='list'>
<view class='item acea-row row-between-wrapper'>
<view class='name'>姓名</view>
<input type='text' placeholder='请输入姓名' name='real_name' :value="userAddress.real_name" placeholder-class='placeholder'></input>
<input type='text' placeholder='请输入姓名' name='real_name' :value="userAddress.real_name"
placeholder-class='placeholder'></input>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>联系电话</view>
<input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone' placeholder-class='placeholder'></input>
<input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone'
placeholder-class='placeholder'></input>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>所在地区</view>
<view class="region">
<view class="region_count" @click="changeRegion">
<text v-if="!addressInfo.length" style="color:#cdcdcd;">请选择地</text>
<text v-if="!addressInfo.length" style="color:#cdcdcd;">请选择地</text>
<text v-else>{{addressText}}</text>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>所在村队</view>
<view class="region">
<view class="region_count" @click="changevillage">
<text v-if="!villageInfo.length" style="color:#cdcdcd;">请选择村队</text>
<text v-else>{{villageText}}</text>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>详细地址</view>
<input type='text' class="location-input" placeholder='请填写具体地址' name='detail' placeholder-class='placeholder' v-model="userAddress.detail"></input>
<view class="location" @click="selfLocation">
<input type='text' class="location-input" placeholder='请填写具体地址' name='detail'
placeholder-class='placeholder' v-model="userAddress.detail"></input>
<!--<view class="location" @click="selfLocation">
<text class="iconfont icon-chakanditu"></text>
<br>
定位
</view>
</view> -->
</view>
</view>
<view class='default acea-row row-middle'>
<checkbox-group @change='ChangeIsDefault'>
<checkbox :checked="userAddress.is_default ? true : false" />设置为默认地址</checkbox-group>
<checkbox :checked="userAddress.is_default ? true : false" />设置为默认地址
</checkbox-group>
</view>
<button class='keepBnt' form-type="submit">立即保存</button>
@ -43,12 +58,16 @@
<view class="wechatAddress" v-if="!address_id" @click="getWxAddress">导入微信地址</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="wechatAddress" v-if="this.$wechat.isWeixin() && !address_id" @click="getAddress">导入微信地址</view>
<view class="wechatAddress" v-if="this.$wechat.isWeixin() && !address_id" @click="getAddress">导入微信地址
</view>
<!-- #endif -->
</view>
</form>
<areaWindow ref="areaWindow" :display="display" :address="addressInfo"
@submit="OnChangeAddress" @changeClose="changeClose"></areaWindow>
<areaWindow ref="areaWindow" :display="display" :address="addressInfo" @submit="OnChangeAddress"
@changeClose="changeClose"></areaWindow>
<villageTeam ref="villageTeam" :display="display_one" :address="villageInfo" :villageaddress="list"
@submit="OnChangevAddress" @changeClose="changevClose"></villageTeam>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
@ -63,16 +82,28 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { editAddress, getAddressDetail } from '@/api/user.js';
import { getCityV2, getCityList } from '@/api/api.js';
import { mapGetters } from "vuex";
import {
editAddress,
getAddressDetail
} from '@/api/user.js';
import {
getCityV2,
getCityList
} from '@/api/api.js';
import {
mapGetters
} from "vuex";
import areaWindow from '@/components/areaWindow';
import { getGeocoder } from '@/api/store.js';
import villageTeam from '@/components/villageTeam/villageTeam.vue';
import {
getGeocoder
} from '@/api/store.js';
import authorize from '@/components/Authorize';
export default {
components: {
areaWindow,
authorize,
villageTeam
},
data() {
return {
@ -92,14 +123,21 @@
multiIndex: [0, 0, 0],
cityId: 0,
display: false,
addressInfo:[],
display_one: false,
addressInfo: [],
villageInfo: [],
list: [],
latitude: '',
longitude: ''
};
},
computed: {...mapGetters(['isLogin','viewColor']),
addressText(){
return this.addressInfo.map(v=>v.name).join('/');
computed: {
...mapGetters(['isLogin', 'viewColor']),
addressText() {
return this.addressInfo.map(v => v.name).join('/');
},
villageText() {
return this.villageInfo.map(v => v.name).join('/');
}
},
onLoad(options) {
@ -119,8 +157,13 @@
}
},
methods: {
OnChangeAddress(address){
OnChangeAddress(address) {
this.addressInfo = address;
this.list = address
},
OnChangevAddress(address) {
this.villageInfo = address;
console.log(this.villageInfo)
},
//
getCityList: function() {
@ -129,13 +172,19 @@
this.district = res.data
})
},
changeRegion(){
changeRegion() {
this.display = true;
},
changevillage() {
this.display_one = true;
},
//
changeClose: function() {
this.display = false;
},
changevClose: function() {
this.display_one = false;
},
//
onLoadFun: function() {
this.isShowAuth = false;
@ -155,11 +204,12 @@
if (!this.address_id) return false;
let that = this;
getAddressDetail(this.address_id).then(res => {
let region = [res.data.province, res.data.city, res.data.district];
let region = [res.data.province, res.data.city, res.data.district, res.data.street, res.data.village];
that.$set(that, 'userAddress', res.data);
that.$set(that, 'region', region);
that.city_id = res.data.city_id
that.addressInfo = res.data.area
that.addressInfo = res.data.areas
that.villageInfo = [res.data.brigade]
});
},
//
@ -170,7 +220,8 @@
success: function(res) {
uni.chooseAddress({
success: function(res) {
getCityList(res.provinceName+'/'+res.cityName+'/'+res.countyName).then(res=>{
getCityList(res.provinceName + '/' + res.cityName + '/' + res
.countyName).then(res => {
that.addressInfo = res.data;
})
that.userAddress.real_name = res.userName;
@ -183,9 +234,10 @@
icon: 'none',
duration: 1000
});
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({
title: '取消选择'
});
if (res.errMsg == 'chooseAddress:cancel') return that.$util
.Tips({
title: '取消选择'
});
},
})
},
@ -212,7 +264,7 @@
getAddress() {
let that = this;
that.$wechat.openAddress().then(res => {
getCityList(res.provinceName+'/'+res.cityName+'/'+res.countryName).then(res=>{
getCityList(res.provinceName + '/' + res.cityName + '/' + res.countryName).then(res => {
that.addressInfo = res.data;
})
that.userAddress.real_name = res.userName;
@ -241,11 +293,15 @@
long: longitude
}).then(res => {
const data = res.data;
getCityList(data.address_component.province+'/'+data.address_component.city+'/'+data.address_component.district+'/'+(!data.address_reference.town ? '' : data.address_reference.town.title)).then(res=>{
getCityList(data.address_component.province + '/' + data.address_component
.city + '/' + data.address_component.district + '/' + (!data
.address_reference.town ? '' : data.address_reference.town
.title)).then(res => {
self.addressInfo = res.data;
self.$set(self.userAddress, 'detail', data.formatted_addresses.recommend);
self.$set(self.userAddress, 'detail', data.formatted_addresses
.recommend);
uni.hideLoading();
}).catch(e=>{
}).catch(e => {
uni.hideLoading();
uni.showToast({
title: '定位失败,请手动输入地址',
@ -253,7 +309,7 @@
duration: 1000
});
})
}).catch(e=>{
}).catch(e => {
uni.hideLoading();
uni.showToast({
title: '定位失败,请手动输入地址',
@ -291,13 +347,17 @@
if (!that.addressInfo.length) return that.$util.Tips({
title: '请选择所在地区'
});
if (!that.villageInfo.length) return that.$util.Tips({
title: '请选择所在村队'
});
if (!value.detail) return that.$util.Tips({
title: '请填写详细地址'
});
value.address_id = that.address_id;
value.is_default = that.userAddress.is_default ? 1 : 0;
value.area = that.addressInfo;
value.brigade=that.villageInfo[0]
uni.showLoading({
title: '保存中',
mask: true
@ -323,8 +383,10 @@
that.couponId = '';
uni.$emit('updataAddress')
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data
.address_id) + '&pinkId=' + pinkId + '&couponId=' + couponId
url: '/pages/users/order_confirm/index?cartId=' + cartId +
'&addressId=' + (that.id ? that.id : res.data
.address_id) + '&pinkId=' + pinkId + '&couponId=' +
couponId
});
} else {
// #ifdef H5
@ -353,74 +415,92 @@
<style scoped lang="scss">
/deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked,
/deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid var(--view-theme)!important;
background-color: var(--view-theme)!important;
color: #fff!important;
border: 1px solid var(--view-theme) !important;
background-color: var(--view-theme) !important;
color: #fff !important;
}
.addAddress .list {
background-color: #fff;
}
.addAddress .list .item {
padding: 30rpx;
border-top: 1px solid #eee;
position: relative;
}
.addAddress .list .item .location{
.addAddress .list .item .location {
position: absolute;
right: 30rpx;
top: 15rpx;
text-align: center;
font-size: 20rpx;
.iconfont{
.iconfont {
color: var(--view-theme);
}
}
.addAddress .list .item .name {
width: 195rpx;
font-size: 30rpx;
color: #333;
}
.addAddress .list .item .address {
flex: 1;
margin-left: 20rpx;
}
.addAddress .list .item input,.region .region_count {
.addAddress .list .item input,
.region .region_count {
width: 475rpx;
font-size: 30rpx;
box-sizing: border-box;
}
.region .region_count{
.region .region_count {
height: 42rpx;
line-height: 42rpx;
.icon-xiangyou{
.icon-xiangyou {
float: right;
}
}
.addAddress .list .location-input{
.addAddress .list .location-input {
padding-right: 70rpx;
}
.addAddress .list .item .placeholder {
color: #ccc;
}
.addAddress .list .item picker {
width: 475rpx;
}
.addAddress .list .item picker .picker {
width: 410rpx;
font-size: 30rpx;
}
.addAddress .list .item picker .iconfont {
font-size: 43rpx;
}
.addAddress .default {
padding: 0 30rpx;
height: 90rpx;
background-color: #fff;
margin-top: 23rpx;
}
.addAddress .default checkbox {
margin-right: 15rpx;
}
.addAddress .keepBnt {
width: 690rpx;
height: 86rpx;
@ -432,6 +512,7 @@
color: #fff;
background-color: var(--view-theme);
}
.addAddress .wechatAddress {
width: 690rpx;
height: 86rpx;
@ -443,4 +524,4 @@
color: var(--view-theme);
border: 1px solid var(--view-theme);
}
</style>
</style>

View File

@ -10,10 +10,10 @@
<view class='money'>{{userInfo.now_money || 0}}</view>
</view>
<!-- #ifdef APP-PLUS || H5 -->
<navigator v-if="recharge_switch == 1" url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<!-- #endif -->
<!-- #ifdef MP -->
<view v-if="recharge_switch == 1" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<!-- #endif -->
</view>
<view class='cumulative acea-row row-top'>
@ -52,7 +52,7 @@
</navigator>
</view>
</view>
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>

View File

@ -19,6 +19,7 @@
<view>协议规则</view>
<text class='iconfont icon-you'></text>
</view>
<!-- #ifdef MP -->
<view class='item acea-row row-between-wrapper' @click="Setting">
<view>隐私设置</view>

View File

@ -54,7 +54,7 @@ body {overflow-x: hidden;}
-o-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end
justify-content: flex-end;
}
.acea-row.row-left {
-webkit-box-pack: start;

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,103 +1,184 @@
import { getUserInfo } from "../../api/user.js";
import { LOGIN_STATUS, UID } from '../../config/cache';
import {
getUserInfo,
Appversion
} from "../../api/user.js";
import {
LOGIN_STATUS,
UID
} from '../../config/cache';
import Cache from '../../utils/cache';
import { USER_INFO } from '../../config/cache';
import {
USER_INFO
} from '../../config/cache';
// #ifdef APP-PLUS
import Updater from '@/uni_modules/guyue-updater/index';
// #endif
const state = {
location: Cache.get('LOCATION_DATA',true) || {},
token: Cache.get(LOGIN_STATUS) || null,
backgroundColor: "#fff",
userInfo: null,
uid: Cache.get(UID) || null,
globalData: uni.getStorageSync('GLOBAL_DATA') || {},
homeActive: false,
copyPwd: null,
pageFooter: uni.getStorageSync('pageFoot') || {},
keyColor: Cache.get('KEY_COLOR') || '_default',
viewColor: Cache.get('VIEW_COLOR') ||
'--view-theme: #E93323;--view-assist:#FF7612;--view-priceColor:#E93323;--view-bgColor:rgba(255, 118, 18,.1);--view-minorColor:rgba(233, 51, 35,.1);--view-bntColor11:#FDA923;--view-bntColor12:#FD6523;--view-bntColor21:#F11B09;--view-bntColor22:#F67A38;',
location: Cache.get('LOCATION_DATA', true) || {},
token: Cache.get(LOGIN_STATUS) || null,
backgroundColor: "#fff",
userInfo: null,
uid: Cache.get(UID) || null,
globalData: uni.getStorageSync('GLOBAL_DATA') || {},
homeActive: false,
copyPwd: null,
pageFooter: uni.getStorageSync('pageFoot') || {},
keyColor: Cache.get('KEY_COLOR') || '_default',
viewColor: Cache.get('VIEW_COLOR') ||
'--view-theme: #E93323;--view-assist:#FF7612;--view-priceColor:#E93323;--view-bgColor:rgba(255, 118, 18,.1);--view-minorColor:rgba(233, 51, 35,.1);--view-bntColor11:#FDA923;--view-bntColor12:#FD6523;--view-bntColor21:#F11B09;--view-bntColor22:#F67A38;',
};
const mutations = {
setLocation(state, data) {
// console.log(data);
state.location = data
Cache.set('LOCATION_DATA', data);
},
LOGIN(state, opt) {
state.token = opt.token;
Cache.set(LOGIN_STATUS, opt.token, opt.time);
uni.removeStorageSync('auth_token');
},
SETUID(state, val) {
state.uid = val;
Cache.set(UID, val);
},
UPDATE_LOGIN(state, token) {
state.token = token;
},
LOGOUT(state) {
state.token = null;
state.uid = null
Cache.clear(LOGIN_STATUS);
Cache.clear(UID);
},
BACKGROUND_COLOR(state, color) {
state.color = color;
document.body.style.backgroundColor = color;
},
UPDATE_USERINFO(state, userInfo, time) {
userInfo.isNew && Cache.set('is_new_user', '1')
state.userInfo = userInfo;
},
OPEN_HOME(state) {
state.homeActive = true;
},
CLOSE_HOME(state) {
state.homeActive = false;
},
PARSE_PWD(state, pwd) {
state.copyPwd = pwd;
},
VIEW_COLOR(state, color) {
Cache.set('VIEW_COLOR', color)
state.viewColor = color;
},
KEY_COLOR(state, key) {
Cache.set('KEY_COLOR', key)
state.keyColor = key;
},
GLOBAL_DATA(state, key) {
uni.setStorageSync('GLOBAL_DATA', key);
state.globalData = key;
},
FOOT_UPLOAD(state, data) {
state.pageFooter = data
}
setLocation(state, data) {
state.location = data
Cache.set('LOCATION_DATA', data);
},
LOGIN(state, opt) {
state.token = opt.token;
Cache.set(LOGIN_STATUS, opt.token, opt.time);
uni.removeStorageSync('auth_token');
},
SETUID(state, val) {
state.uid = val;
Cache.set(UID, val);
},
UPDATE_LOGIN(state, token) {
state.token = token;
},
LOGOUT(state) {
state.token = null;
state.uid = null
Cache.clear(LOGIN_STATUS);
Cache.clear(UID);
},
BACKGROUND_COLOR(state, color) {
state.color = color;
document.body.style.backgroundColor = color;
},
UPDATE_USERINFO(state, userInfo, time) {
userInfo.isNew && Cache.set('is_new_user', '1')
state.userInfo = userInfo;
},
OPEN_HOME(state) {
state.homeActive = true;
},
CLOSE_HOME(state) {
state.homeActive = false;
},
PARSE_PWD(state, pwd) {
state.copyPwd = pwd;
},
VIEW_COLOR(state, color) {
Cache.set('VIEW_COLOR', color)
state.viewColor = color;
},
KEY_COLOR(state, key) {
Cache.set('KEY_COLOR', key)
state.keyColor = key;
},
GLOBAL_DATA(state, key) {
uni.setStorageSync('GLOBAL_DATA', key);
state.globalData = key;
},
FOOT_UPLOAD(state, data) {
state.pageFooter = data
}
};
const actions = {
USERINFO({
state,
commit
}, force) {
if (state.userInfo !== null && !force)
return Promise.resolve(state.userInfo);
else
return new Promise(reslove => {
getUserInfo().then(res => {
commit("UPDATE_USERINFO", res.data);
Cache.set(USER_INFO, res.data);
reslove(res.data);
});
}).catch(() => {
USERINFO({
state,
commit
}, force) {
if (state.userInfo !== null && !force)
return Promise.resolve(state.userInfo);
else
return new Promise(reslove => {
getUserInfo().then(res => {
commit("UPDATE_USERINFO", res.data);
Cache.set(USER_INFO, res.data);
reslove(res.data);
});
}).catch(() => {
});
}
});
},
async INIT_CONFIG({
state,
commit
}, data = false) {
const wgt_v = uni.getStorageSync('wgt_version') || '1.0.0';
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync();
let apptype;
if (os.osName == 'ios') {
apptype = 2
} else {
apptype = 1
}
Appversion({
version: os.appWgtVersion,
type: apptype
}).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) {
if(res.data.appInfo.version) uni.showLoading({
title: '检查更新中'
})
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
}
uni.hideLoading();
}
}
}).catch((err) => {
// console.log(err)
})
// #endif
}
};
function compareVersions(version1, version2) {
const arr1 = version1.split('.').map(Number);
const arr2 = version2.split('.').map(Number);
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
const num1 = i < arr1.length ? arr1[i] : 0;
const num2 = i < arr2.length ? arr2[i] : 0;
if (num1 > num2) {
return 1;
} else if (num1 < num2) {
return -1;
}
}
return 0;
}
export default {
state,
mutations,
actions
state,
mutations,
actions
};

View File

@ -13,8 +13,8 @@
*/
@import '@/uni_modules/uview-ui/theme.scss';
/* 颜色变量 */
$uni-theme-color: #F45846;
$uni-theme-bg-color: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
$uni-theme-color: #f45846;
$uni-theme-bg-color: linear-gradient(180deg, #f98649 0%, #f34e45 100%);
/* 行为相关颜色 */
$uni-color-primary: #007aff;
@ -24,31 +24,31 @@ $uni-color-error: #dd524d;
$uni-nothing-text: #999; //空白页文字
$theme-color:#E93323;
$theme-color-opacity:rgba(233,51,35,.6);
$theme-color: #e93323;
$theme-color-opacity: rgba(233, 51, 35, 0.6);
$bg-star: #f62c2c;
$bg-end:#f96e29;
$bg-end: #f96e29;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
$uni-bg-color: #ffffff;
$uni-bg-color-grey: #f8f8f8;
$uni-bg-color-hover: #f1f1f1; //点击状态颜色
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
$uni-border-color: #c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24upx;
$uni-font-size-base:28upx;
$uni-font-size-lg:32upx;
$uni-font-size-sm: 24upx;
$uni-font-size-base: 28upx;
$uni-font-size-lg: 32upx;
/* 图片尺寸 */
$uni-img-size-sm:40upx;
$uni-img-size-base:52upx;
$uni-img-size-lg:80upx;
$uni-img-size-sm: 40upx;
$uni-img-size-base: 52upx;
$uni-img-size-lg: 80upx;
/* Border Radius */
$uni-border-radius-sm: 4upx;
@ -70,9 +70,9 @@ $uni-spacing-col-lg: 24upx;
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40upx;
$uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title: 40upx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30upx;
$uni-font-size-subtitle: 36upx;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 30upx;

File diff suppressed because one or more lines are too long