老版本代码
This commit is contained in:
parent
30449aaf6d
commit
c80c66353c
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
node_modules
|
||||
/dist
|
||||
.hbuilderx
|
||||
unpackage
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
|
757
App.vue
757
App.vue
@ -1,371 +1,426 @@
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | 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 CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
// #ifdef APP-PLUS
|
||||
let 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';
|
||||
|
||||
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 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()
|
||||
|
||||
},
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 语音播报
|
||||
*
|
||||
*
|
||||
*/
|
||||
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: -40rpx;
|
||||
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.syspadding {
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
.bg-color-red {
|
||||
background-color: #e93323 !important;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.syspadding {
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
.uni-scroll-view::-webkit-scrollbar {
|
||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||
display: none
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
.uni-scroll-view::-webkit-scrollbar {
|
||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||
display: none
|
||||
}
|
||||
|
||||
::-moz-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.empty-txt {
|
||||
line-height: 100rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
::-moz-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.product-con .conter img {
|
||||
display: block;
|
||||
}
|
||||
.empty-txt {
|
||||
line-height: 100rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.open-location {
|
||||
height: 100vh;
|
||||
}
|
||||
.product-con .conter img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
uni-tabbar {
|
||||
bottom: 0;
|
||||
}
|
||||
.open-location {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/*#endif*/
|
||||
uni-tabbar {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/*#endif*/
|
||||
</style>
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
143
api/admin.js
143
api/admin.js
@ -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}`);
|
||||
}
|
18
api/api.js
18
api/api.js
@ -268,4 +268,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 });
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
// 支付状态订单
|
||||
|
@ -13,7 +13,12 @@ import request from "@/utils/request.js";
|
||||
* 获取商品详情
|
||||
*/
|
||||
export const getProductDetailsAPI = (data) => request.get('micro/product_details', 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
|
||||
*/
|
||||
|
@ -467,7 +467,7 @@ export function getGeocoder(data) {
|
||||
*
|
||||
*/
|
||||
export function getStoreTypeApi() {
|
||||
return request.get('intention/type', {}, {
|
||||
return request.get('intention/type', {sift_store:1}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
@ -707,4 +707,8 @@ export function hasServiceApi(id) {
|
||||
*/
|
||||
export function getBankInfo() {
|
||||
return request.get(`user/extract/history_bank`)
|
||||
}
|
||||
// 商户账单管理
|
||||
export function getBillDetil() {
|
||||
return request.get(`mer/financial_record`)
|
||||
}
|
@ -1,16 +1,33 @@
|
||||
<template>
|
||||
<view :style="viewColor">
|
||||
<view class="address-window" :class="address.address==true?'on':''">
|
||||
<view class='title'>选择地址<text class='iconfont icon-guanbi' @tap='close'></text></view>
|
||||
<view class='title'>收货地址
|
||||
|
||||
<!-- <text class='iconfont icon-guanbi' @tap='close'></text> -->
|
||||
<view class="top_img">
|
||||
<image src="@/static/images/close.png" mode="aspectFill" @tap='close'></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class='list'>
|
||||
<view class='item acea-row row-between-wrapper' :class='active==index?"t-color":""' v-for="(item,index) in addressList"
|
||||
@tap='tapAddress(index,item.address_id)' :key='index'>
|
||||
<text class='iconfont icon-ditu' :class='active==index?"t-color":""'></text>
|
||||
<view class='acea-row row-between-wrapper conent' :class='active==index?"t-color":""'
|
||||
v-for="(item,index) in addressList" @tap='tapAddress(index,item.address_id)' :key='index'>
|
||||
|
||||
<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='name' >{{item.real_name}}<text
|
||||
class='phone'>{{item.phone}}</text></view>
|
||||
<view class='line1'>
|
||||
{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.brigade}}{{item.detail}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <text class='iconfont icon-complete' :class='active==index?"t-color":""'></text> -->
|
||||
|
||||
<view class="address_img" v-if="active==index">
|
||||
<image src="@/static/images/isshow.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="address_img" v-if="active!=index">
|
||||
<image src="@/static/images/show.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<text class='iconfont icon-complete' :class='active==index?"t-color":""'></text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 无地址 -->
|
||||
@ -18,7 +35,7 @@
|
||||
<image src='../../static/images/noAddress.png'></image>
|
||||
<view>暂无地址</view>
|
||||
</view>
|
||||
<view class='addressBnt' @tap='goAddressPages'>添加新地址</view>
|
||||
<view class='addressBnt' @tap='goAddressPages'>新增地址</view>
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view>
|
||||
</view>
|
||||
@ -34,8 +51,12 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import { getAddressList } from '@/api/user.js';
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
getAddressList
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
pagesUrl: {
|
||||
@ -112,9 +133,11 @@
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
|
||||
.address-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.address-window .title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
@ -122,16 +145,32 @@
|
||||
height: 123rpx;
|
||||
line-height: 123rpx;
|
||||
position: relative;
|
||||
|
||||
.top_img {
|
||||
position: absolute;
|
||||
right: 33rpx;
|
||||
top: 20rpx;
|
||||
width: 58rpx;
|
||||
height: 58rpx;
|
||||
|
||||
image {
|
||||
width: 58rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.address-window .title .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
color: #8a8a8a;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
.address-window .list{
|
||||
|
||||
.address-window .list {
|
||||
max-height: 650rpx;
|
||||
}
|
||||
|
||||
.address-window .list .item {
|
||||
margin-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
@ -140,29 +179,55 @@
|
||||
font-size: 25rpx;
|
||||
color: #333;
|
||||
}
|
||||
.address-window .list .item .iconfont {
|
||||
font-size: 37rpx;
|
||||
color: #2c2c2c;
|
||||
.conent{
|
||||
width: 694rpx;
|
||||
height: 210rpx;
|
||||
background: #FFFFFF;
|
||||
margin: 0rpx auto;
|
||||
margin-top: 32rpx;
|
||||
padding: 28rpx 28rpx;
|
||||
box-shadow: 0px 4rpx 14rpx 2rpx rgba(222,233,254,1);
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.address-window .list .item .iconfont.icon-complete {
|
||||
|
||||
|
||||
|
||||
.address_img{
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.conent .name {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.address-window .list .item .address {
|
||||
width: 560rpx;
|
||||
}
|
||||
.address-window .list .item .address .name {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #282828;
|
||||
margin-bottom: 4rpx;
|
||||
color: #333333;
|
||||
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.address-window .list .item .address .name .phone {
|
||||
|
||||
.conent .name .phone {
|
||||
margin-left: 18rpx;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.line1{
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
|
||||
}
|
||||
|
||||
.address-window .addressBnt {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
font-size: 33rpx;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
@ -170,19 +235,24 @@
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
margin: 85rpx auto;
|
||||
background-color: var(--view-theme);
|
||||
background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
|
||||
}
|
||||
|
||||
.address-window .pictrue {
|
||||
text-align: center;
|
||||
}
|
||||
.address-window .pictrue image,.address-window .pictrue uni-image {
|
||||
|
||||
.address-window .pictrue image,
|
||||
.address-window .pictrue uni-image {
|
||||
width: 414rpx;
|
||||
height: 305rpx;
|
||||
}
|
||||
.address-window .pictrue view{
|
||||
|
||||
.address-window .pictrue view {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.t-color {
|
||||
color: var(--view-theme)!important;
|
||||
color: var(--view-theme) !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -1,259 +1,558 @@
|
||||
<template>
|
||||
<view :style="viewColor">
|
||||
<view class="address-window" :class="display==true?'on':''">
|
||||
<view class='title'>请选择所在地区<text class='iconfont icon-guanbi' @tap='close'></text></view>
|
||||
<view class="address-count">
|
||||
<view class="address-selected">
|
||||
<view v-for="(item,index) in selectedArr" :key="index" class="selected-list" :class="{active:index === selectedIndex}" @click="change(item.parent_id, index)">
|
||||
{{item.name}}
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
<view class="selected-list" :class="{active:-1 === selectedIndex}" v-if="showMore" @click="change(-1, -1)">
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
请选择
|
||||
</view>
|
||||
<uni-popup type="bottom" ref="areaChoose">
|
||||
<view class="mian getHeight" id="main">
|
||||
<view class="top getHeight" id="top">
|
||||
<text>请选择所在地区</text>
|
||||
<!-- <text class="iconfont close" @click.stop="close"></text> -->
|
||||
<view class="top_img">
|
||||
<image src="@/static/images/close.png" mode="aspectFill" @click.stop="close"></image>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x="true" @scroll="scroll" :show-scrollbar="false" class="nav getHeight" id="nav"
|
||||
:scroll-into-view="scrollIntoView">
|
||||
<view @click="areaSelect(index)" :class="areaIndex == index ? 'nav-item nav-item-a' : 'nav-item'"
|
||||
v-for="(item, index) in list" :key="index" :id="'area' + index">
|
||||
<text>{{ item }}</text>
|
||||
</view>
|
||||
<view class="bottomBorder" :style="'left:' + navBottomLeft + 'px'"></view>
|
||||
</scroll-view>
|
||||
<swiper class="swiper getHeight" :disable-touch="true" :current="current"
|
||||
:style="'height:' + swiperH + 'px'">
|
||||
<swiper-item v-for="(type, idx) in [1,2,3,4,5]" :key="idx" :id="'sw'+type">
|
||||
<scroll-view scroll-y="true" scroll-with-animation scroll-anchoring :scroll-into-view='id2'
|
||||
@scroll="scroll" :show-scrollbar="false" class="swiper-list">
|
||||
<view class="area-item" v-for="(item, index) in getList" :key="index" :id="'area' + index">
|
||||
|
||||
<text :class="id == item.pinyin+type ? 'area-item-id area-item-id-sticky': 'area-item-id'"
|
||||
:id='item.pinyin+type'>{{ item.pinyin }}</text>
|
||||
|
||||
<view class="swiper-list2">
|
||||
|
||||
|
||||
<view class="" v-if='typeof(item.data)=="object"'>
|
||||
|
||||
<text
|
||||
:class="proCode.code == item.data[0].code ? 'area-item-name area-item-name-a' : 'area-item-name'"
|
||||
@click="itemSelect(item, idx)">
|
||||
|
||||
|
||||
|
||||
|
||||
{{ item.data.name }}
|
||||
|
||||
</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<text
|
||||
:class="proCode.code == item2.code || cityCode.code == item2.code || disCode.code == item2.code || townCode.code == item2.code || streeCode.code == item2.code? 'area-item-name area-item-name-a' : 'area-item-name'"
|
||||
@click="itemSelect(item2, idx)" v-for="(item2, index2) in item.data"
|
||||
:key="index2">
|
||||
|
||||
<!-- <text class="iconfont"
|
||||
v-if="proCode == item2.code || cityCode == item2.code || disCode == item2.code"></text> -->
|
||||
{{ item2.name }}
|
||||
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="slider-right">
|
||||
<view class="slider-list">
|
||||
<text class="slider-item"
|
||||
v-for="(item, index) in (areaIndex == 0 ? provinceList : areaIndex == 1 ? cityList : areaIndex == 2 ? disList : townList)"
|
||||
:key="index" @click="sliderSelect(item.pinyin +(areaIndex+1))">{{ item.pinyin }}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" :scroll-top="scrollTop" class="address-list" @scroll="scroll">
|
||||
<view v-for="(item,index) in addressList" :key="index" class="list" :class="{active:item.id === activeId}" @click="selected(item)">
|
||||
<text class="item-name">{{item.name}}</text>
|
||||
<text v-if="item.id === activeId" class="iconfont icon-duihao2"></text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='display==false' @tap='close'></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {getAddressList} from '@/api/user.js';
|
||||
import { getCityV2 } from '@/api/api.js';
|
||||
import { mapGetters } from "vuex";
|
||||
const CACHE_ADDRESS = {};
|
||||
import {
|
||||
getAddressList
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
village
|
||||
} from '@/api/api.js';
|
||||
export default {
|
||||
name: 'area-choose',
|
||||
props: {
|
||||
display: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
address: Array,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
//地址列表
|
||||
addressList: [],
|
||||
selectedArr: [],
|
||||
selectedIndex: -1,
|
||||
is_loading: false,
|
||||
old: { scrollTop: 0 },
|
||||
scrollTop: 0
|
||||
list: ['请选择', '', '', '', ''],
|
||||
areaIndex: 0,
|
||||
navBottomLeft: 0,
|
||||
scrollIntoView: 'area0',
|
||||
code: '440100',
|
||||
provinceList: [], //省
|
||||
proCode: -1,
|
||||
cityList: [],
|
||||
cityCode: -1,
|
||||
disList: [],
|
||||
disCode: -1,
|
||||
townList: [],
|
||||
townCode: -1,
|
||||
streeCode: -1,
|
||||
streeList: [],
|
||||
areaCode: -1,
|
||||
areaList: [],
|
||||
swiperH: 300, //列表高
|
||||
current: 0, //当前滑块
|
||||
id: '', //地址编号A、B、C、...
|
||||
id2: '',
|
||||
scrollTopList: [{
|
||||
id: 'A',
|
||||
top: 0
|
||||
}],
|
||||
scrollTopListAll: {}
|
||||
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters(['viewColor']),
|
||||
activeId(){
|
||||
return this.selectedIndex == -1 ? 0 : this.selectedArr[this.selectedIndex].id
|
||||
},
|
||||
showMore(){
|
||||
return this.selectedArr.length ? this.selectedArr[this.selectedArr.length - 1].snum > 0 : true
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
address(n){
|
||||
this.selectedArr = n ? [...n] : []
|
||||
},
|
||||
display(n){
|
||||
if(!n) {
|
||||
this.addressList = [];
|
||||
this.selectedArr = this.address ? [...this.address] : [];
|
||||
this.selectedIndex = -1;
|
||||
this.is_loading = false;
|
||||
}else{
|
||||
this.loadAddress(0)
|
||||
}
|
||||
}
|
||||
onLoad() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.loadAddress(0)
|
||||
|
||||
this.getData();
|
||||
},
|
||||
computed: {
|
||||
getList() {
|
||||
|
||||
return this.areaIndex == 0 ? this.provinceList : this.areaIndex == 1 ? this.cityList : this.areaIndex ==
|
||||
2 ? this.disList : this.areaIndex ==
|
||||
3 ? this.townList : this.areaIndex ==
|
||||
4 ? this.streeList : this.areaList
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
change(pid,index){
|
||||
if(this.selectedIndex == index) return;
|
||||
if(pid === -1){
|
||||
pid = this.selectedArr.length ? this.selectedArr[this.selectedArr.length -1].id : 0;
|
||||
}
|
||||
this.selectedIndex = index;
|
||||
this.loadAddress(pid);
|
||||
close() {
|
||||
this.$refs.areaChoose.close()
|
||||
},
|
||||
loadAddress(pid){
|
||||
if(CACHE_ADDRESS[pid]){
|
||||
this.addressList = CACHE_ADDRESS[pid];
|
||||
return ;
|
||||
show() {
|
||||
|
||||
|
||||
this.$refs.areaChoose.open();
|
||||
if(this.address.length>0){
|
||||
this.list = this.address
|
||||
}
|
||||
this.is_loading = true;
|
||||
getCityV2(pid).then(res=>{
|
||||
this.is_loading = false;
|
||||
CACHE_ADDRESS[pid] = res.data;
|
||||
this.addressList = res.data;
|
||||
})
|
||||
this.goTop()
|
||||
},
|
||||
selected(item){
|
||||
if(this.is_loading) return;
|
||||
if(this.selectedIndex > -1){
|
||||
this.selectedArr.splice(this.selectedIndex + 1,999)
|
||||
this.selectedArr[this.selectedIndex] = item;
|
||||
this.selectedIndex = -1;
|
||||
}else if(!item.parent_id){
|
||||
this.selectedArr = [item];
|
||||
}else{
|
||||
this.selectedArr.push(item);
|
||||
}
|
||||
if(item.snum){
|
||||
this.loadAddress(item.id);
|
||||
|
||||
|
||||
if (!this.provinceList) {
|
||||
this.getData();
|
||||
} else {
|
||||
this.$emit('submit', [...this.selectedArr]);
|
||||
this.$emit('changeClose');
|
||||
this.getScrollT(0, this.provinceList.length)
|
||||
this.current = 0;
|
||||
|
||||
this.$nextTick(()=>{
|
||||
setTimeout(() => {
|
||||
this.areaSelect(0);
|
||||
}, 300)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
this.goTop()
|
||||
|
||||
|
||||
this.$nextTick(()=>{
|
||||
setTimeout(() => {
|
||||
this.getSwiperH();
|
||||
}, 300)
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
close: function() {
|
||||
this.$emit('changeClose');
|
||||
onchange(e) {
|
||||
const value = e.detail.value;
|
||||
},
|
||||
scroll : function(e) {
|
||||
this.old.scrollTop = e.detail.scrollTop
|
||||
scroll(e) {
|
||||
this.scrollTopList.some((item, index) => {
|
||||
if (e.detail.scrollTop > item.top) {
|
||||
this.id = item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
goTop: function(e) {
|
||||
this.scrollTop = this.old.scrollTop
|
||||
this.$nextTick(() => {
|
||||
this.scrollTop = 0
|
||||
});
|
||||
}
|
||||
areaSelect(index) {
|
||||
// 选中头部地址项
|
||||
this.areaIndex = index;
|
||||
this.current = index;
|
||||
//自动滚动
|
||||
this.scrollIntoView = 'area' + index;
|
||||
let widthAll = 0;
|
||||
for (let i = 0; i < index + 1; i++) {
|
||||
var query = uni.createSelectorQuery().in(this);
|
||||
var idView = '#area' + i;
|
||||
query.select(idView).boundingClientRect();
|
||||
query.exec(res => {
|
||||
|
||||
if(res[0]!=null){
|
||||
|
||||
if (i < index) {
|
||||
widthAll += res[0].width;
|
||||
}
|
||||
if (i == index ) {
|
||||
this.navBottomLeft = widthAll + (res[0].width - uni.upx2px(60)) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
this.scrollTopList = this.scrollTopListAll[index]
|
||||
},
|
||||
sliderSelect(id) {
|
||||
this.id2 = id
|
||||
},
|
||||
getSwiperH() {
|
||||
var query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.selectAll('.getHeight')
|
||||
.boundingClientRect()
|
||||
.exec(res => {
|
||||
if (res[0].length > 0) {
|
||||
this.swiperH = res[0][0].height - res[0][1].height - res[0][2].height - uni.upx2px(20);
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.getSwiperH();
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
},
|
||||
getScrollT(type, length) {
|
||||
var query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.selectAll('#sw' + (type + 1) + ' .area-item-id')
|
||||
.boundingClientRect()
|
||||
.exec(res => {
|
||||
if (res[0].length == length) {
|
||||
this.scrollTopList = []
|
||||
|
||||
|
||||
let firstTop = res[0][0].top
|
||||
res[0].forEach((item, index) => {
|
||||
let obj = {
|
||||
id: item.id,
|
||||
top: item.top - firstTop
|
||||
}
|
||||
this.scrollTopList.push(obj)
|
||||
})
|
||||
this.scrollTopListAll[type] = this.scrollTopList
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.getScrollT(type, length)
|
||||
}, 200)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
itemSelect(item, type) {
|
||||
|
||||
switch (type) {
|
||||
|
||||
case 0:
|
||||
this.proCode = item;
|
||||
|
||||
break;
|
||||
case 1:
|
||||
this.cityCode = item;
|
||||
break;
|
||||
case 2:
|
||||
this.disCode = item;
|
||||
break;
|
||||
case 3:
|
||||
this.townCode = item;
|
||||
break;
|
||||
case 4:
|
||||
this.streeCode = item;
|
||||
break;
|
||||
case 5:
|
||||
this.areaCode = item;
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.list.forEach((item2, index2) => {
|
||||
|
||||
if (index2 == type) {
|
||||
|
||||
this.$set(this.list, type, item.name)
|
||||
|
||||
if (index2 < 4) {
|
||||
this.$set(this.list, type + 1, '请选择');
|
||||
|
||||
this.getData(item.code, type + 1);
|
||||
|
||||
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.areaSelect(type);
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
if (index2 > type + 1) {
|
||||
this.$set(this.list, index2, '');
|
||||
}
|
||||
});
|
||||
if (type == 4) {
|
||||
|
||||
|
||||
this.$refs.areaChoose.close()
|
||||
// this.$emit('areaComplete', {
|
||||
// address: this.list.join(''),
|
||||
|
||||
// proCode: this.proCode,
|
||||
// cityCode: this.cityCode,
|
||||
// disCode: this.disCode,
|
||||
// streeCode: this.townCode,
|
||||
// areaCode: this.streeCode
|
||||
// })
|
||||
this.$emit('areaComplete', [this.proCode, this.cityCode, this.disCode, this.townCode, this.streeCode]
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getData(code = '', type = 0) {
|
||||
console.log(type)
|
||||
let obj;
|
||||
if (type == 0) {
|
||||
obj = {
|
||||
|
||||
pinyin: 1
|
||||
|
||||
}
|
||||
|
||||
} else if (type == 1) {
|
||||
obj = {
|
||||
province_code: code,
|
||||
pinyin: 1
|
||||
|
||||
}
|
||||
|
||||
} else if (type == 2) {
|
||||
obj = {
|
||||
city_code: code,
|
||||
pinyin: 1
|
||||
|
||||
}
|
||||
} else if (type == 3) {
|
||||
obj = {
|
||||
area_code: code,
|
||||
pinyin: 1
|
||||
|
||||
}
|
||||
} else {
|
||||
obj = {
|
||||
street_code: code,
|
||||
pinyin: 1
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
village(obj).then(res => {
|
||||
|
||||
if (res.data.length == 0) {
|
||||
this.$refs.areaChoose.close()
|
||||
}
|
||||
res.data.sort((a,b)=>{
|
||||
|
||||
return a.pinyin.localeCompare(b.pinyin)
|
||||
})
|
||||
switch (type) {
|
||||
|
||||
case 0:
|
||||
this.provinceList = res.data;
|
||||
break;
|
||||
case 1:
|
||||
this.cityList = res.data;
|
||||
break;
|
||||
case 2:
|
||||
this.disList = res.data;
|
||||
break;
|
||||
case 3:
|
||||
this.townList = res.data;
|
||||
break;
|
||||
case 4:
|
||||
this.streeList = res.data;
|
||||
break;
|
||||
case 5:
|
||||
this.areaList = res.data;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
if (res.data.length > 0) {
|
||||
this.getScrollT(type, res.data.length)
|
||||
}
|
||||
this.current = type;
|
||||
this.areaSelect(type);
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.address-window {
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
.mian {
|
||||
height: 85vh;
|
||||
width: 100%;
|
||||
z-index: 101;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
.address-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.address-window .title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
height: 123rpx;
|
||||
line-height: 123rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
position: relative;
|
||||
}
|
||||
.address-window .title .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
color: #8a8a8a;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
.address-count{
|
||||
.address-selected{
|
||||
padding: 0 30rpx;
|
||||
margin-top: 10rpx;
|
||||
position: relative;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #f7f7f7;
|
||||
}
|
||||
.selected-list{
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
line-height: 50rpx;
|
||||
padding-bottom: 10rpx;
|
||||
padding-left: 60rpx;
|
||||
position: relative;
|
||||
&.active{
|
||||
color: #e28d54;
|
||||
}
|
||||
&:before,&:after{
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
&:before{
|
||||
width: 4rpx;
|
||||
height: 100%;
|
||||
background-color: var(--view-theme);
|
||||
top: 0;
|
||||
left: 10rpx;
|
||||
}
|
||||
&:after{
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
background: var(--view-theme);
|
||||
border-radius: 100%;
|
||||
left: 6rpx;
|
||||
top: 50%;
|
||||
margin-top: -8rpx;
|
||||
}
|
||||
&:first-child,&:last-child{
|
||||
&:before{
|
||||
height: 50%;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
padding: 40rpx 30rpx 30rpx;
|
||||
|
||||
.top_img {
|
||||
width: 58rpx;
|
||||
height: 58rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
&:first-child{
|
||||
&:before{
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.nav {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 0rpx 20rpx;
|
||||
|
||||
.bottomBorder {
|
||||
position: absolute;
|
||||
width: 60rpx;
|
||||
height: 6rpx;
|
||||
// background-image: linear-gradient(to right, red, white);
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
.iconfont{
|
||||
font-size: 20rpx;
|
||||
float: right;
|
||||
color: #dddddd;
|
||||
|
||||
.nav-item {
|
||||
padding: 10rpx 20rpx;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #3274F9 !important;
|
||||
}
|
||||
|
||||
.nav-item-a {
|
||||
// color: rgb(201, 22, 35);
|
||||
}
|
||||
}
|
||||
scroll-view{
|
||||
height: 550rpx;
|
||||
}
|
||||
.address-list{
|
||||
padding: 0 30rpx;
|
||||
|
||||
.swiper {
|
||||
height: 1000rpx;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
.list{
|
||||
.iconfont{
|
||||
float: right;
|
||||
color: #ddd;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.item-name{
|
||||
display: inline-block;
|
||||
line-height: 50rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
&.active{
|
||||
color: #e28d54;
|
||||
.iconfont{
|
||||
color: #e28d54;
|
||||
|
||||
.swiper-list {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.area-item {
|
||||
font-size: 28rpx;
|
||||
|
||||
.area-item-id {
|
||||
padding: 20rpx 44rpx;
|
||||
// border-bottom: 1rpx solid #f0ecf2;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.area-item-id-sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: #FFFFFF;
|
||||
transition: all 0.1s;
|
||||
|
||||
}
|
||||
|
||||
.swiper-list2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
.area-item-name {
|
||||
padding: 20rpx 40rpx 0;
|
||||
font-weight: 400;
|
||||
|
||||
.iconfont {
|
||||
color: rgb(201, 22, 35);
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.area-item-name-a {
|
||||
color: rgb(201, 22, 35);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.slider-right {
|
||||
|
||||
position: absolute;
|
||||
right: 0rpx;
|
||||
top: 80rpx;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
|
||||
.slider-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: #F4F7FE;
|
||||
border-radius: 20rpx;
|
||||
font-size: 23rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.slider-item {
|
||||
padding: 10rpx 10rpx;
|
||||
font-size: 18rpx;
|
||||
color: #24292E;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -24,8 +24,9 @@
|
||||
<!--定金预售-->
|
||||
<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="right-btn-box event_box" >
|
||||
|
||||
<view class="btn-item" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&&evaluate>=0 && evaluate != 1&& evaluate == 2" @click.stop="refund(item)">申请退款</view>
|
||||
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view>
|
||||
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view>
|
||||
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
|
||||
@ -70,10 +71,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-btn-box">
|
||||
<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_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' v-if='item.is_reply==0 && evaluate==2 && item.refund_num > 0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
|
||||
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
|
||||
</view>
|
||||
|
@ -78,6 +78,7 @@
|
||||
});
|
||||
},
|
||||
goPay: function(number, paytype) {
|
||||
console.log(this.payMode);
|
||||
if (this.isCall) {
|
||||
return this.$emit('onChangeFun', {
|
||||
action: 'payCheck',
|
||||
@ -98,6 +99,7 @@
|
||||
// #endif
|
||||
} else if (paytype == 'balance') {
|
||||
type = 'balance';
|
||||
console.log('123');
|
||||
}else if(paytype == 'alipay'){
|
||||
// #ifndef MP
|
||||
type = 'alipay';
|
||||
@ -105,6 +107,9 @@
|
||||
// #ifdef MP
|
||||
type = 'alipayQr';
|
||||
// #endif
|
||||
}else if(paytype =='creditBuy'){
|
||||
console.log('123123');
|
||||
type='creditBuy'
|
||||
}
|
||||
if (!that.order_id) return that.$util.Tips({
|
||||
title: '请选择要支付的订单'
|
||||
@ -375,7 +380,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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -9,9 +9,11 @@
|
||||
<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">
|
||||
|
@ -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,
|
||||
};
|
@ -2,8 +2,8 @@
|
||||
"name" : "惠农生活",
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.15",
|
||||
"versionCode" : 138,
|
||||
"versionName" : "1.0.18",
|
||||
"versionCode" : 142,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@ -26,7 +26,8 @@
|
||||
"Camera" : {},
|
||||
"Geolocation" : {},
|
||||
"Payment" : {},
|
||||
"Share" : {}
|
||||
"Share" : {},
|
||||
"OAuth" : {}
|
||||
},
|
||||
"safearea" : {
|
||||
"bottom" : {
|
||||
@ -111,9 +112,7 @@
|
||||
"__platform__" : [ "ios", "android" ]
|
||||
}
|
||||
},
|
||||
"oauth" : {
|
||||
"apple" : {}
|
||||
},
|
||||
"oauth" : {},
|
||||
"ad" : {}
|
||||
},
|
||||
"icons" : {
|
||||
|
2820
pages.json
2820
pages.json
File diff suppressed because it is too large
Load Diff
@ -1,348 +1,578 @@
|
||||
<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
|
||||
}
|
||||
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
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
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>
|
@ -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>
|
||||
@ -148,6 +148,12 @@
|
||||
<view style="height:120upx;"></view>
|
||||
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
|
||||
<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,23 @@
|
||||
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
|
||||
确认付款
|
||||
</view>
|
||||
<view class="bnt delivery" @click="toPostagequ(orderInfo)">
|
||||
收件码
|
||||
</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" 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 +203,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 +231,10 @@
|
||||
payType: "",
|
||||
types: "",
|
||||
clickNum: 1,
|
||||
goname:''
|
||||
|
||||
goname:'',
|
||||
popUpShow: false,
|
||||
payCodeUrl:''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -225,12 +248,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 +272,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
@ -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) {
|
||||
|
@ -2,11 +2,9 @@
|
||||
<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>
|
||||
@ -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() {
|
||||
@ -897,13 +895,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 +965,7 @@
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
top: 70rpx;
|
||||
width: 100%;
|
||||
margin-top: 86rpx;
|
||||
background-color: var(--view-theme);
|
||||
@ -1040,6 +1039,7 @@
|
||||
|
||||
.productList .list {
|
||||
padding: 0 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.productList .list.on {
|
||||
@ -1075,6 +1075,7 @@
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 345rpx;
|
||||
|
||||
}
|
||||
|
||||
.productList .list .item .pictrue.on {
|
||||
@ -1417,7 +1418,8 @@
|
||||
}
|
||||
|
||||
.store-wrapper {
|
||||
margin-top: 240rpx;
|
||||
margin-top: 310rpx;
|
||||
|
||||
border-top: 1px solid #F6F6F6;
|
||||
|
||||
.star-box {
|
||||
|
@ -5,198 +5,226 @@
|
||||
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}`)">
|
||||
<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&type_id=${userInfoData.mer_info.type_id}`)">
|
||||
<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}`)">
|
||||
<!-- <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>
|
||||
</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="business com" v-if="true">
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
<view class="content ">
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
|
||||
<!-- @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/indexCopy?status=-1&product_type=98')">
|
||||
<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>
|
||||
|
||||
<!-- <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}`)">
|
||||
<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}&type_id=${userInfoData.mer_info.type_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/trading_hall/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">交易大厅</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">委托销售</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/fabu.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>
|
||||
|
||||
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_id!=null&&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}&type_id=${userInfoData.mer_info.type_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>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</block>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
@ -205,11 +233,16 @@
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
<view class="" v-if='jurisdiction==false&&isShow==false'>
|
||||
<emptyPage title="暂无信息"></emptyPage>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import {
|
||||
mapState,
|
||||
@ -236,7 +269,8 @@
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
zbpSwiper,
|
||||
emptyPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -290,10 +324,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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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({
|
||||
|
@ -1,394 +1,515 @@
|
||||
<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="">
|
||||
|
||||
<view class="goods">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<view style="height: 294.74rpx;">
|
||||
<u--image :src="item.image[0]" width="342.11rpx" height="294.74rpx" :showLoading="true" lazyLoad fade
|
||||
duration="450">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#f5f5f5"></u-loading-icon>
|
||||
</template>
|
||||
</u--image>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
<view class="goods">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<view style="height: 294.74rpx;">
|
||||
<u--image :src="item.image[0]" width="342.11rpx" height="294.74rpx" :showLoading="true"
|
||||
lazyLoad fade duration="450">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#f5f5f5"></u-loading-icon>
|
||||
</template>
|
||||
</u--image>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
<u-loadmore :status="status" />
|
||||
<!-- <view class="bg_color"></view> -->
|
||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
<u-loadmore :status="status" v-if="cateGoods.length>=where.limit" />
|
||||
<!-- <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 easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
||||
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,
|
||||
easyLoadimage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: 'loadmore',
|
||||
bgColor: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
show: false,
|
||||
tabsData: {
|
||||
list: [],
|
||||
tabsActive: 0
|
||||
},
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 15
|
||||
},
|
||||
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()
|
||||
uni.$on('connectstatusChange',(connectstatus) =>{
|
||||
var connectstr = ''
|
||||
if (connectstatus == true) {
|
||||
connectstr ='已连接'
|
||||
this.getRegistrationID()
|
||||
}else{
|
||||
connectstr ='未连接'
|
||||
}
|
||||
this.connectstatus = connectStr
|
||||
})
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
onReachBottom() {
|
||||
if (this.status == 'nomore') return;
|
||||
this.status = 'loading';
|
||||
this.where.page = ++this.where.page;
|
||||
this.getGoods()
|
||||
},
|
||||
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 MP || H5
|
||||
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 => {
|
||||
if (item.relevance_id) {
|
||||
item.count_start--;
|
||||
item.count_start = item.count_start == 0 ? 0 : item.count_start
|
||||
item.relevance_id = false
|
||||
} else {
|
||||
item.count_start++;
|
||||
item.relevance_id = true
|
||||
}
|
||||
})
|
||||
},
|
||||
getGoods: function(item) {
|
||||
// console.log(item);
|
||||
graphicLstApi(this.where).then(res => {
|
||||
this.cateGoods.push(...res.data.list)
|
||||
if (res.data.list.length < this.where.limit) this.status = 'nomore'
|
||||
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const { data } = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
this.cateGoods = []
|
||||
this.where.category_id = item.category_id
|
||||
this.where.page = 1
|
||||
this.getGoods(item)
|
||||
this.street_id = item.id
|
||||
this.tabsData.tabsActive = item.index
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
||||
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,
|
||||
easyLoadimage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: 'loadmore',
|
||||
bgColor: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
show: false,
|
||||
tabsData: {
|
||||
list: [],
|
||||
tabsActive: 0
|
||||
},
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 15
|
||||
},
|
||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||
keyword: '',
|
||||
location: '',
|
||||
emptyShow: false,
|
||||
street: '',
|
||||
cateGoods: []
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getCateList()
|
||||
this.cateGoods=[]
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.getCateList()
|
||||
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
this.setPermissions()
|
||||
// this.openTongZhi()
|
||||
uni.$on('connectstatusChange', (connectstatus) => {
|
||||
var connectstr = ''
|
||||
if (connectstatus == true) {
|
||||
connectstr = '已连接'
|
||||
this.getRegistrationID()
|
||||
} else {
|
||||
connectstr = '未连接'
|
||||
}
|
||||
this.connectstatus = connectStr
|
||||
})
|
||||
|
||||
},
|
||||
selfLocation() {
|
||||
const that = this
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
timeout: '10',
|
||||
success: (res) => {
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({ lat: latitude, long: longitude }).then(res => {
|
||||
that.$store.commit('setLocation', res.data)
|
||||
that.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: "获取定位超时",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
onReachBottom() {
|
||||
if (this.status == 'nomore') return;
|
||||
this.status = 'loading';
|
||||
this.where.page = ++this.where.page;
|
||||
this.
|
||||
this.getGoods()
|
||||
},
|
||||
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 MP || H5
|
||||
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 => {
|
||||
if (item.relevance_id) {
|
||||
item.count_start--;
|
||||
item.count_start = item.count_start == 0 ? 0 : item.count_start
|
||||
item.relevance_id = false
|
||||
} else {
|
||||
item.count_start++;
|
||||
item.relevance_id = true
|
||||
}
|
||||
})
|
||||
},
|
||||
getGoods: function(item) {
|
||||
|
||||
graphicLstApi(this.where).then(res => {
|
||||
this.cateGoods.push(...res.data.list)
|
||||
if (res.data.list.length < this.where.limit) this.status = 'nomore'
|
||||
|
||||
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
|
||||
|
||||
if(item){
|
||||
|
||||
if (item.index == 1 &&this.cateGoods[0] ) {
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const {
|
||||
data
|
||||
} = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
this.cateGoods = []
|
||||
this.where.category_id = item.category_id
|
||||
this.emptyShow = false
|
||||
this.where.page = 1
|
||||
this.getGoods(item)
|
||||
this.street_id = item.id
|
||||
this.tabsData.tabsActive = item.index
|
||||
|
||||
},
|
||||
selfLocation() {
|
||||
const that = this
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
timeout: '10',
|
||||
success: (res) => {
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
that.$store.commit('setLocation', res.data)
|
||||
that.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: "获取定位超时",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置手机通知权限
|
||||
*/
|
||||
setPermissions() {
|
||||
// #ifdef APP-PLUS
|
||||
if (plus.os.name == 'Android') { // 判断是Android
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
var pkName = main.getPackageName();
|
||||
var uid = main.getApplicationInfo().plusGetAttribute("uid");
|
||||
var NotificationManagerCompat = plus.android.importClass(
|
||||
"android.support.v4.app.NotificationManagerCompat");
|
||||
//android.support.v4升级为androidx
|
||||
if (NotificationManagerCompat == null) {
|
||||
NotificationManagerCompat = plus.android.importClass(
|
||||
"androidx.core.app.NotificationManagerCompat");
|
||||
}
|
||||
var areNotificationsEnabled = NotificationManagerCompat.from(main).areNotificationsEnabled();
|
||||
// 未开通‘允许通知’权限,则弹窗提醒开通,并点击确认后,跳转到系统设置页面进行设置
|
||||
if (!areNotificationsEnabled) {
|
||||
uni.showModal({
|
||||
title: '通知权限开启提醒',
|
||||
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
|
||||
showCancel: false,
|
||||
confirmText: '去设置',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
var Intent = plus.android.importClass('android.content.Intent');
|
||||
var Build = plus.android.importClass("android.os.Build");
|
||||
//android 8.0引导
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
var intent = new Intent('android.settings.APP_NOTIFICATION_SETTINGS');
|
||||
intent.putExtra('android.provider.extra.APP_PACKAGE', pkName);
|
||||
} else if (Build.VERSION.SDK_INT >= 21) { //android 5.0-7.0
|
||||
var intent = new Intent('android.settings.APP_NOTIFICATION_SETTINGS');
|
||||
intent.putExtra("app_package", pkName);
|
||||
intent.putExtra("app_uid", uid);
|
||||
} else { //(<21)其他--跳转到该应用管理的详情页
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(),
|
||||
null);
|
||||
intent.setData(uri);
|
||||
}
|
||||
// 跳转到该应用的系统通知设置页
|
||||
main.startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (plus.os.name == 'iOS') { // 判断是ISO
|
||||
var isOn = undefined;
|
||||
var types = 0;
|
||||
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
|
||||
var settings = plus.ios.invoke(app, 'currentUserNotificationSettings');
|
||||
if (settings) {
|
||||
types = settings.plusGetAttribute('types');
|
||||
plus.ios.deleteObject(settings);
|
||||
} else {
|
||||
types = plus.ios.invoke(app, 'enabledRemoteNotificationTypes');
|
||||
}
|
||||
plus.ios.deleteObject(app);
|
||||
isOn = (0 != types);
|
||||
if (isOn == false) {
|
||||
uni.showModal({
|
||||
title: '通知权限开启提醒',
|
||||
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
|
||||
showCancel: false,
|
||||
confirmText: '去设置',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
|
||||
var setting = plus.ios.invoke('NSURL', 'URLWithString:', 'app-settings:');
|
||||
plus.ios.invoke(app, 'openURL:', setting);
|
||||
plus.ios.deleteObject(setting);
|
||||
plus.ios.deleteObject(app);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</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;
|
||||
|
||||
/deep/.easy-loadimage {
|
||||
width: 100%;
|
||||
height: 294.74rpx;
|
||||
// border-radius: 8rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
/deep/.easy-loadimage {
|
||||
width: 100%;
|
||||
height: 294.74rpx;
|
||||
// border-radius: 8rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
@ -33,7 +33,7 @@
|
||||
<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>
|
||||
<button class="bnt bg-color" open-type="share" hover-class='none' @click="uniShare" >分享</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
|
||||
@ -57,12 +57,22 @@
|
||||
} 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,
|
||||
@ -96,6 +106,78 @@
|
||||
this.getArticleOne();
|
||||
},
|
||||
methods: {
|
||||
// 分享
|
||||
uniShare() {
|
||||
uniShare.show({
|
||||
content: { //公共的分享参数配置 类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
|
||||
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/app-plus/sharemenu/wechatfriend.png",
|
||||
"text": "微信好友",
|
||||
"share": { //当前项的分享参数配置。可覆盖公共的配置如下:分享到微信小程序,配置了type=5
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneSession"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/wechatmoments.png",
|
||||
"text": "微信朋友圈",
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneTimeline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/mp_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 => {
|
||||
|
@ -1,142 +1,161 @@
|
||||
<template>
|
||||
<view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}">
|
||||
<view class="head-wrapper"></view>
|
||||
<view class="town-title">{{town}}里海云仓</view>
|
||||
<view class="body-wrapper">
|
||||
<block v-for="(item,index) in cloudList" :key="index">
|
||||
<navigator class="item"
|
||||
:url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.category_name}`"
|
||||
:style="{'background-image': `url(${item.background})`}">
|
||||
<text class="item-title">{{item.category_name}}云仓服务</text>
|
||||
<text>{{item.description}}</text>
|
||||
<view class="chakan-btn">查看</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}">
|
||||
<view class="head-wrapper">
|
||||
<u--image style="position: absolute;" :showLoading="true" src="../../../static/images/tabbar/YCBG.png"
|
||||
width="100vw" height="560rpx"></u--image>
|
||||
|
||||
<u--image :showLoading="true" src="../../../static/images/tabbar/YCGG.png" width="100vw"
|
||||
height="550rpx"></u--image>
|
||||
|
||||
</view>
|
||||
<view class="town-title">{{town}}里海云仓</view>
|
||||
<view class="body-wrapper">
|
||||
<block v-for="(item,index) in cloudList" :key="index">
|
||||
<navigator class="item"
|
||||
:url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.category_name}`"
|
||||
:style="{'background-image': `url(${item.background})`}">
|
||||
<text class="item-title">{{item.category_name}}云仓服务</text>
|
||||
<text style="color: #3274F9;">{{item.description}}</text>
|
||||
<view class="chakan-btn">查看</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCityCloundShop } from '@/api/api.js'
|
||||
import { Toast } from '@/libs/uniApi';
|
||||
export default {
|
||||
data() {
|
||||
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||
return {
|
||||
winHeight: 0,
|
||||
cloudList: [],
|
||||
street_code: '',
|
||||
town: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.winHeight = res.windowHeight
|
||||
},
|
||||
});
|
||||
this.street_code = e.street
|
||||
this.town = e.town
|
||||
this.getCloundShop()
|
||||
},
|
||||
onShow() {},
|
||||
onPullDownRefresh() {
|
||||
this.getCloundShop()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
methods: {
|
||||
async getCloundShop() {
|
||||
const { data } = await getCityCloundShop({ street_code: this.street_code })
|
||||
this.cloudList = data
|
||||
data.length < 1 ? Toast("暂无云仓") : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
import {
|
||||
getCityCloundShop
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi';
|
||||
export default {
|
||||
data() {
|
||||
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||
return {
|
||||
winHeight: 0,
|
||||
cloudList: [],
|
||||
street_code: '',
|
||||
town: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.winHeight = res.windowHeight
|
||||
},
|
||||
});
|
||||
this.street_code = e.street
|
||||
this.town = e.town
|
||||
this.getCloundShop()
|
||||
},
|
||||
onShow() {},
|
||||
onPullDownRefresh() {
|
||||
this.getCloundShop()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
methods: {
|
||||
async getCloundShop() {
|
||||
const {
|
||||
data
|
||||
} = await getCityCloundShop({
|
||||
street_code: this.street_code
|
||||
})
|
||||
this.cloudList = data
|
||||
data.length < 1 ? Toast("暂无云仓") : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.cloud_entrepot {
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat;
|
||||
background-size: cover;
|
||||
padding-bottom: 92.98rpx;
|
||||
}
|
||||
.cloud_entrepot {
|
||||
// background: url("../../../static/images/tabbar/YCBG.png") no-repeat;
|
||||
// background-size: cover;
|
||||
// padding-bottom: 92.98rpx;
|
||||
background-color: #E3ECFE;
|
||||
}
|
||||
|
||||
.head-wrapper {
|
||||
height: 485.96rpx;
|
||||
width: 100%;
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/top.png") no-repeat;
|
||||
background-size: cover;
|
||||
margin-bottom: 49.12rpx;
|
||||
}
|
||||
.head-wrapper {
|
||||
height: 550rpx;
|
||||
// width: 100vw;
|
||||
// background: url("../../../static/images/tabbar/YCBG.png") no-repeat;
|
||||
background-size: cover;
|
||||
margin-bottom: 49.12rpx;
|
||||
}
|
||||
|
||||
.town-title {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 50.88rpx;
|
||||
color: #fff;
|
||||
margin-bottom: 28.07rpx;
|
||||
.town-title {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 50.88rpx;
|
||||
color: #3274F9;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
margin-bottom: 28.07rpx;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 66.67rpx;
|
||||
height: 31.58rpx;
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/you.png") no-repeat;
|
||||
background-size: cover;
|
||||
margin-left: 24.56rpx;
|
||||
}
|
||||
&::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 66.67rpx;
|
||||
height: 31.58rpx;
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/you.png") no-repeat;
|
||||
background-size: cover;
|
||||
margin-left: 24.56rpx;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 66.67rpx;
|
||||
height: 31.58rpx;
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/zuo.png") no-repeat;
|
||||
background-size: cover;
|
||||
margin-right: 24.56rpx;
|
||||
}
|
||||
}
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 66.67rpx;
|
||||
height: 31.58rpx;
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/zuo.png") no-repeat;
|
||||
background-size: cover;
|
||||
margin-right: 24.56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.body-wrapper {
|
||||
width: 694.74rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
.body-wrapper {
|
||||
width: 694.74rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
|
||||
.item {
|
||||
width: 336.84rpx;
|
||||
height: 100%;
|
||||
padding: 24.56rpx 28.07rpx;
|
||||
margin-bottom: 21.05rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
width: 336.84rpx;
|
||||
height: 100%;
|
||||
padding: 24.56rpx 28.07rpx;
|
||||
margin-bottom: 21.05rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
font-size: 24.56rpx;
|
||||
color: #999;
|
||||
margin-bottom: 14.04rpx;
|
||||
}
|
||||
text {
|
||||
display: block;
|
||||
font-size: 24.56rpx;
|
||||
color: #999;
|
||||
margin-bottom: 14.04rpx;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
font-size: 31.58rpx;
|
||||
color: #333;
|
||||
}
|
||||
.item-title {
|
||||
font-size: 31.58rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.chakan-btn {
|
||||
width: 114.04rpx;
|
||||
height: 49.12rpx;
|
||||
font-size: 28.07rpx;
|
||||
text-align: center;
|
||||
line-height: 49.12rpx;
|
||||
color: #fff;
|
||||
margin-top: auto;
|
||||
background: linear-gradient(90deg, #FE5300 0%, #F84221 100%);
|
||||
border-radius: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.chakan-btn {
|
||||
width: 114.04rpx;
|
||||
height: 49.12rpx;
|
||||
font-size: 28.07rpx;
|
||||
text-align: center;
|
||||
line-height: 49.12rpx;
|
||||
color: #3274F9;
|
||||
margin-top: auto;
|
||||
// background: linear-gradient(90deg, #FE5300 0%, #F84221 100%);
|
||||
border: 1px solid #3274F9;
|
||||
border-radius: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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="aspectFill"></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.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>
|
@ -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>
|
@ -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) => {
|
||||
|
@ -1,58 +1,132 @@
|
||||
<template>
|
||||
<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>
|
||||
<!--#endif-->
|
||||
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
|
||||
<view class='productList'>
|
||||
<view style="height: 150rpx;">
|
||||
<view class='search acea-row row-between-wrapper' style="background-color: white;"
|
||||
:class="'styleType'+store_street_theme">
|
||||
<view class="back" @click='backjJump()'>
|
||||
<view class="iconfont icon-xiangzuo" style="color: black;"></view>
|
||||
</view>
|
||||
<view class="serch_btn">
|
||||
<u-search borderColor='#3274F9' placeholder="请输入商品" v-model='sotreParam.keyword' bgColor="white"
|
||||
:showAction="false" inputAlign="center" height="30"></u-search>
|
||||
<div class="btn" @tap='searchSubmit'>搜索</div>
|
||||
</view>
|
||||
|
||||
<!-- <view class='input acea-row row-between-wrapper' style="mar"><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;"
|
||||
</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>
|
||||
<view class="iconfont icon-xiangyou" v-if="recommend_address"></view>
|
||||
</view> -->
|
||||
<view style="width: 20vw;display: flex;justify-content: space-around;">
|
||||
<u--image :showLoading="true" src="../../../static/images/tabbar/GWC.png" width="50rpx"
|
||||
height="50rpx"></u--image>
|
||||
<u--image :showLoading="true" src="../../../static/images/tabbar/XX.png" width="50rpx"
|
||||
height="50rpx"></u--image>
|
||||
</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'
|
||||
<!-- <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)'>
|
||||
<view class="">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="line" :class="{'font-line':firstKey == item.key}">
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" @click="bindRight">
|
||||
</view> -->
|
||||
<!-- <view class="item" @click="bindRight">
|
||||
<view>筛选
|
||||
<!-- <text class="iconfont icon-shaixuan"></text> -->
|
||||
<text class="iconfont icon-shaixuan"></text>
|
||||
</view>
|
||||
<view class="line">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- </view> -->
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
|
||||
<!-- 店铺 -->
|
||||
<block>
|
||||
<view class="store-wrapper">
|
||||
|
||||
<view class="tabs">
|
||||
<u-tabs :list="tabLists" @change="sectionChange" lineColor="#3274F9" :scrollable="false" lineWidth="40"
|
||||
inactiveStyle="color:#737373" activeStyle="color:black"></u-tabs>
|
||||
</view>
|
||||
<view class="store_wrapper">
|
||||
<view class="store_item" @click="goStore(item.mer_id)"
|
||||
:style="{ backgroundImage: `url(${item.mini_banner})`}" v-for="(item,index) in storeList"
|
||||
:key="index">
|
||||
<view class="head">
|
||||
<view>
|
||||
{{item.mer_name}}
|
||||
<!-- {{item.mer_id}} -->
|
||||
</view>
|
||||
<view>
|
||||
<u--image :showLoading="true" src="../../../static/images/tabbar/JD.png" width="105.14rpx"
|
||||
height="45.56rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.mer_avatar" width="136.68rpx"
|
||||
height="136.68rpx"></u--image>
|
||||
</view>
|
||||
<view class="rights">
|
||||
<view class="first_li">
|
||||
<view class="type">{{item.type_name}}</view>
|
||||
<view class="pf">店铺评分
|
||||
<u--image style="margin: 0 5rpx;" :showLoading="true"
|
||||
src="../../../static/images/tabbar/PF.png" width="15rpx" height="15rpx"
|
||||
v-for="items,indexs in Math.floor(item.product_score)"></u--image>
|
||||
</view>
|
||||
<view class="hot">1万关注</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: space-between;width: 65vw;">
|
||||
<view style="display: flex; "> <u--image :showLoading="true"
|
||||
src="../../../static/images/tabbar/DH.png" width="36.8rpx"
|
||||
height="36.8rpx"></u--image>
|
||||
<text> {{item.service_phone}} </text>
|
||||
</view>
|
||||
<view style="display: flex;"> <u--image :showLoading="true"
|
||||
src="../../../static/images/tabbar/SJ.png" width="36.8rpx"
|
||||
height="36.8rpx"></u--image>
|
||||
<text>
|
||||
{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<u--image :showLoading="true" src="../../../static/images/tabbar/DW.png" width="36.8rpx"
|
||||
height="36.8rpx"></u--image>
|
||||
{{item.mer_address}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!--
|
||||
<view class="store-item" v-for="(item,index) in storeList" :key="index">
|
||||
<view class="head">
|
||||
<view class="bgc_img" :style="{ backgroundImage: `url(${item.mini_banner})`}">
|
||||
</view>
|
||||
<view class="zhezhao">
|
||||
</view>
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="title">
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="title" style="display: ;">
|
||||
<view>{{item.mer_name}}
|
||||
</view>
|
||||
<span>
|
||||
<span class="go_store">
|
||||
{{item.type_name}}
|
||||
</span>
|
||||
</view>
|
||||
@ -84,8 +158,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
-->
|
||||
|
||||
</view>
|
||||
|
||||
<block v-if="store_street_theme == 2">
|
||||
<view class="mer-item2" v-for="(item,index) in storeList" :key='index'>
|
||||
<view class="mer-hd mer-shop-count" @click="goStore(item.mer_id)">
|
||||
@ -188,7 +264,7 @@
|
||||
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
||||
</u-popup>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -222,6 +298,21 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabLists: [{
|
||||
name: '默认',
|
||||
order: ''
|
||||
}, {
|
||||
name: '销量',
|
||||
order: 'sales'
|
||||
}, {
|
||||
name: '好评',
|
||||
order: 'rate'
|
||||
},
|
||||
{
|
||||
name: '距离',
|
||||
order: 'location'
|
||||
}
|
||||
],
|
||||
price: 0,
|
||||
stock: 0,
|
||||
nows: false,
|
||||
@ -239,27 +330,27 @@
|
||||
downKey: 0,
|
||||
downStatus: false,
|
||||
// 下拉菜单
|
||||
downMenu: [{
|
||||
title: '默认',
|
||||
key: 0,
|
||||
order: ""
|
||||
},
|
||||
{
|
||||
title: '销量',
|
||||
key: 1,
|
||||
order: 'sales'
|
||||
},
|
||||
{
|
||||
title: '好评',
|
||||
key: 2,
|
||||
order: 'rate'
|
||||
},
|
||||
{
|
||||
title: '距离',
|
||||
key: 3,
|
||||
order: 'location'
|
||||
}
|
||||
],
|
||||
// downMenu: [{
|
||||
// title: '默认',
|
||||
// key: 0,
|
||||
// order: ""
|
||||
// },
|
||||
// {
|
||||
// title: '销量',
|
||||
// key: 1,
|
||||
// order: 'sales'
|
||||
// },
|
||||
// {
|
||||
// title: '好评',
|
||||
// key: 2,
|
||||
// order: 'rate'
|
||||
// },
|
||||
// {
|
||||
// title: '距离',
|
||||
// key: 3,
|
||||
// order: 'location'
|
||||
// }
|
||||
// ],
|
||||
// 是否第一个
|
||||
firstKey: 0,
|
||||
// 商铺列表
|
||||
@ -288,16 +379,19 @@
|
||||
storeTypeArr: [], //店铺类型
|
||||
merList: [], //商户分类
|
||||
product_type: 0,
|
||||
show:false,
|
||||
image: '' //图片
|
||||
show: false,
|
||||
image: '', //图片,
|
||||
credit_buy: '', //支持先货后款
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
|
||||
|
||||
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() || ''
|
||||
@ -340,6 +434,10 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
sectionChange(e) {
|
||||
// console.log(e)
|
||||
this.set_where(e.index)
|
||||
},
|
||||
// 获取商户分类
|
||||
getClassfication: function() {
|
||||
let temp = []
|
||||
@ -496,7 +594,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
|
||||
@ -524,8 +623,9 @@
|
||||
}
|
||||
},
|
||||
searchSubmit: function(e) {
|
||||
let that = this;
|
||||
that.$set(that.sotreParam, 'keyword', e.detail.value);
|
||||
|
||||
// let that = this;
|
||||
// this.$set(that.sotreParam, 'keyword', e.detail.value);
|
||||
this.set_where(this.firstKey)
|
||||
},
|
||||
// 右侧切换
|
||||
@ -570,7 +670,7 @@
|
||||
this.storeList = []
|
||||
this.firstKey = e
|
||||
this.sotreParam.page = 1
|
||||
this.sotreParam.order = this.downMenu[e].order
|
||||
this.sotreParam.order = this.tabLists[e].order
|
||||
this.storeMerchantList();
|
||||
},
|
||||
backjJump() {
|
||||
@ -613,20 +713,41 @@
|
||||
this.storeMerchantList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.serch_btn {
|
||||
// margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
width: 70vw;
|
||||
|
||||
.btn {
|
||||
position: absolute;
|
||||
right: 5rpx;
|
||||
width: 115.65rpx;
|
||||
height: 55rpx;
|
||||
background-color: #3274F9;
|
||||
border-radius: 175.23rpx 175.23rpx 175.23rpx 175.23rpx;
|
||||
color: white;
|
||||
line-height: 55rpx;
|
||||
text-align: center;
|
||||
bottom: 6rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.productList .search {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
height: 140rpx;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
padding-top: 70rpx;
|
||||
// box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
background-color: #fff;
|
||||
@ -661,6 +782,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.go_store {
|
||||
color: white !important;
|
||||
background-color: #4DA0FA !important;
|
||||
border-radius: 15rpx !important;
|
||||
padding: 10rpx 20rpx !important;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.search-right.styleType2 .right-text,
|
||||
.search-right.styleType3 .right-text {
|
||||
color: #282828;
|
||||
@ -731,7 +862,7 @@
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
top: 40rpx;
|
||||
width: 100%;
|
||||
margin-top: 86rpx;
|
||||
background-color: #fff;
|
||||
@ -852,192 +983,91 @@
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.store-wrapper {
|
||||
margin-top: 165rpx;
|
||||
border-top: 1px solid #F6F6F6;
|
||||
.tabs {
|
||||
// background-color: ;
|
||||
background-color: #F4F7FE;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.store-item {
|
||||
margin: 20rpx auto;
|
||||
.store_wrapper {
|
||||
|
||||
background-color: #F4F7FE;
|
||||
|
||||
.store_item {
|
||||
margin: 0 auto;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
width: 95vw;
|
||||
// backdrop-filter: blur(1000px);
|
||||
// height: 300rpx;
|
||||
// background-color: red;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 50rpx;
|
||||
// background-color: red;
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
|
||||
.zhezhao {
|
||||
position: absolute;
|
||||
width: 95%;
|
||||
height: 150px;
|
||||
border-radius: 20rpx;
|
||||
z-index: 0;
|
||||
opacity: 0.5;
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
.bgc_img {
|
||||
position: absolute;
|
||||
width: 95%;
|
||||
height: 150px;
|
||||
background-size: cover;
|
||||
border-radius: 20rpx;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.zhezhao1 {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
border-radius: 20rpx;
|
||||
z-index: 1;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
margin-left: 20px;
|
||||
z-index: 1;
|
||||
|
||||
span {
|
||||
background-color: #F84221;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
padding: 3px;
|
||||
border-radius: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.coent {
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
|
||||
.avater {
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
|
||||
image {
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
.text_one {
|
||||
display: flex;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
|
||||
image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.text_one_r {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.text_two {
|
||||
width: 270px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.text_three {
|
||||
width: 270px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
justify-content: space-between;
|
||||
color: white;
|
||||
font-size: 30rpx;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.pro-box {
|
||||
white-space: nowrap;
|
||||
.content {
|
||||
padding: 25rpx;
|
||||
background-color: white;
|
||||
// height: 160.68rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 20rpx 30rpx;
|
||||
color: black;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
// width: ;
|
||||
|
||||
.pro-item {
|
||||
display: inline-block;
|
||||
width: 218rpx;
|
||||
margin-right: 14rpx;
|
||||
|
||||
.picture,
|
||||
/deep/image,
|
||||
uni-image {
|
||||
width: 100%;
|
||||
height: 214rpx;
|
||||
border-radius: 8rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--view-priceColor);
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.left {
|
||||
margin-right: 20rpx;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&.styleType3 {
|
||||
padding: 20rpx;
|
||||
.rights {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.pro-item {
|
||||
display: inline-block;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 10rpx 0 20rpx;
|
||||
.first_li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.picture,
|
||||
/deep/image,
|
||||
uni-image {
|
||||
width: 194rpx;
|
||||
height: 194rpx;
|
||||
text-align: center;
|
||||
border-radius: 8rpx;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
.type {
|
||||
border: 1px solid #3274F9;
|
||||
color: #3274F9;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.pf {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
color: white;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.hot {
|
||||
color: #F84221;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.mer-item2 {
|
||||
@ -1124,12 +1154,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.guanbi {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
|
||||
.pop {
|
||||
z-index: 1;
|
||||
}
|
||||
|
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
@ -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,30 @@
|
||||
*
|
||||
* 去订单详情页面
|
||||
*/
|
||||
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 {
|
||||
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 +265,7 @@
|
||||
border-radius: 10rpx;
|
||||
padding: 1rpx 0 28rpx 0;
|
||||
}
|
||||
|
||||
.payment-status .icon {
|
||||
font-size: 70rpx;
|
||||
width: 140rpx;
|
||||
@ -242,19 +277,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 +301,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 +324,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 +381,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>
|
@ -2,7 +2,8 @@
|
||||
<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">
|
||||
<!-- 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 == item.value}" @click="changeTab(item)">
|
||||
<text class="iconfont" :class="item.icon"></text>{{item.name}}
|
||||
</view>
|
||||
@ -467,6 +468,7 @@
|
||||
});
|
||||
}
|
||||
}else{
|
||||
|
||||
if (value.image.length == 0) return that.$util.Tips({
|
||||
title: '请添加话题图片'
|
||||
});
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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"></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,
|
||||
|
@ -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')) {
|
||||
@ -270,6 +320,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 +353,11 @@
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
uni.showModal({
|
||||
content: JSON.stringify(err)
|
||||
});
|
||||
// 取消上传也会出现弹框
|
||||
// uni.showModal({
|
||||
// content: JSON.stringify(err)
|
||||
// });
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -357,7 +411,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 +479,10 @@
|
||||
height: 150rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.preview_video{
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
.container_input {
|
||||
background: #fff;
|
||||
padding: 0 20rpx;
|
||||
@ -519,7 +601,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;
|
||||
// }
|
||||
|
@ -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
@ -9,27 +9,32 @@
|
||||
<swiper-item :class="{ active: 0 == swiperCur }">
|
||||
<view class="slide-navigator">
|
||||
<view class="item" hover-class='none' @click="jumpAddGoods">
|
||||
<image mode='widthFix' class="image" src="../static/images/product_add.png"></image>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_add.png">
|
||||
</image>
|
||||
<text class="text">添加商品</text>
|
||||
</view>
|
||||
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`"
|
||||
hover-class='none'>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_sales.png"></image>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_sales.png">
|
||||
</image>
|
||||
<text class="text">在售商品</text>
|
||||
</navigator>
|
||||
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=3`"
|
||||
hover-class='none'>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_out.png"></image>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_out.png">
|
||||
</image>
|
||||
<text class="text">售罄商品</text>
|
||||
</navigator>
|
||||
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=5`"
|
||||
hover-class='none'>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_recycle.png"></image>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_recycle.png">
|
||||
</image>
|
||||
<text class="text">回收站</text>
|
||||
</navigator>
|
||||
<navigator class="item" :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
|
||||
hover-class='none'>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_cate.png"></image>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_cate.png">
|
||||
</image>
|
||||
<text class="text">店铺分类</text>
|
||||
</navigator>
|
||||
</view>
|
||||
@ -38,7 +43,8 @@
|
||||
<view class="slide-navigator">
|
||||
<navigator class="item" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
|
||||
hover-class='none'>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_freight.png"></image>
|
||||
<image mode='widthFix' class="image" src="../static/images/product_freight.png">
|
||||
</image>
|
||||
<text class="text">运费模板</text>
|
||||
</navigator>
|
||||
<navigator class="item" :url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`"
|
||||
@ -46,6 +52,12 @@
|
||||
<image mode='widthFix' class="image" src="../static/images/product_specification.png"></image>
|
||||
<text class="text">规格模板</text>
|
||||
</navigator>
|
||||
<navigator class="item"
|
||||
:url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}`"
|
||||
hover-class='none'>
|
||||
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
|
||||
<text class="text">商品导入</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
@ -75,28 +87,60 @@
|
||||
<text class='ot_price'>¥{{item.ot_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="position: absolute; top: 10px; right: 10px;">
|
||||
<!-- 插件无需手动引入,直接使用即可 -->
|
||||
<!-- 里面···可以改为任意东西,图片也可以 -->
|
||||
<!-- 参数$event不可修改,否则取不到点击事件详情 -->
|
||||
<rudon-rowMenuDotDotDot :localdata="options" @change="menuAction($event, item.attrValue)">
|
||||
. . .
|
||||
</rudon-rowMenuDotDotDot>
|
||||
</view>
|
||||
</view>
|
||||
<view class="operation acea-row row-between-wrapper">
|
||||
<view></view>
|
||||
<view class="acea-row row-middle">
|
||||
<view v-if="item.is_show == 1 && item.status == 1" class="bnt" @tap.stop="handleShelves(item,0)">下架
|
||||
</view>
|
||||
<view v-if="item.is_show == 0 && item.status == 1" class="bnt" @tap.stop="handleShelves(item),1">上架
|
||||
</view>
|
||||
<view @click="editGoods(item)" class="bnt">编辑</view>
|
||||
<navigator :url="'/pages/admin/goods_details/index?product_id='+item.product_id+'&product_type=0'"
|
||||
class="bnt" hover-class='none'>预览</navigator>
|
||||
<view class="bnt" v-if="item.is_show == 0" @tap.stop="handleRecycle(item,index)">删除</view>
|
||||
<view class="bnt" v-if="item.is_show == 0" @tap.stop="handleRecycle(item,index)">删除
|
||||
</view>
|
||||
<view class="bnt bnt_recommend" v-if="item.is_show == 1" @tap.stop="handleRecommend(item)">
|
||||
{{item.is_good ? '取消推荐' : '店铺推荐'}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</view>
|
||||
<u-popup :show="show" @close="close" mode="center" bgColor='transparent'>
|
||||
<image src="@/static/images/xianxia.png" mode="widthFix"></image>
|
||||
<view class="popen">
|
||||
<h4 v-if="this.on_line==1">线下入库</h4>
|
||||
<h4 v-else>线上入库</h4>
|
||||
<view class="guige">
|
||||
<scroll-view scroll-y="true" class="scroll_y">
|
||||
<view>
|
||||
<u-radio-group v-model="checkboxValue1" placement="column" @change="checkboxChange">
|
||||
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in checkboxList1"
|
||||
@change="radioChange(item)" :key="index" :label="item.sku" :name="item.unique" v-if="item.sku">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="shuru" v-if="this.on_line == 1">
|
||||
数量: <input type="number" v-model="data.number" placeholder="请输入">
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button class="btn_l" @click="close()">取消</button>
|
||||
<button class="btn_r" @click="creat()">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -114,7 +158,8 @@
|
||||
productLstApi,
|
||||
productDeleteApi,
|
||||
productOffApi,
|
||||
productRecommendApi
|
||||
productRecommendApi,
|
||||
postImport
|
||||
} from "@/api/product";
|
||||
import Loading from '@/components/Loading/index.vue';
|
||||
import {
|
||||
@ -145,6 +190,32 @@
|
||||
productList: [],
|
||||
swiperCur: 0,
|
||||
circular: true,
|
||||
attrValue: [],
|
||||
options: [{
|
||||
value: '0',
|
||||
text: '线上入库'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
text: '线下入库'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
text: '预览'
|
||||
}
|
||||
],
|
||||
//线下
|
||||
show: false,
|
||||
//单选示例
|
||||
checkboxValue1: [],
|
||||
// 基本案列数据
|
||||
checkboxList1: [],
|
||||
data: {
|
||||
product_id: '',
|
||||
unique: "",
|
||||
number: 1
|
||||
},
|
||||
on_line: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@ -158,7 +229,95 @@
|
||||
this.getList(this.mer_id);
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onHide() {
|
||||
this.show = false
|
||||
},
|
||||
methods: {
|
||||
menuAction(action, rowId) {
|
||||
// 忽略初始化时的传入的空操作
|
||||
if (action === '') {
|
||||
return
|
||||
}
|
||||
this.on_line = action
|
||||
this.checkboxList1 = rowId
|
||||
console.log(this.on_line);
|
||||
if (this.checkboxList1.length == 1 && action == 0) {
|
||||
// this.show = true
|
||||
navigateTo(1, '/pages/users/online_warehousing/index', {
|
||||
mer_id: this.mer_id,
|
||||
product_id: this.data.product_id,
|
||||
unique: this.data.unique,
|
||||
});
|
||||
} else if (this.checkboxList1.length == 1 && action == 1) {
|
||||
this.show = true
|
||||
this.data.product_id = this.checkboxList1[0].product_id
|
||||
this.data.unique = this.checkboxList1[0].unique
|
||||
console.log(this.data);
|
||||
} else {
|
||||
this.show = true
|
||||
}
|
||||
if (action == 2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/admin/goods_details/index?product_id=${this.checkboxList1[0].product_id}&product_type=0`
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
close() {
|
||||
this.show = false
|
||||
},
|
||||
//导入
|
||||
creat() {
|
||||
if (this.on_line == 1) {
|
||||
if (this.data.number < 1) {
|
||||
this.show = false
|
||||
this.$util.Tips({
|
||||
title: '入库数量不得小于一件'
|
||||
})
|
||||
} else {
|
||||
postImport(this.mer_id, this.data).then(res => {
|
||||
console.log(res);
|
||||
this.show = false
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
})
|
||||
this.getList(this.mer_id);
|
||||
}).catch(err => {
|
||||
this.show = false
|
||||
this.$util.Tips({
|
||||
title: '请选择规格后再次进行入库'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.on_line == 0) {
|
||||
console.log('12');
|
||||
if (!this.data.product_id) {
|
||||
this.show = false
|
||||
this.$util.Tips({
|
||||
title: '请选择规格'
|
||||
})
|
||||
} else {
|
||||
navigateTo(1, '/pages/users/online_warehousing/index', {
|
||||
mer_id: this.mer_id,
|
||||
product_id: this.data.product_id,
|
||||
unique: this.data.unique,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
//规格
|
||||
checkboxChange(n) {
|
||||
this.data.unique = n
|
||||
console.log(n);
|
||||
},
|
||||
radioChange(n) {
|
||||
this.data.product_id = n.product_id
|
||||
console.log(this.data);
|
||||
},
|
||||
// 跳转添加商品界面
|
||||
jumpAddGoods() {
|
||||
const data = getStorage('addGoodsFormData');
|
||||
@ -172,11 +331,16 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
navigateTo(1, '/pages/product/addGoods/index', { mer_id: this.mer_id });
|
||||
navigateTo(1, '/pages/product/addGoods/index', {
|
||||
mer_id: this.mer_id
|
||||
});
|
||||
},
|
||||
// swiper
|
||||
swiperChange(e) {
|
||||
let { current, source } = e.detail;
|
||||
let {
|
||||
current,
|
||||
source
|
||||
} = e.detail;
|
||||
if (source === 'touch') {
|
||||
//根据官方 source 来进行判断swiper的change事件是通过什么来触发的,autoplay是自动轮播。touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的,所以做了限制,只有在自动轮播和用户主动触发才去改变current值,达到规避了抖动bug
|
||||
this.swiperCur = e.detail.current;
|
||||
@ -192,6 +356,7 @@
|
||||
that.loaded = res.data.list.length < that.where.limit;
|
||||
that.productList.push.apply(that.productList, res.data.list);
|
||||
that.where.page = that.where.page + 1;
|
||||
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
@ -217,7 +382,10 @@
|
||||
removeStorage(item);
|
||||
}
|
||||
});
|
||||
navigateTo(1, '/pages/product/addGoods/index', { mer_id: item.mer_id, product_id: item.product_id });
|
||||
navigateTo(1, '/pages/product/addGoods/index', {
|
||||
mer_id: item.mer_id,
|
||||
product_id: item.product_id
|
||||
});
|
||||
},
|
||||
handleRecycle(item, index) {
|
||||
let that = this;
|
||||
@ -261,7 +429,9 @@
|
||||
//上下架
|
||||
onAndOff(item, status) {
|
||||
let that = this;
|
||||
productOffApi(that.mer_id, item.product_id, { status: status }).then((res) => {
|
||||
productOffApi(that.mer_id, item.product_id, {
|
||||
status: status
|
||||
}).then((res) => {
|
||||
that.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
@ -278,7 +448,9 @@
|
||||
handleRecommend(item) {
|
||||
let that = this
|
||||
let is_good = item.is_good ? 0 : 1
|
||||
productRecommendApi(that.mer_id, item.product_id, { is_good: is_good }).then((res) => {
|
||||
productRecommendApi(that.mer_id, item.product_id, {
|
||||
is_good: is_good
|
||||
}).then((res) => {
|
||||
that.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
@ -528,7 +700,7 @@
|
||||
}
|
||||
|
||||
.operation {
|
||||
padding: 20upx 30upx;
|
||||
padding: 20upx 10px;
|
||||
background: #ffffff;
|
||||
width: 100%;
|
||||
border-radius: 0 0 10rpx 10rpx;
|
||||
@ -555,5 +727,91 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.acea-row.row-between-wrapper {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.genduo {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid #999999;
|
||||
border-radius: 10px;
|
||||
width: 30px;
|
||||
height: 10px;
|
||||
|
||||
.gen_sel {
|
||||
font-size: 12px
|
||||
}
|
||||
}
|
||||
|
||||
.popen {
|
||||
position: absolute;
|
||||
top: 110px;
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
padding: 10px;
|
||||
z-index: 0;
|
||||
|
||||
h4 {
|
||||
font-weight: 400;
|
||||
font-size: 20px;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.guige {
|
||||
margin: 10px 0 10px 20px;
|
||||
|
||||
.scroll_y {
|
||||
max-height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.guiges {
|
||||
height: 100px;
|
||||
margin: 10px 0 10px 20px;
|
||||
}
|
||||
|
||||
.shuru {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
margin-left: 20px;
|
||||
|
||||
input {
|
||||
background: #F5F5F5;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
border: 1px solid #999999;
|
||||
padding-left: 3px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin: 10px;
|
||||
|
||||
.btn_l {
|
||||
padding: 5px;
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.btn_r {
|
||||
width: 100px;
|
||||
padding: 5px;
|
||||
border-radius: 4px;
|
||||
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||||
border-radius: 27px 27px 27px 27px;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -20,7 +20,7 @@
|
||||
】
|
||||
-->
|
||||
<!-- 头部导航 -->
|
||||
<view v-if="!isUser" class="header">
|
||||
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==3?'#FC4E09':''}" >
|
||||
<view class="items" @click.stop="navTap(2)">
|
||||
<text class="tName" :class="currentNav==2?'on':''">关注</text>
|
||||
</view>
|
||||
@ -257,6 +257,7 @@
|
||||
<view class="nice_box flex_a_c" @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>
|
||||
@ -1036,14 +1037,15 @@
|
||||
/* #ifdef MP */
|
||||
padding-top: 200rpx;
|
||||
/* #endif */
|
||||
background-color: #000000;
|
||||
// background-color: #000000;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.goods_item {
|
||||
width: 342.11rpx;
|
||||
height: 491.23rpx;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #000;
|
||||
// background-color: #000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 10px;
|
||||
@ -1170,11 +1172,11 @@
|
||||
position: fixed;
|
||||
z-index: 9;
|
||||
width: 750rpx;
|
||||
height: 86rpx;
|
||||
height: 186rpx;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
top: 70rpx;
|
||||
padding-top: 70rpx;
|
||||
|
||||
.items {
|
||||
margin: 0 30rpx;
|
||||
@ -1191,7 +1193,7 @@
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: #000000;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.item {
|
||||
|
@ -13,7 +13,10 @@
|
||||
-->
|
||||
<!-- 头部导航 -->
|
||||
<!-- 头部导航 -->
|
||||
<view v-if="!isUser" class="header">
|
||||
|
||||
|
||||
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==3?'#FC4E09':''}">
|
||||
|
||||
<view class="tool-bar">
|
||||
<view class='iconfont icon-xiangzuo' @tap='goBack'></view>
|
||||
</view>
|
||||
@ -31,7 +34,18 @@
|
||||
: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 +60,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">
|
||||
@ -1135,10 +1154,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 +1257,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 {
|
||||
@ -1258,8 +1278,9 @@
|
||||
.icon-xiangzuo {
|
||||
margin-right: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1290,6 +1311,7 @@
|
||||
.shortVideo,
|
||||
.container {
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, #000000 100%);
|
||||
|
||||
}
|
||||
|
||||
.item {
|
||||
@ -1336,6 +1358,7 @@
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.playState {
|
||||
@ -1861,4 +1884,8 @@
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.videoa {
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
@ -5,14 +5,18 @@
|
||||
<view class="card-top">
|
||||
<view class="title">{{item.mer_name}}</view>
|
||||
<view class="time">提交时间:{{item.create_time}}</view>
|
||||
<view v-if="item.fail_msg" class="reason">原因:{{item.fail_msg}}</view>
|
||||
<!-- <view v-if="item.fail_msg" class="reason">原因:{{item.fail_msg}}</view> -->
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="card-bottom">
|
||||
<view class="card-status">
|
||||
<image class="status-icon" v-if="item.status === 0" src="../static/images/pending.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 1" src="../static/images/passed.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 2" src="../static/images/not-pass.png" mode=""></image>
|
||||
<image class="status-icon" v-if="item.status === 0" src="../../../static/images/SJRZ/DSH.png"
|
||||
mode="">
|
||||
</image>
|
||||
<image class="status-icon" v-else-if="item.status === 1"
|
||||
src="../../../static/images/SJRZ/CG.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 2"
|
||||
src="../../../static/images/SJRZ/SB_a.png" mode=""></image>
|
||||
<text class="status-text">{{statusText(item.status)}}</text>
|
||||
</view>
|
||||
<view class="status-btn" @click="jump(item)">{{statusBtn(item.status)}}</view>
|
||||
@ -83,16 +87,17 @@
|
||||
},
|
||||
// 跳转逻辑
|
||||
jump(item) {
|
||||
// console.log(item)
|
||||
if ([0, 2].includes(item.status)) {
|
||||
console.log(item)
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/settled/index?mer_i_id=${item.mer_intention_id}`
|
||||
url: `/pages/store/merchantDetails/fali?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}`
|
||||
})
|
||||
} else if (item.status === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/merchantDetails/index?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}`
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//状态判断
|
||||
statusText(number) {
|
||||
@ -108,9 +113,9 @@
|
||||
statusBtn(number) {
|
||||
// 使用对象
|
||||
let statusData = {
|
||||
0: "编辑",
|
||||
1: "查看",
|
||||
2: "重新提交",
|
||||
0: "",
|
||||
1: "查看详情",
|
||||
2: "查看详情",
|
||||
};
|
||||
return statusData[number]
|
||||
},
|
||||
@ -125,76 +130,91 @@
|
||||
align-items: center;
|
||||
background-color: #F5F5F5;
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.card-list {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 24rpx;
|
||||
margin: 10rpx 20rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.card-top {
|
||||
height: 140rpx;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
padding: 5rpx 0;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.reason {
|
||||
color: #E93323;
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
height: 2rpx;
|
||||
margin: 20rpx 0 20rpx 0;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
|
||||
.card-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.status-icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
width: 50.82rpx;
|
||||
height: 50.82rpx;
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.status-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.status-btn {
|
||||
font-size: 26rpx;
|
||||
color: #555;
|
||||
border: 1px solid #999999;
|
||||
border: 1px solid #729FFA;
|
||||
padding: 8rpx 32rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-shop {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
height: 100vh;
|
||||
|
||||
.pictrue {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
color: $uni-nothing-text;
|
||||
|
||||
image {
|
||||
width: 414rpx;
|
||||
height: 380rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -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>
|
@ -1,14 +1,25 @@
|
||||
<template>
|
||||
<view v-if="!successful" :style="viewColor">
|
||||
<view v-if="!successful">
|
||||
<view style="height: var(--status-bar-height);background-color: #69D0F9;"></view>
|
||||
<form report-submit='true'>
|
||||
<view class='merchantsSettled'>
|
||||
<view class="merchantBgCount">
|
||||
<image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'"
|
||||
alt="">
|
||||
<image mode="widthFix" class="merchantBg" src="../../../static/images/SJRZ/bg.png" alt="">
|
||||
</view>
|
||||
<view class="application-record" @click="jumpToList">
|
||||
申请记录
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
|
||||
<view class="application-record">
|
||||
<u--image :showLoading="true" src="../../../static/images/SJRZ/FH.png" width="28" height="28rpx"
|
||||
@click="goBack"></u--image>
|
||||
<view @click="jumpToList" style="display: flex;">
|
||||
<u--image :showLoading="true" src="../../../static/images/SJRZ/JL.png" width="38rpx"
|
||||
height="38rpx"></u--image> 申请记录
|
||||
</view>
|
||||
</view>
|
||||
<view class="tit">
|
||||
<u--image :showLoading="true" src="../../../static/images/SJRZ/main_tit.png" width="434.58rpx"
|
||||
height="78.86rpx"></u--image>
|
||||
<u--image :showLoading="true" src="../../../static/images/SJRZ/TIT.png" width="497.66rpx"
|
||||
height="42.06rpx"></u--image>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="item">
|
||||
@ -59,7 +70,7 @@
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name">商户分类</text>
|
||||
<picker @change="bindPickerChange" :value="index" :range="array"
|
||||
<picker @change="bindPickerChange" class="my-picker" :value="index" :range="array"
|
||||
range-key="category_name">
|
||||
<input placeholder="请选择商户分类" type="text" readonly disabled
|
||||
v-model="mer_classification">
|
||||
@ -132,7 +143,8 @@
|
||||
</checkbox-group>
|
||||
<button class="settleAgree" @click="getConfig">《入驻协议》</button>
|
||||
</view>
|
||||
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">提交申请</button>
|
||||
<button class='submitBtn' :style="validate === true ? 'background:#3274F9':''"
|
||||
@click="formSubmit">提交申请</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
@ -301,6 +313,9 @@
|
||||
onShow() {},
|
||||
onReady() {},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
//是否是农贸市场
|
||||
// change(e) {
|
||||
// this.isnum = (e === true ? 1 : 0)
|
||||
@ -376,10 +391,10 @@
|
||||
this.merchantData.phone = resData.phone
|
||||
this.merchantData.classification = resData.merchant_category_id
|
||||
this.merchantData.mer_type = resData.mer_type_id
|
||||
this.area_id=resData.area_id
|
||||
this.street_id=resData.street_id
|
||||
this.mer_storeType=resData.mer_storeType
|
||||
this.village_id=resData.village_id
|
||||
this.area_id = resData.area_id
|
||||
this.street_id = resData.street_id
|
||||
this.mer_storeType = resData.mer_storeType
|
||||
this.village_id = resData.village_id
|
||||
})
|
||||
this.pics = resData.images
|
||||
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
|
||||
@ -596,7 +611,7 @@
|
||||
code: that.merchantData.yanzhengma,
|
||||
merchant_category_id: that.merchantData.classification,
|
||||
mer_type_id: that.merchantData.mer_type,
|
||||
mer_storeType:this.mer_storeType,
|
||||
mer_storeType: this.mer_storeType,
|
||||
area_id: this.area_id,
|
||||
street_id: this.street_id,
|
||||
village_id: this.village_id,
|
||||
@ -681,11 +696,11 @@
|
||||
if (!value.classification) return that.$util.Tips({
|
||||
title: '请选择商户分类'
|
||||
});
|
||||
if(!this.mer_storeType) return that.$util.Tips({
|
||||
title:'请选择商户类型'
|
||||
if (!this.mer_storeType) return that.$util.Tips({
|
||||
title: '请选择商户类型'
|
||||
})
|
||||
if(!this.business_name) return that.$util.Tips({
|
||||
title:'请选择店铺所在地'
|
||||
if (!this.business_name) return that.$util.Tips({
|
||||
title: '请选择店铺所在地'
|
||||
})
|
||||
if (!that.isAgree) return that.$util.Tips({
|
||||
title: '请勾选并同意入驻协议'
|
||||
@ -724,9 +739,9 @@
|
||||
<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 #3274F9 !important;
|
||||
background-color: #3274F9 !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.uni-input-placeholder {
|
||||
@ -753,6 +768,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
position: absolute;
|
||||
height: 175.44rpx;
|
||||
// background-color: red;
|
||||
top: 100rpx;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.merchantBgCount {
|
||||
line-height: 0;
|
||||
}
|
||||
@ -779,14 +806,23 @@
|
||||
}
|
||||
|
||||
.application-record {
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
top: 240rpx;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
top: 40rpx;
|
||||
right: 0;
|
||||
/* #ifdef APP-PLUS */
|
||||
top: var(--status-bar-height);
|
||||
/* #endif */
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
line-height: 38rpx;
|
||||
// background-color: rgba(0, 0, 0, 0.3);
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 20px 0px 0px 20px;
|
||||
}
|
||||
@ -996,9 +1032,10 @@
|
||||
position: absolute;
|
||||
width: 93px;
|
||||
line-height: 27px;
|
||||
border: 1px solid var(--view-theme);
|
||||
border: 1px solid #3274F9;
|
||||
border-radius: 15px;
|
||||
color: var(--view-theme);
|
||||
color: #3274F9;
|
||||
// color: $primary-color;
|
||||
text-align: center;
|
||||
bottom: 8px;
|
||||
right: 0;
|
||||
@ -1022,7 +1059,7 @@
|
||||
color: #fff;
|
||||
background: #E3E3E3;
|
||||
margin-top: 25px;
|
||||
pointer-events: none;
|
||||
// pointer-events: none;
|
||||
}
|
||||
|
||||
.merchantsSettled .submitBtn.on {
|
||||
@ -1241,4 +1278,6 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.my-picker {}
|
||||
</style>
|
@ -113,6 +113,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
getHotBanner('good').then(res => {
|
||||
// console.log(res);
|
||||
this.bgData = res.data
|
||||
})
|
||||
this.getArticle()
|
||||
|
@ -105,7 +105,7 @@
|
||||
<view class="order-wrapper">
|
||||
<view class="order-hd flex skeleton-rect">
|
||||
<view class="left">我的订单</view>
|
||||
<view class="right flex" @click="authTo('/pages/users/order_list/index?status=-1')" hover-class="none"
|
||||
<view class="right flex" @click="authTo('/pages/users/order_list/index?status=-1&product_type=0')" hover-class="none"
|
||||
open-type="navigate">
|
||||
全部订单
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
@ -287,19 +287,19 @@
|
||||
{
|
||||
icon: 'icon-daifahuo1',
|
||||
title: '待发货',
|
||||
url: '/pages/users/order_list/index?status=1',
|
||||
url: '/pages/users/order_list/index?status=2',
|
||||
num: 0
|
||||
},
|
||||
{
|
||||
icon: 'icon-daishouhuo1',
|
||||
title: '待收货',
|
||||
url: '/pages/users/order_list/index?status=2',
|
||||
url: '/pages/users/order_list/index?status=3',
|
||||
num: 0
|
||||
},
|
||||
{
|
||||
icon: 'icon-daipingjia1',
|
||||
title: '待评价',
|
||||
url: '/pages/users/order_list/index?status=3',
|
||||
url: '/pages/users/order_list/index?status=4',
|
||||
num: 0
|
||||
},
|
||||
{
|
||||
@ -420,7 +420,10 @@
|
||||
// 菜单显示
|
||||
filterMenus: function(item) {
|
||||
let that = this;
|
||||
if (item.url == '/pages/users/user_money/index') item.isShow = that.balance_func_status == 1
|
||||
if (item.url == '/pages/users/user_money/index') {
|
||||
// item.isShow = that.balance_func_status == 1
|
||||
item.isShow = true
|
||||
}
|
||||
else if (item.url == '/pages/users/user_spread_user/index') {
|
||||
if (that.extension_status == 0) {
|
||||
item.isShow = false
|
||||
@ -436,6 +439,8 @@
|
||||
else if (item.url == '/pages/users/user_grade/index') item.isShow = that.member_status == 1
|
||||
else if (item.url == '/pages/users/user_integral/index') item.isShow = that.integral_status == 1
|
||||
else item.isShow = true
|
||||
|
||||
|
||||
},
|
||||
showMenu(menu) {
|
||||
return !menu || ['integral', 'service', 'admin_order', 'verify_order', 'intention', 'promoter', 'balance']
|
||||
@ -556,6 +561,7 @@
|
||||
that.filterMenus(item)
|
||||
that.personalMenu.push(item)
|
||||
})
|
||||
|
||||
that.imgUrls = res.data.banner
|
||||
});
|
||||
},
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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 || ''}}{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}
|
||||
|
||||
</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)">
|
||||
@ -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}%`
|
||||
console.log(res.data.order[0]);
|
||||
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);
|
||||
console.log(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,9 @@
|
||||
});
|
||||
},
|
||||
fail: (e) => {
|
||||
// 暂不跳转
|
||||
let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
||||
'&msg=取消支付';
|
||||
'&msg=取消支付' + '&product_type=' + that.product_type;
|
||||
return that.$util.Tips({
|
||||
title: '取消支付',
|
||||
}, {
|
||||
@ -1261,8 +1312,9 @@
|
||||
});
|
||||
},
|
||||
complete: () => {
|
||||
// 暂不跳转
|
||||
let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
||||
'&msg=取消支付';
|
||||
'&msg=取消支付' + '&product_type=' + that.product_type;
|
||||
return that.$util.Tips({
|
||||
title: '取消支付',
|
||||
}, {
|
||||
@ -1297,8 +1349,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 +1376,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 +1401,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,8 +1414,11 @@
|
||||
},
|
||||
complete: () => {
|
||||
uni.hideLoading();
|
||||
// 暂不跳转
|
||||
let pages = '/pages/order_pay_status/index?order_id=' +
|
||||
orderId + '&msg=取消支付'
|
||||
orderId + '&msg=取消支付' + '&product_type=' + that
|
||||
.product_type
|
||||
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
@ -1370,8 +1430,10 @@
|
||||
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 +1491,7 @@
|
||||
this.virtualIndex = index;
|
||||
},
|
||||
SubOrder: function(e) {
|
||||
console.log(this.active);
|
||||
|
||||
|
||||
let that = this,
|
||||
data = {};
|
||||
if (!that.payType) return that.$util.Tips({
|
||||
@ -1555,6 +1616,15 @@
|
||||
.Tips({
|
||||
title: '余额不足!'
|
||||
});
|
||||
|
||||
// 先货后款暂不可用
|
||||
// if (this.payType == 'creditBuy') {
|
||||
// uni.navigateTo({
|
||||
// ur
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
uni.showLoading({
|
||||
title: '订单支付中',
|
||||
mask: true
|
||||
@ -1567,92 +1637,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
@ -110,11 +110,13 @@
|
||||
<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 == 0 && item.pay_type !=3" class='t-color'>待发货</view>
|
||||
<view v-if="item.status == 0 && item.pay_type==3" 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 == 2 &&item.pay_type !==8" 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.status == 2 &&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">
|
||||
|
@ -5,50 +5,70 @@
|
||||
<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' class="list_nput" 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>
|
||||
|
||||
</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>
|
||||
<!-- <input type='text' class="location-input" placeholder='请填写具体地址' name='detail'
|
||||
placeholder-class='placeholder' v-model="userAddress.detail"></input> -->
|
||||
<textarea class="location-input" placeholder='请填写具体地址' name='detail'
|
||||
placeholder-class='placeholder' v-model="userAddress.detail" />
|
||||
|
||||
<view class="location" @click="selfLocation">
|
||||
<text class="iconfont icon-chakanditu"></text>
|
||||
<br>
|
||||
定位
|
||||
<image src="@/static/images/loction.png" mode=""></image>
|
||||
</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>
|
||||
<button class='keepBnt' form-type="submit">保存</button>
|
||||
<!-- #ifdef MP -->
|
||||
<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='areaChoose' @areaComplete='areaComplete' :address='region'></areaWindow>
|
||||
<!-- <villageTeam ref="villageTeam" :display="display_one" :address="villageInfo" :villageaddress="list"
|
||||
@submit="OnChangevAddress" @changeClose="changevClose"></villageTeam> -->
|
||||
<villageTeam ref='villageTeam' @villageComplete='OnChangevAddress' :address="villageInfo"></villageTeam>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
</view>
|
||||
</template>
|
||||
@ -63,16 +83,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 {
|
||||
@ -83,7 +115,7 @@
|
||||
userAddress: {
|
||||
is_default: false
|
||||
}, //地址详情
|
||||
region: ['省', '市', '区'],
|
||||
region: [],
|
||||
valueRegion: [0, 0, 0],
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
@ -92,14 +124,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 +158,16 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
OnChangeAddress(address){
|
||||
areaComplete(address) {
|
||||
|
||||
this.addressInfo = address
|
||||
},
|
||||
OnChangeAddress(address) {
|
||||
this.addressInfo = address;
|
||||
this.list = address
|
||||
},
|
||||
OnChangevAddress(address) {
|
||||
this.villageInfo = address;
|
||||
},
|
||||
// 地址数据
|
||||
getCityList: function() {
|
||||
@ -129,13 +176,21 @@
|
||||
this.district = res.data
|
||||
})
|
||||
},
|
||||
changeRegion(){
|
||||
this.display = true;
|
||||
changeRegion() {
|
||||
// this.display = true;
|
||||
this.$refs.areaChoose.show()
|
||||
},
|
||||
changevillage() {
|
||||
// this.display_one = true;
|
||||
this.$refs.villageTeam.show()
|
||||
},
|
||||
// 关闭地址弹窗;
|
||||
changeClose: function() {
|
||||
this.display = false;
|
||||
},
|
||||
changevClose: function() {
|
||||
this.display_one = false;
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun: function() {
|
||||
this.isShowAuth = false;
|
||||
@ -155,11 +210,14 @@
|
||||
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];
|
||||
this.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.$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 +228,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 +242,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 +272,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 +301,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 +317,7 @@
|
||||
duration: 1000
|
||||
});
|
||||
})
|
||||
}).catch(e=>{
|
||||
}).catch(e => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '定位失败,请手动输入地址',
|
||||
@ -291,12 +355,16 @@
|
||||
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: '保存中',
|
||||
@ -323,8 +391,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 +423,118 @@
|
||||
<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{
|
||||
color: var(--view-theme);
|
||||
|
||||
right: 40rpx;
|
||||
top: 50rpx;
|
||||
width: 58rpx;
|
||||
height: 58rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.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 {
|
||||
width: 475rpx;
|
||||
|
||||
.addAddress .list .item input,
|
||||
{
|
||||
|
||||
box-sizing: border-box;
|
||||
padding-left: 28rpx;
|
||||
width: 491rpx;
|
||||
height: 84rpx;
|
||||
background: #F4F7FE;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
opacity: 1;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.addAddress .list .item input,
|
||||
.region .region_count {
|
||||
padding-left: 28rpx;
|
||||
width: 491rpx;
|
||||
padding: 28rpx 21rpx;
|
||||
background: #F4F7FE;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
opacity: 1;
|
||||
font-size: 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
.region .region_count{
|
||||
height: 42rpx;
|
||||
line-height: 42rpx;
|
||||
.icon-xiangyou{
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.addAddress .list .location-input{
|
||||
padding-right: 70rpx;
|
||||
|
||||
|
||||
.addAddress .list .location-input {
|
||||
width: 491rpx;
|
||||
height: 147rpx !important;
|
||||
padding: 28rpx 21rpx;
|
||||
|
||||
white-space: normal !important;
|
||||
background: #F4F7FE;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
|
||||
}
|
||||
|
||||
.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;
|
||||
@ -430,8 +544,9 @@
|
||||
margin: 50rpx auto;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
background-color: var(--view-theme);
|
||||
background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
|
||||
}
|
||||
|
||||
.addAddress .wechatAddress {
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
@ -443,4 +558,4 @@
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -7,23 +7,31 @@
|
||||
<radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
|
||||
<view class='item' v-for="(item,index) in addressList" :key="index">
|
||||
<view class='address' @click='goOrder(item.address_id)'>
|
||||
<view class='consignee'>收货人:{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
|
||||
<view>收货地址:{{item.province || ''}}{{item.city || ''}}{{item.district || ''}}{{item.street || ''}}{{item.detail || ''}}</view>
|
||||
<view class='consignee'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
|
||||
<view>
|
||||
{{item.province || ''}}{{item.city || ''}}{{item.district || ''}}{{item.street || ''}}{{item.brigade|| ''}}{{item.detail || ''}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class='operation acea-row row-between-wrapper'>
|
||||
<!-- #ifndef MP -->
|
||||
<radio class="radio" :value="index.toString()" :checked="item.is_default ? true : false">
|
||||
<text>设为默认</text>
|
||||
<text class="is_default" v-if="item.is_default">已设置为默认</text>
|
||||
<text v-else>设置为默认</text>
|
||||
</radio>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<radio class="radio" :value="index" :checked="item.is_default ? true : false">
|
||||
<text>设为默认</text>
|
||||
<text>设置为默认</text>
|
||||
</radio>
|
||||
<!-- #endif -->
|
||||
<view class='acea-row row-middle'>
|
||||
<view @click='editAddress(item.address_id)'><text class='iconfont icon-bianji'></text>编辑</view>
|
||||
<view @click='delAddress(index)'><text class='iconfont icon-shanchu'></text>删除</view>
|
||||
<view @click='editAddress(item.address_id)'>编辑
|
||||
</view>
|
||||
<view class="row-middle-solid">
|
||||
|
||||
</view>
|
||||
<view @click='delAddress(index)'>删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -38,7 +46,7 @@
|
||||
<view>暂无地址</view>
|
||||
</view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<view class='addressBnt b-color on' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<view class='addressBnt b-color on' @click='addAddress'>添加新地址</view>
|
||||
</view>
|
||||
</view>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
@ -59,7 +67,9 @@
|
||||
const jweixin = require('@/plugin/jweixin-module/index.js')
|
||||
// #endif
|
||||
|
||||
import {getWechatConfig} from '@/api/public.js'
|
||||
import {
|
||||
getWechatConfig
|
||||
} from '@/api/public.js'
|
||||
import {
|
||||
getAddressList,
|
||||
setAddressDefault,
|
||||
@ -67,9 +77,13 @@
|
||||
editAddress,
|
||||
postAddress
|
||||
} from '@/api/user.js';
|
||||
import { mapGetters } from "vuex";
|
||||
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
|
||||
@ -87,7 +101,7 @@
|
||||
limit: 20,
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
wxConfig:{},
|
||||
wxConfig: {},
|
||||
domain: HTTP_REQUEST_URL,
|
||||
};
|
||||
},
|
||||
@ -105,8 +119,8 @@
|
||||
// #endif
|
||||
this.getAddressList(true);
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
@ -147,10 +161,10 @@
|
||||
// post_code: res.postalCode,
|
||||
phone: res.telNumber,
|
||||
detail: res.detailInfo,
|
||||
province:res.provinceName,
|
||||
district:res.countyName,
|
||||
city:res.cityName,
|
||||
city_id:''
|
||||
province: res.provinceName,
|
||||
district: res.countyName,
|
||||
city: res.cityName,
|
||||
city_id: ''
|
||||
}).then(res => {
|
||||
that.$util.Tips({
|
||||
title: "添加成功",
|
||||
@ -165,9 +179,10 @@
|
||||
});
|
||||
},
|
||||
fail: function(res) {
|
||||
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({
|
||||
title: '取消选择'
|
||||
});
|
||||
if (res.errMsg == 'chooseAddress:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消选择'
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
@ -207,7 +222,7 @@
|
||||
detail: res.detailInfo,
|
||||
post_code: res.postalCode,
|
||||
is_default: 1,
|
||||
city_id:""
|
||||
city_id: ""
|
||||
})
|
||||
.then(() => {
|
||||
that.$util.Tips({
|
||||
@ -294,7 +309,8 @@
|
||||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' +couponId
|
||||
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' +
|
||||
pinkId + '&couponId=' + couponId
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -347,7 +363,8 @@
|
||||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.redirectTo({
|
||||
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' + id + '&pinkId=' +
|
||||
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' +
|
||||
id + '&pinkId=' +
|
||||
pinkId + '&couponId=' + couponId
|
||||
})
|
||||
}
|
||||
@ -362,62 +379,108 @@
|
||||
<style>
|
||||
/deep/radio .wx-radio-input.wx-radio-input-checked,
|
||||
/deep/uni-radio .uni-radio-input.uni-radio-input-checked {
|
||||
border: 1px solid var(--view-theme)!important;
|
||||
background-color: var(--view-theme)!important;
|
||||
/* border: 1px solid var(--view-theme) !important; */
|
||||
/* background-color: var(--view-theme) !important; */
|
||||
}
|
||||
|
||||
.address-management.fff {
|
||||
background-color: #fff;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.address-management .line {
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
|
||||
}
|
||||
|
||||
.address-management .line image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
.address-management .item {
|
||||
background-color: #fff;
|
||||
padding: 0 30rpx;
|
||||
width: 694rpx;
|
||||
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 14px 2px rgba(222, 233, 254, 1);
|
||||
padding: 0 28rpx;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 12rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.address-management .item .address {
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
}
|
||||
|
||||
.is_default {
|
||||
|
||||
color: #3274F9;
|
||||
}
|
||||
|
||||
.address-management .item .address .consignee {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.address-management .item .address .consignee .phone {
|
||||
margin-left: 25rpx;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-left: 35rpx;
|
||||
}
|
||||
|
||||
.address-management .item .operation {
|
||||
height: 83rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
height: 60rpx;
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
}
|
||||
|
||||
.b-color {
|
||||
background-color: var(--view-theme);
|
||||
}
|
||||
|
||||
.address-management .item .operation .radio text {
|
||||
margin-left: 13rpx;
|
||||
}
|
||||
|
||||
.address-management .item .operation .iconfont {
|
||||
color: #2c2c2c;
|
||||
font-size: 35rpx;
|
||||
vertical-align: -2rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.address-management .item .operation .iconfont.icon-shanchu {
|
||||
margin-left: 40rpx;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.row-middle-solid {
|
||||
width: 1px;
|
||||
height: 24rpx;
|
||||
background: #3274F9;
|
||||
margin-left: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-top: 3rpx;
|
||||
|
||||
}
|
||||
|
||||
.address-management .footer {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
@ -429,6 +492,7 @@
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt {
|
||||
width: 330rpx;
|
||||
height: 76rpx;
|
||||
@ -437,28 +501,35 @@
|
||||
line-height: 76rpx;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt.on {
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt .iconfont {
|
||||
font-size: 35rpx;
|
||||
margin-right: 8rpx;
|
||||
vertical-align: -1rpx;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt.wxbnt {
|
||||
background-color: #fe960f;
|
||||
}
|
||||
.noCommodity{
|
||||
|
||||
.noCommodity {
|
||||
text-align: center;
|
||||
border-top: none;
|
||||
margin-top: 15vh;
|
||||
}
|
||||
.noCommodity .pictrue{
|
||||
|
||||
.noCommodity .pictrue {
|
||||
height: 305rpx;
|
||||
}
|
||||
.noCommodity view{
|
||||
|
||||
.noCommodity view {
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -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>
|
||||
|
@ -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
@ -1,103 +1,110 @@
|
||||
import { getUserInfo } from "../../api/user.js";
|
||||
import { LOGIN_STATUS, UID } from '../../config/cache';
|
||||
import {
|
||||
getUserInfo
|
||||
} 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';
|
||||
|
||||
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) {
|
||||
// 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
|
||||
}
|
||||
};
|
||||
|
||||
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(() => {
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
};
|
42
uni.scss
42
uni.scss
@ -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
Loading…
x
Reference in New Issue
Block a user