老版本代码

This commit is contained in:
jia 2023-08-28 14:02:12 +08:00
parent 30449aaf6d
commit c80c66353c
66 changed files with 13948 additions and 10191 deletions

1
.gitignore vendored
View File

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

65
App.vue
View File

@ -9,8 +9,9 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// #ifdef APP-PLUS // #ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush"); let jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif import { // #endif
import {
checkLogin checkLogin
} from "./libs/login"; } from "./libs/login";
import { import {
@ -21,7 +22,13 @@
history history
} from '@/api/public.js' } from '@/api/public.js'
import Routine from './libs/routine.js'; import Routine from './libs/routine.js';
export default { export default {
data() {
return {
audioTeam: []
}
},
globalData: { globalData: {
spid: 0, spid: 0,
code: 0, code: 0,
@ -118,8 +125,9 @@
// #endif // #endif
that.getConfigData() that.getConfigData()
//#ifdef APP-PLUS //#ifdef APP-PLUS
jpushModule.setLoggerEnable(true); jpushModule.setLoggerEnable(true);
jpushModule.initJPushService() jpushModule.initJPushService()
jpushModule.addConnectEventListener(result => { jpushModule.addConnectEventListener(result => {
@ -151,6 +159,17 @@
let extras = result.extras let extras = result.extras
console.log("通知", result) 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') { if (notificationEventType == 'notificationOpened') {
uni.navigateTo({ uni.navigateTo({
@ -200,11 +219,43 @@
// #endif // #endif
}, },
methods: { 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) { setOpenShare: function(data) {
let that = this; let that = this;
let href = location.href; let href = location.href;
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this.globalData href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
.globalData
.uid; .uid;
if (that.$wechat.isWeixin()) { if (that.$wechat.isWeixin()) {
let configAppMessage = { let configAppMessage = {
@ -213,7 +264,8 @@
link: href, link: href,
imgUrl: data.share_pic imgUrl: data.share_pic
}; };
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage); that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
configAppMessage);
} }
}, },
// //
@ -254,6 +306,7 @@
this.globalData.community_reply_auth = res.data.community_reply_auth this.globalData.community_reply_auth = res.data.community_reply_auth
this.globalData.margin_ico_switch = res.data.margin_ico_switch this.globalData.margin_ico_switch = res.data.margin_ico_switch
this.globalData.margin_ico = res.data.margin_ico 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("VIEW_COLOR", res.data.global_theme.theme)
this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type) this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type)
try { try {
@ -289,8 +342,10 @@
@import 'static/css/base.css'; @import 'static/css/base.css';
@import 'static/iconfont/iconfont.css'; @import 'static/iconfont/iconfont.css';
@import 'static/iconfont/iconlihai.css'; @import 'static/iconfont/iconlihai.css';
@import 'static/iconfont/icontan.css';
@import 'static/css/style.scss'; @import 'static/css/style.scss';
view { view {
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -1,13 +1,13 @@
{ {
"version" : "1", "version" : "1",
"prompt" : "template", "prompt" : "template",
"title": "服务协议和隐私政策", "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>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "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" : "同意并接受", "buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意", "buttonRefuse" : "暂不同意",
"second" : { "second" : {
"title" : "确认提示", "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>,否则将退出应用。", "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" : "同意并继续", "buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用" "buttonRefuse" : "退出应用"
}, },

View File

@ -13,68 +13,107 @@ import request from "@/utils/request.js";
* 统计数据 * 统计数据
*/ */
export function getStatisticsInfo() { export function getStatisticsInfo() {
return request.get("admin/order/statistics", {}, { login: true }); return request.get("admin/order/statistics", {}, {
login: true
});
} }
/** /**
* 订单月统计 * 订单月统计
*/ */
export function getStatisticsMonth(where) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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) { 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 {*} * @returns {*}
*/ */
export function getLogistics() { export function getLogistics() {
return request.get("logistics", {}, { login: false }); return request.get("logistics", {}, {
login: false
});
} }
/** /**
@ -108,40 +149,57 @@ export function verifierOrder(mer_id, code) {
export function orderStatistics(mer_id, data) { 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 {*} * @returns {*}
*/ */
export function orderPrice(where, mer_id) { 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 {*} * @returns {*}
*/ */
export function getOrderList(where, merId) { 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 {*} * @returns {*}
*/ */
export function getRefundOrderList(where, merId) { 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 {*} * @returns {*}
*/ */
export function turnoverStatistics(where, merId) { 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 {*} * @returns {*}
*/ */
export function orderNumberStatistics(where, merId) { 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
});
} }
/** /**
* 获取订单打印默认配置 * 获取订单打印默认配置
@ -183,26 +241,34 @@ export function getRefundOrderInfo(merId, id) {
* @returns {*} * @returns {*}
*/ */
export function refundOrderSubmit(merId, id, data) { 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 {*} * @returns {*}
*/ */
export function refundOrderReceive(merId, id) { 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) { 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) { 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
});
} }
/** /**
* 去核销 * 去核销
@ -211,3 +277,20 @@ export function setRefundMark(merId, orderId, data) {
export function orderCancellation(merId, id) { export function orderCancellation(merId, id) {
return request.post(`admin/${merId}/verify/${id}`); return request.post(`admin/${merId}/verify/${id}`);
} }
/**
* 去核销
* @param object data
*/
export function purchaseOrder(where, merId) {
return request.get(`admin/${merId}/purchaseOrder`, where, {
login: true
});
}
/**
* 商家物流取件二维码
* @param object data
*/
export function logisticsCode(id) {
return request.get(`order/logistics_code/${id}`);
}

View File

@ -269,3 +269,21 @@ export function ajcaptchaCheck(data) {
noAuth: true noAuth: true
}); });
} }
/**
* 获取所在的地区数据
* @param {Object} data
*/
export function village(data) {
return request.get('v2/system/geo/lst', data, { noAuth: true });
}
/**
* 获取所在的村队数据
* @param {Object} data
*/
export function brigade(data) {
return request.get('v2/system/brigade', data, { noAuth: true });
}

View File

@ -107,7 +107,7 @@ export function orderDel(id) {
} }
/** /**
* 订单详情 * 已付款订单详情
* @param string uni * @param string uni
*/ */
export function getOrderDetail(uni) { export function getOrderDetail(uni) {
@ -115,11 +115,11 @@ export function getOrderDetail(uni) {
} }
/** /**
* 订单详情 * 未付款订单详情
* @param string uni * @param string uni
*/ */
export function groupOrderDetail(uni) { export function groupOrderDetail(uni,product_type) {
return request.get('order/group_order_detail/' + uni); return request.get('order/group_order_detail/' + uni+'?product_type=' + product_type);
} }
// 支付状态订单 // 支付状态订单

View File

@ -13,7 +13,12 @@ import request from "@/utils/request.js";
* 获取商品详情 * 获取商品详情
*/ */
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data) 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 * 获取商户基本信息 http://127.0.0.1:8324/api/store/merchant/info?id=4
*/ */

View File

@ -467,7 +467,7 @@ export function getGeocoder(data) {
* *
*/ */
export function getStoreTypeApi() { export function getStoreTypeApi() {
return request.get('intention/type', {}, { return request.get('intention/type', {sift_store:1}, {
noAuth: true noAuth: true
}); });
} }

View File

@ -708,3 +708,7 @@ export function hasServiceApi(id) {
export function getBankInfo() { export function getBankInfo() {
return request.get(`user/extract/history_bank`) return request.get(`user/extract/history_bank`)
} }
// 商户账单管理
export function getBillDetil() {
return request.get(`mer/financial_record`)
}

View File

@ -1,16 +1,33 @@
<template> <template>
<view :style="viewColor"> <view :style="viewColor">
<view class="address-window" :class="address.address==true?'on':''"> <view class="address-window" :class="address.address==true?'on':''">
<view class='title'>选择地址<text class='iconfont icon-guanbi' @tap='close'></text></view> <view class='title'>收货地址
<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" <!-- <text class='iconfont icon-guanbi' @tap='close'></text> -->
@tap='tapAddress(index,item.address_id)' :key='index'> <view class="top_img">
<text class='iconfont icon-ditu' :class='active==index?"t-color":""'></text> <image src="@/static/images/close.png" mode="aspectFill" @tap='close'></image>
<view class='address'> </view>
<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>
<scroll-view scroll-y="true" class='list'>
<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' >{{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> </view>
<text class='iconfont icon-complete' :class='active==index?"t-color":""'></text>
</view> </view>
</scroll-view> </scroll-view>
<!-- 无地址 --> <!-- 无地址 -->
@ -18,7 +35,7 @@
<image src='../../static/images/noAddress.png'></image> <image src='../../static/images/noAddress.png'></image>
<view>暂无地址</view> <view>暂无地址</view>
</view> </view>
<view class='addressBnt' @tap='goAddressPages'>添加新地址</view> <view class='addressBnt' @tap='goAddressPages'>地址</view>
</view> </view>
<view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view> <view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view>
</view> </view>
@ -34,8 +51,12 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { getAddressList } from '@/api/user.js'; import {
import { mapGetters } from "vuex"; getAddressList
} from '@/api/user.js';
import {
mapGetters
} from "vuex";
export default { export default {
props: { props: {
pagesUrl: { pagesUrl: {
@ -112,9 +133,11 @@
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9); transition: all .3s cubic-bezier(.25, .5, .5, .9);
} }
.address-window.on { .address-window.on {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
.address-window .title { .address-window .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
@ -122,16 +145,32 @@
height: 123rpx; height: 123rpx;
line-height: 123rpx; line-height: 123rpx;
position: relative; position: relative;
.top_img {
position: absolute;
right: 33rpx;
top: 20rpx;
width: 58rpx;
height: 58rpx;
image {
width: 58rpx;
height: 58rpx;
} }
}
}
.address-window .title .iconfont { .address-window .title .iconfont {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
color: #8a8a8a; color: #8a8a8a;
font-size: 35rpx; font-size: 35rpx;
} }
.address-window .list { .address-window .list {
max-height: 650rpx; max-height: 650rpx;
} }
.address-window .list .item { .address-window .list .item {
margin-left: 30rpx; margin-left: 30rpx;
padding-right: 30rpx; padding-right: 30rpx;
@ -140,29 +179,55 @@
font-size: 25rpx; font-size: 25rpx;
color: #333; color: #333;
} }
.address-window .list .item .iconfont { .conent{
font-size: 37rpx; width: 694rpx;
color: #2c2c2c; 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; font-size: 30rpx;
color: #fff;
}
.address-window .list .item .address {
width: 560rpx;
}
.address-window .list .item .address .name {
font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #282828; color: #333333;
margin-bottom: 4rpx;
margin-bottom: 10rpx;
} }
.address-window .list .item .address .name .phone {
.conent .name .phone {
margin-left: 18rpx; 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 { .address-window .addressBnt {
font-size: 30rpx; font-size: 33rpx;
font-weight: bold; font-weight: 500;
color: #fff; color: #fff;
width: 690rpx; width: 690rpx;
height: 86rpx; height: 86rpx;
@ -170,18 +235,23 @@
text-align: center; text-align: center;
line-height: 86rpx; line-height: 86rpx;
margin: 85rpx auto; margin: 85rpx auto;
background-color: var(--view-theme); background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
} }
.address-window .pictrue { .address-window .pictrue {
text-align: center; text-align: center;
} }
.address-window .pictrue image,.address-window .pictrue uni-image {
.address-window .pictrue image,
.address-window .pictrue uni-image {
width: 414rpx; width: 414rpx;
height: 305rpx; height: 305rpx;
} }
.address-window .pictrue view { .address-window .pictrue view {
color: #999; color: #999;
} }
.t-color { .t-color {
color: var(--view-theme) !important; color: var(--view-theme) !important;
} }

View File

@ -1,258 +1,557 @@
<template> <template>
<view :style="viewColor"> <uni-popup type="bottom" ref="areaChoose">
<view class="address-window" :class="display==true?'on':''"> <view class="mian getHeight" id="main">
<view class='title'>请选择所在地区<text class='iconfont icon-guanbi' @tap='close'></text></view> <view class="top getHeight" id="top">
<view class="address-count"> <text>请选择所在地区</text>
<view class="address-selected"> <!-- <text class="iconfont close" @click.stop="close">&#xe7fa;</text> -->
<view v-for="(item,index) in selectedArr" :key="index" class="selected-list" :class="{active:index === selectedIndex}" @click="change(item.parent_id, index)"> <view class="top_img">
{{item.name}} <image src="@/static/images/close.png" mode="aspectFill" @click.stop="close"></image>
<text class="iconfont icon-xiangyou"></text> </view>
</view> </view>
<view class="selected-list" :class="{active:-1 === selectedIndex}" v-if="showMore" @click="change(-1, -1)"> <scroll-view scroll-x="true" @scroll="scroll" :show-scrollbar="false" class="nav getHeight" id="nav"
<text class="iconfont icon-xiangyou"></text> :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">&#xe674;</text> -->
{{ item2.name }}
</text>
</view> </view>
</view> </view>
<scroll-view scroll-y="true" :scroll-top="scrollTop" class="address-list" @scroll="scroll">
<view v-for="(item,index) in addressList" :key="index" class="list" :class="{active:item.id === activeId}" @click="selected(item)">
<text class="item-name">{{item.name}}</text>
<text v-if="item.id === activeId" class="iconfont icon-duihao2"></text>
</view> </view>
</scroll-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> </view>
</view> </view>
<view class='mask' catchtouchmove="true" :hidden='display==false' @tap='close'></view>
</view> </view>
</uni-popup>
</template> </template>
<script> <script>
// +---------------------------------------------------------------------- import {
// | CRMEB [ CRMEB ] getAddressList
// +---------------------------------------------------------------------- } from '@/api/user.js';
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. import {
// +---------------------------------------------------------------------- village
// | Licensed CRMEBCRMEB } from '@/api/api.js';
// +----------------------------------------------------------------------
// | 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 = {};
export default { export default {
name: 'area-choose',
props: { props: {
display: {
type: Boolean,
default: true
},
address: Array, address: Array,
}, },
data() { data() {
return { return {
active: 0, list: ['请选择', '', '', '', ''],
// areaIndex: 0,
addressList: [], navBottomLeft: 0,
selectedArr: [], scrollIntoView: 'area0',
selectedIndex: -1, code: '440100',
is_loading: false, provinceList: [], //
old: { scrollTop: 0 }, proCode: -1,
scrollTop: 0 cityList: [],
cityCode: -1,
disList: [],
disCode: -1,
townList: [],
townCode: -1,
streeCode: -1,
streeList: [],
areaCode: -1,
areaList: [],
swiperH: 300, //
current: 0, //
id: '', //ABC...
id2: '',
scrollTopList: [{
id: 'A',
top: 0
}],
scrollTopListAll: {}
}; };
}, },
computed:{ onLoad() {
...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)
}
}
}, },
mounted() { 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: { methods: {
change(pid,index){ close() {
if(this.selectedIndex == index) return; this.$refs.areaChoose.close()
if(pid === -1){
pid = this.selectedArr.length ? this.selectedArr[this.selectedArr.length -1].id : 0;
}
this.selectedIndex = index;
this.loadAddress(pid);
}, },
loadAddress(pid){ show() {
if(CACHE_ADDRESS[pid]){
this.addressList = CACHE_ADDRESS[pid];
return ; 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; if (!this.provinceList) {
CACHE_ADDRESS[pid] = res.data; this.getData();
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 { } else {
this.selectedArr.push(item); this.getScrollT(0, this.provinceList.length)
} this.current = 0;
if(item.snum){
this.loadAddress(item.id);
} else {
this.$emit('submit', [...this.selectedArr]);
this.$emit('changeClose');
}
this.goTop()
},
close: function() {
this.$emit('changeClose');
},
scroll : function(e) {
this.old.scrollTop = e.detail.scrollTop
},
goTop: function(e) {
this.scrollTop = this.old.scrollTop
this.$nextTick(()=>{ this.$nextTick(()=>{
this.scrollTop = 0 setTimeout(() => {
this.areaSelect(0);
}, 300)
})
}
this.$nextTick(()=>{
setTimeout(() => {
this.getSwiperH();
}, 300)
})
},
onchange(e) {
const value = e.detail.value;
},
scroll(e) {
this.scrollTopList.some((item, index) => {
if (e.detail.scrollTop > item.top) {
this.id = item.id
}
})
},
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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.address-window { .mian {
background-color: #fff; height: 85vh;
position: fixed;
bottom: 0;
left: 0;
width: 100%; width: 100%;
z-index: 101; background-color: #ffffff;
border-radius: 30rpx 30rpx 0 0; border-radius: 20rpx 20rpx 0 0;
transform: translate3d(0, 100%, 0); position: relative;
transition: all .3s cubic-bezier(.25, .5, .5, .9);
} .top {
.address-window.on { display: flex;
transform: translate3d(0, 0, 0); align-items: center;
} justify-content: space-between;
.address-window .title { padding-left: 30rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
text-align: center; padding: 40rpx 30rpx 30rpx;
height: 123rpx;
line-height: 123rpx; .top_img {
position: relative; width: 58rpx;
} height: 58rpx;
.address-window .title .iconfont {
position: absolute; image {
right: 30rpx; width: 100%;
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%; height: 100%;
background-color: var(--view-theme);
top: 0;
left: 10rpx;
}
&:after{
width: 12rpx;
height: 12rpx;
background: var(--view-theme);
border-radius: 100%;
left: 6rpx;
top: 50%;
margin-top: -8rpx;
}
&:first-child,&:last-child{
&:before{
height: 50%;
} }
} }
&:first-child{
&:before{
top: auto;
bottom: 0;
} }
.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; .nav-item {
float: right; padding: 10rpx 20rpx;
color: #dddddd;
}
}
scroll-view{
height: 550rpx;
}
.address-list{
padding: 0 30rpx;
margin-top: 20rpx;
box-sizing: border-box;
.list{
.iconfont{
float: right;
color: #ddd;
font-size: 22rpx;
}
.item-name{
display: inline-block; display: inline-block;
line-height: 50rpx; text-align: center;
margin-bottom: 20rpx; font-size: 30rpx;
font-size: 26rpx; font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #3274F9 !important;
} }
&.active{
color: #e28d54; .nav-item-a {
// color: rgb(201, 22, 35);
}
}
.swiper {
height: 1000rpx;
margin-top: 20rpx;
.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 { .iconfont {
color: #e28d54; 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;
}
} }
} }
} }

View File

@ -25,7 +25,8 @@
<text v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text> <text v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
<view class="right-btn-box event_box" > <view class="right-btn-box event_box" >
<view class="btn-item" v-if="item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0" @click.stop="refund(item)">申请退款</view>
<view class="btn-item" 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 err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view> <view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> <view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
@ -73,7 +74,7 @@
<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 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' 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 class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>

View File

@ -78,6 +78,7 @@
}); });
}, },
goPay: function(number, paytype) { goPay: function(number, paytype) {
console.log(this.payMode);
if (this.isCall) { if (this.isCall) {
return this.$emit('onChangeFun', { return this.$emit('onChangeFun', {
action: 'payCheck', action: 'payCheck',
@ -98,6 +99,7 @@
// #endif // #endif
} else if (paytype == 'balance') { } else if (paytype == 'balance') {
type = 'balance'; type = 'balance';
console.log('123');
}else if(paytype == 'alipay'){ }else if(paytype == 'alipay'){
// #ifndef MP // #ifndef MP
type = 'alipay'; type = 'alipay';
@ -105,6 +107,9 @@
// #ifdef MP // #ifdef MP
type = 'alipayQr'; type = 'alipayQr';
// #endif // #endif
}else if(paytype =='creditBuy'){
console.log('123123');
type='creditBuy'
} }
if (!that.order_id) return that.$util.Tips({ if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单' title: '请选择要支付的订单'
@ -375,7 +380,7 @@
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
background-color: #fff; background-color: #fff;
padding-bottom: 60rpx; padding-bottom: 60rpx;
z-index: 99; z-index: 99999;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9); transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
} }

View File

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

View File

@ -9,9 +9,11 @@
<view class="iconfont icon-weizhi"></view> <view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view> <view class="town_name">{{street}}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view> <view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
</navigator> </navigator>
</view> </view>
<!-- 搜索栏 --> <!-- 搜索栏 -->
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb"> <navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">

View File

@ -12,6 +12,8 @@ if (process.env.NODE_ENV === "development") {
// httpApi = 'https://shop.lihaink.cn' // 生产 // httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn" httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325'
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
httpApiTwo = "https://nk.lihaink.cn" httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn' httpApiThree = 'http://ceshi-oa.lihaink.cn'
@ -22,7 +24,7 @@ if (process.env.NODE_ENV === "development") {
// httpApiThree = 'baseUrlTest' // h5跨域配置 // httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif // #endif
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// httpApi = 'https://shop.lihaink.cn' // 生产 httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn" httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产 httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.0.15", "versionName" : "1.0.18",
"versionCode" : 138, "versionCode" : 142,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -26,7 +26,8 @@
"Camera" : {}, "Camera" : {},
"Geolocation" : {}, "Geolocation" : {},
"Payment" : {}, "Payment" : {},
"Share" : {} "Share" : {},
"OAuth" : {}
}, },
"safearea" : { "safearea" : {
"bottom" : { "bottom" : {
@ -111,9 +112,7 @@
"__platform__" : [ "ios", "android" ] "__platform__" : [ "ios", "android" ]
} }
}, },
"oauth" : { "oauth" : {},
"apple" : {}
},
"ad" : {} "ad" : {}
}, },
"icons" : { "icons" : {

View File

@ -1,5 +1,6 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [
//pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@ -166,7 +167,7 @@
"pages": [{ "pages": [{
"path": "gather/select_warehouse", "path": "gather/select_warehouse",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "入库管理",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, { }, {
@ -193,16 +194,16 @@
}, { }, {
"path": "supply_chain/supplier", "path": "supply_chain/supplier",
"style": { "style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#e93323" "navigationBarTitleText": "",
// "navigationStyle": "custom" "navigationBarBackgroundColor": "#e93323",
"navigationStyle": "custom"
} }
}, { }, {
"path": "supply_chain/merchant", "path": "supply_chain/merchant",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "商品",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -227,11 +228,9 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "teach_video/teach_video", "path": "teach_video/teach_video",
"style" : "style": {
{
"navigationBarTitleText": "教学视频", "navigationBarTitleText": "教学视频",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
@ -249,12 +248,24 @@
"navigationBarTitleText": "忘记密码" "navigationBarTitleText": "忘记密码"
} }
}, },
{
"path": "online_warehousing/index",
"style": {
"navigationBarTitleText": "采购订单"
}
},
{ {
"path": "user_setting/index", "path": "user_setting/index",
"style": { "style": {
"navigationBarTitleText": "设置" "navigationBarTitleText": "设置"
} }
}, },
{
"path": "supply_procurement/index",
"style": {
"navigationBarTitleText": "供货采购"
}
},
// //
{ {
"path": "user_about/index", "path": "user_about/index",
@ -474,6 +485,18 @@
"navigationBarTitleText": "我的订单" "navigationBarTitleText": "我的订单"
} }
}, },
{
"path": "order_list/indexCopy",
"style": {
"navigationBarTitleText": "采购订单"
}
},
{
"path": "order_list/order",
"style": {
"navigationBarTitleText": "我的订单"
}
},
{ {
"path": "order_list/search", "path": "order_list/search",
"style": { "style": {
@ -656,14 +679,124 @@
} }
}, { }, {
"path": "embody/embody", "path": "embody/embody",
"style": {
"navigationBarTitleText": "提现",
"enablePullDownRefresh": false
}
}, {
"path": "payment/payment",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "trading_hall/index",
"style": {
"navigationBarTitleText": "交易大厅",
"enablePullDownRefresh": false
}
} }
] ]
}, },
{
"root": "pages/releaseManagement",
"name": "releaseManagement",
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "发布管理",
"enablePullDownRefresh": false
}
},
{
"path": "details/index",
"style": {
"navigationBarTitleText": "发起委托",
"enablePullDownRefresh": false
}
}]
},
{
"root": "pages/commissionedSales",
"name": "commissionedSales",
"pages": [{
"path": "index/index",
"style": {
"navigationBarTitleText": "委托销售",
"enablePullDownRefresh": false
}
},
{
"path": "initiateDelegation/index",
"style": {
"navigationBarTitleText": "发起委托",
"enablePullDownRefresh": false
}
},
{
"path": "addDelegation/index",
"style": {
"navigationBarTitleText": "新增委托",
"enablePullDownRefresh": false
}
},
{
"path": "receivedCommission/index",
"style": {
"navigationBarTitleText": "收到委托",
"enablePullDownRefresh": false
}
},
{
"path": "delegation_details/index",
"style": {
"navigationBarTitleText": "委托销售详情",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pages/trading_hall",
"name": "trading_hall",
"pages": [
{
"path": "transfer_goods/index",
"style": {
"navigationBarTitleText": "新增调货",
"enablePullDownRefresh": false
}
}, {
"path": "adddiscounts/index",
"style": {
"navigationBarTitleText": "新增打折",
"enablePullDownRefresh": false
}
}, {
"path": "product_details/index",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false
}
}
]
},
{ {
"root": "pages/store", "root": "pages/store",
"name": "store", "name": "store",
@ -822,6 +955,12 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "order/monitor",
"style": {
"navigationBarTitleText": "订单监控",
"enablePullDownRefresh": false
}
} }
] ]
}, },
@ -949,7 +1088,7 @@
"path": "plant_release/index", "path": "plant_release/index",
"style": { "style": {
"navigationBarTitleText": "内容发布", "navigationBarTitleText": "内容发布",
"enablePullDownRefresh":true "enablePullDownRefresh": false
} }
}, },
{ {
@ -1028,12 +1167,16 @@
"path": "goods_search/index", "path": "goods_search/index",
"style": { "style": {
"navigationBarTitleText": "搜索商品" "navigationBarTitleText": "搜索商品"
} }
}, },
{ {
"path": "goods_search_con/index", "path": "goods_search_con/index",
"style": { "style": {
"navigationBarTitleText": "搜索商品" "navigationBarTitleText": "搜索商品",
"app-plus": {
"titleNView": false
}
} }
} }
] ]
@ -1209,10 +1352,11 @@
"path": "nvueSwiper/index", "path": "nvueSwiper/index",
//#endif //#endif
"style": { "style": {
"navigationBarTitleText": "社区视频", "navigationBarTitleText": "社区视频",
"navigationStyle": "custom", "navigationStyle": "custom",
"app-plus": { "app-plus": {
"titleNView": false, "titleNView": false,
"bounce": "none" "bounce": "none"
} }
} }

View File

@ -2,30 +2,36 @@
<view> <view>
<view class="order-index" ref="container"> <view class="order-index" ref="container">
<view class="header acea-row"> <view class="header acea-row">
<navigator class="item" :url="`/pages/admin/orderList/index?types=1&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=1&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unpaid }}</view> <view class="num">{{ census.unpaid }}</view>
<view>待付款</view> <view>待付款</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=2&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=2&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unshipped }}</view> <view class="num">{{ census.unshipped }}</view>
<view>待发货</view> <view>待发货</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=3&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=3&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.untake }}</view> <view class="num">{{ census.untake }}</view>
<view>待收货</view> <view>待收货</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=4&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=4&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.unevaluate }}</view> <view class="num">{{ census.unevaluate }}</view>
<view>待评价</view> <view>待评价</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/orderList/index?types=6&merId=${mer_id}`" hover-class="none"> <navigator class="item" :url="`/pages/admin/orderList/index?types=6&merId=${mer_id}`"
hover-class="none">
<view class="num">{{ census.refund }}</view> <view class="num">{{ census.refund }}</view>
<view>退款</view> <view>退款</view>
</navigator> </navigator>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="title"> <view class="title">
<span class="iconfont icon-shujutongji"></span>数据统计 <image src="@/static/images/sjtj.png" mode="widthFix" style="width:40rpx;translate: 0 10rpx;">
</image>数据统计
</view> </view>
<view class="list acea-row" v-if="orderData"> <view class="list acea-row" v-if="orderData">
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=today&merId=${mer_id}`" <navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=today&merId=${mer_id}`"
@ -33,7 +39,8 @@
<view class="num">{{ orderData.today.payPrice }}</view> <view class="num">{{ orderData.today.payPrice }}</view>
<view>今日成交额</view> <view>今日成交额</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=price&time=yesterday&merId=${mer_id}`" <navigator class="item"
:url="`/pages/admin/statistics/index?type=price&time=yesterday&merId=${mer_id}`"
hover-class="none"> hover-class="none">
<view class="num">{{ orderData.yesterday.payPrice }}</view> <view class="num">{{ orderData.yesterday.payPrice }}</view>
<view>昨日成交额</view> <view>昨日成交额</view>
@ -48,7 +55,8 @@
<view class="num">{{ orderData.today.orderNum}}</view> <view class="num">{{ orderData.today.orderNum}}</view>
<view>今日订单数</view> <view>今日订单数</view>
</navigator> </navigator>
<navigator class="item" :url="`/pages/admin/statistics/index?type=order&time=yesterday&merId=${mer_id}`" <navigator class="item"
:url="`/pages/admin/statistics/index?type=order&time=yesterday&merId=${mer_id}`"
hover-class="none"> hover-class="none">
<view class="num">{{ orderData.yesterday.orderNum }}</view> <view class="num">{{ orderData.yesterday.orderNum }}</view>
<view>昨日订单数</view> <view>昨日订单数</view>
@ -62,7 +70,8 @@
</view> </view>
<view class="public-wrapper"> <view class="public-wrapper">
<view class="title"> <view class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据 <image src="@/static/images/xxsj.png" mode="widthFix" style="width:40rpx;translate: 0 10rpx;">
</image>详细数据
</view> </view>
<view class="nav acea-row row-between-wrapper"> <view class="nav acea-row row-between-wrapper">
<view class="data">日期</view> <view class="data">日期</view>
@ -77,13 +86,83 @@
</view> </view>
</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> <Loading :loaded="loaded" :loading="loading"></Loading>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { getStatisticsInfo, getStatisticsMonth, orderStatistics, orderPrice } from "@/api/admin"; import {
getStatisticsInfo,
getStatisticsMonth,
orderStatistics,
orderPrice,
purchaseOrder
} from "@/api/admin";
import Loading from '@/components/Loading/index.vue' import Loading from '@/components/Loading/index.vue'
export default { export default {
name: 'adminOrder', name: 'adminOrder',
@ -99,22 +178,28 @@
month: {} month: {}
}, },
list: [], list: [],
OrderList: [], //
where: { where: {
page: 1, page: 1,
limit: 15, limit: 10,
status: 1,
keyword: '',
product_type: '' product_type: ''
}, },
loaded: false, loaded: false,
loading: false, loading: false,
mer_id: '', mer_id: '',
type_id: '', //
} }
}, },
onLoad(options) { onLoad(options) {
this.type_id = options.type_id
this.where.product_type = options.product_type ?? 0 this.where.product_type = options.product_type ?? 0
this.mer_id = options.mer_id this.mer_id = options.mer_id
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE"); options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
this.getOrderStatistics(this.mer_id); this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id) this.getList(this.mer_id)
this.purchaseOrderList(this.mer_id)
}, },
methods: { methods: {
getIndex: function() { getIndex: function() {
@ -151,7 +236,9 @@
}, },
getOrderStatistics: function(mer_id) { getOrderStatistics: function(mer_id) {
let that = this; let that = this;
const data = { product_type: this.where.product_type } const data = {
product_type: this.where.product_type
}
console.log('data', data); console.log('data', data);
orderStatistics(mer_id, data).then( orderStatistics(mer_id, data).then(
res => { res => {
@ -164,6 +251,24 @@
}) })
} }
); );
},
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() { onReachBottom() {
@ -172,7 +277,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.popupn { .popupn {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -201,6 +306,14 @@
color: #fff; color: #fff;
} }
.supervisory_img {
display: inline-block;
width: 500rpx;
height: 500rpx;
background-color: red;
overflow: hidden;
}
.iconfont { .iconfont {
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -228,7 +341,7 @@
/*订单首页*/ /*订单首页*/
.order-index .header { .order-index .header {
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/beijing2.png"); background: url("@/static/images/beijin.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: 280upx; height: 280upx;
@ -307,6 +420,14 @@
background-color: #fff; background-color: #fff;
border-radius: 10upx; border-radius: 10upx;
padding-top: 25upx; padding-top: 25upx;
.item {
.num {
display: flex;
justify-content: flex-start;
align-items: center;
}
}
} }
.public-wrapper .nav { .public-wrapper .nav {
@ -340,9 +461,118 @@
border-bottom: 1px solid #f7f7f7; border-bottom: 1px solid #f7f7f7;
height: 70upx; height: 70upx;
font-size: 24upx; font-size: 24upx;
} }
.public-wrapper .conter .item .turnover { .public-wrapper .conter .item .turnover {
color: #d84242; 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> </style>

View File

@ -86,7 +86,7 @@
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>支付方式</view> <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>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>买家留言</view> <view>买家留言</view>
@ -148,6 +148,12 @@
<view style="height:120upx;"></view> <view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'"> <view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="more"></view> <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 class="bnt cancel" @click="modify('0')" v-if="orderInfo.paid == 0">
一键改价 一键改价
</view> </view>
@ -158,11 +164,23 @@
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay"> <view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
确认付款 确认付款
</view> </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> <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 class="bnt delivery" v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1" @click="goCancellation">去核销</view>
</view> </view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice" <PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
:status="status"></PriceChange> :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> </view>
</template> </template>
<script> <script>
@ -185,7 +203,9 @@
setAdminOrderRemark, setAdminOrderRemark,
setOfflinePay, setOfflinePay,
setOrderRefund, setOrderRefund,
orderCancellation orderCancellation,
logisticsCode,
postconfirm
} from "@/api/admin"; } from "@/api/admin";
import { isMoney } from '@/utils/validate.js' import { isMoney } from '@/utils/validate.js'
import { HTTP_REQUEST_URL } from '@/config/app'; import { HTTP_REQUEST_URL } from '@/config/app';
@ -211,7 +231,10 @@
payType: "", payType: "",
types: "", types: "",
clickNum: 1, clickNum: 1,
goname:''
goname:'',
popUpShow: false,
payCodeUrl:''
}; };
}, },
watch: { watch: {
@ -225,12 +248,12 @@
}, },
onLoad: function(option) { onLoad: function(option) {
let self = this let self = this
this.order_id = option.id self.order_id = option.id
this.mer_id = option.mer_id self.mer_id = option.mer_id
this.goname = option.goname self.goname = option.goname
this.getIndex(); self.getIndex();
// #ifdef H5 // #ifdef H5
this.$nextTick(function() { self.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data'); var clipboard = new ClipboardJS('.copy-data');
// var copybtn = document.getElementsByClassName("copy-data"); // var copybtn = document.getElementsByClassName("copy-data");
// var clipboard = new Clipboard(copybtn); // var clipboard = new Clipboard(copybtn);
@ -249,6 +272,42 @@
}, },
methods: { 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() { more: function() {
this.order = !this.order; this.order = !this.order;
}, },

View File

@ -45,7 +45,8 @@
退款单号{{ item.refund_order_sn }} 退款单号{{ item.refund_order_sn }}
<text class="time">申请时间{{ item.create_time }}</text> <text class="time">申请时间{{ item.create_time }}</text>
</view> </view>
<view class="pos-order-goods" v-for="(val, key) in item.refundProduct" :key="key" @click="toRefundDetail(item)"> <view class="pos-order-goods" v-for="(val, key) in item.refundProduct" :key="key"
@click="toRefundDetail(item)">
<view class="goods acea-row row-between-wrapper"> <view class="goods acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
@ -80,9 +81,11 @@
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="bnt" @click="refundModify(item, 1)">订单备注</view> <view class="bnt" @click="refundModify(item, 1)">订单备注</view>
<navigator class="bnt bnt_color" v-if="item.status == 0" <navigator class="bnt bnt_color" v-if="item.status == 0"
:url="'/pages/admin/orderRefund/index?id='+item.refund_order_id+'&merId='+merId">立即退款</navigator> :url="'/pages/admin/orderRefund/index?id='+item.refund_order_id+'&merId='+merId">立即退款
</navigator>
<navigator class="bnt" v-if="item.status == 2" <navigator class="bnt" v-if="item.status == 2"
:url="'/pages/users/goods_logistics/index?refundId='+item.refund_order_id+'&merId='+merId">查看物流 :url="'/pages/users/goods_logistics/index?refundId='+item.refund_order_id+'&merId='+merId">
查看物流
</navigator> </navigator>
<view class="bnt bnt_color" v-if="item.status == 2" @tap='confirmOrder(item)'>确认收货</view> <view class="bnt bnt_color" v-if="item.status == 2" @tap='confirmOrder(item)'>确认收货</view>
</view> </view>
@ -100,7 +103,8 @@
<text class="order-status" <text class="order-status"
v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text> v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text>
</view> </view>
<view class="pos-order-goods" v-for="(val, key) in item.orderProduct" :key="key" @click="toDetail(item)"> <view class="pos-order-goods" v-for="(val, key) in item.orderProduct" :key="key"
@click="toDetail(item)">
<view class="goods"> <view class="goods">
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
@ -130,24 +134,49 @@
</view> </view>
</view> </view>
<view class="public-total"> <view class="public-total" v-if="item.pay_type !== 8">
{{ item.total_num }}件商品 {{ item.total_num }}件商品
<span v-if="where.status <= 1"></span> <span v-if="where.status <= 1"></span>
<span v-else></span> <span v-else></span>
支付 支付
<span class="money">{{ item.pay_price }}</span> (邮费 ¥{{ item.pay_postage}}) <span class="money" style="margin-right: 30rpx;">{{ item.pay_price }}</span> (邮费
¥{{ item.pay_postage}})
</view>
<view class="public-total" v-else>
先货后款
<span v-if="where.status <= 1"></span>
<span v-else></span>
支付
<span class="money" style="margin-right: 30rpx;">0.00</span> (邮费 ¥{{ item.pay_postage}})
</view>
<view class="public-total" v-if="item.pay_type == 8 ">
{{item.total_num}}件商品结算周期到期后付款{{ item.pay_price }}
</view> </view>
<view class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<view class="more"> <view class="more">
</view> </view>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 1 && item.activity_type != 2"> <view class="bnt" v-if="item.pay_type == 8 && item.status == 12"
@click="tongyi(item.group_order_id,1)">
同意
</view>
<view class="bnt" v-if="item.pay_type == 8 && item.status == 12 "
@click="tongyi(item.group_order_id,2)">
拒绝
</view>
<view class="bnt" @click="modify(item, 0)"
v-if="item.pay_type !=8 && item.paid !=1 &&!(item.status ==2 && item.pau_type==8) ">
一键改价 一键改价
</view> </view>
<view class="bnt" @click="modify(item, 1)">订单备注</view> <view class="bnt" @click="modify(item, 1)">订单备注</view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0" @click="toPostage(item)">去发货 <view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==98"
@click="toPostage(item)">去发货
</view> </view>
<view class="bnt bnt_color" v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1" <view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==0"
@click="toPostagequ(item)">收件码
</view>
<view class="bnt bnt_color"
v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1"
@click="toDetail(item)">去核销</view> @click="toDetail(item)">去核销</view>
</view> </view>
</view> </view>
@ -175,6 +204,16 @@
</view> </view>
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view> <view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
</view> </view>
<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> </view>
</template> </template>
@ -196,11 +235,16 @@
setOfflinePay, setOfflinePay,
setOrderRefund, setOrderRefund,
refundOrderReceive, refundOrderReceive,
setRefundMark setRefundMark,
postconfirm,
logisticsCode
} from "@/api/admin"; } from "@/api/admin";
import Loading from '@/components/Loading/index' import Loading from '@/components/Loading/index'
import PriceChange from '@/components/PriceChange/index' import PriceChange from '@/components/PriceChange/index'
import { isMoney } from '@/utils/validate.js' import {
isMoney
} from '@/utils/validate.js'
export default { export default {
name: "AdminOrderList", name: "AdminOrderList",
components: { components: {
@ -226,7 +270,10 @@
refundInfo: {}, refundInfo: {},
orderInfo: {}, orderInfo: {},
status: "", status: "",
merId: '' codeShow: false,
merId: '',
popUpShow: false,
payCodeUrl: ''
}; };
}, },
watch: { watch: {
@ -249,9 +296,35 @@
this.getIndex(); this.getIndex();
}, },
methods: { methods: {
//
popUpClose() {
this.popUpShow = false
},
//
tongyi(id, number) {
let data = {
id: id,
type: number
}
if (number == 1) {
this.$nextTick(() => {
this.where.status = 2;
delete this.where.is_verify;
this.init();
})
} else if (number == 2) {
uni.navigateTo({
url: `/pages/admin/orderList/index?types=1&merId=${this.merId}`
})
}
postconfirm(this.merId, data).then(res => {
// console.log(res);
})
},
handleSearch() { handleSearch() {
this.loaded = false; this.loaded = false;
this.where.page = 1; this.where.page = 3;
this.list = []; this.list = [];
this.getIndex(); this.getIndex();
}, },
@ -265,11 +338,14 @@
res => { res => {
that.loading = false; that.loading = false;
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
}, },
err => { err => {
that.$util.Tips({ title: err }); that.$util.Tips({
title: err
});
} }
); );
} else { } else {
@ -279,9 +355,14 @@
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
console.log(that.list)
// console.log(that.list);
}, },
err => { err => {
that.$util.Tips({ title: err }); that.$util.Tips({
title: err
});
} }
); );
} }
@ -328,7 +409,9 @@
title: '请输入备注' title: '请输入备注'
}) })
} }
setRefundMark(that.merId, that.refundInfo.refund_order_id, { mer_mark: that.refundInfo.mer_mark }).then( setRefundMark(that.merId, that.refundInfo.refund_order_id, {
mer_mark: that.refundInfo.mer_mark
}).then(
res => { res => {
that.refundMark = false; that.refundMark = false;
this.$util.Tips({ this.$util.Tips({
@ -371,6 +454,16 @@
} }
}) })
}, },
//
toPostagequ(item) {
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
})
},
toPostage(item) { toPostage(item) {
let that = this; let that = this;
if (item.refunding != 0) { if (item.refunding != 0) {
@ -382,6 +475,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}` url: `/pages/admin/delivery/index?id=${item.order_id}&merId=${that.merId}`
}) })
} }
} }
}) })
@ -406,7 +500,9 @@
let id = that.orderInfo.order_id; let id = that.orderInfo.order_id;
if (that.status == 0) { if (that.status == 0) {
if (!isMoney(opt.orderInfo.pay_postage || opt.orderInfo.total_price)) { if (!isMoney(opt.orderInfo.pay_postage || opt.orderInfo.total_price)) {
return that.$util.Tips({ title: '请输入正确的金额' }); return that.$util.Tips({
title: '请输入正确的金额'
});
} }
data.pay_price = price; data.pay_price = price;
setAdminOrderPrice(this.merId, id, parmas).then( setAdminOrderPrice(this.merId, id, parmas).then(
@ -432,7 +528,9 @@
title: '请输入备注' title: '请输入备注'
}) })
} }
setAdminOrderRemark(this.merId, id, { remark: remark }).then( setAdminOrderRemark(this.merId, id, {
remark: remark
}).then(
res => { res => {
that.change = false; that.change = false;
this.$util.Tips({ this.$util.Tips({
@ -443,7 +541,9 @@
}, },
err => { err => {
that.change = false; that.change = false;
that.$util.Tips({ title: err }); that.$util.Tips({
title: err
});
} }
); );
} }
@ -631,7 +731,7 @@
.pos-order-list .list .item .operation .bnt { .pos-order-list .list .item .operation .bnt {
font-size: 28upx; font-size: 28upx;
color: #5c5c5c; color: #5c5c5c;
width: 170upx; width: 160upx;
height: 60upx; height: 60upx;
border-radius: 30upx; border-radius: 30upx;
border: 1px solid #bbb; border: 1px solid #bbb;

View File

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

View File

@ -2,11 +2,9 @@
<view :style="viewColor"> <view :style="viewColor">
<view class='productList'> <view class='productList'>
<view class='search acea-row row-between-wrapper'> <view class='search acea-row row-between-wrapper'>
<!--#ifdef H5-->
<view class="back" @click='set_where(1)'> <view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view> <view class="iconfont icon-xiangzuo"></view>
</view> </view>
<!--#endif-->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text> <view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input> :value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input>
@ -413,7 +411,7 @@
} }
} }
}); });
this.mTop = this.hide_mer_status == 0 ? '238rpx' : '170rpx' this.mTop = this.hide_mer_status == 0 ? '308rpx' : '170rpx'
}, },
computed: { computed: {
shopTab: function() { shopTab: function() {
@ -897,12 +895,13 @@
.productList .search { .productList .search {
width: 100%; width: 100%;
height: 86rpx; height: 170rpx;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; // box-sizing: border-box;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0rpx;
padding-top: 60rpx;
z-index: 9; z-index: 9;
background-color: var(--view-theme); background-color: var(--view-theme);
@ -966,7 +965,7 @@
z-index: 9; z-index: 9;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 70rpx;
width: 100%; width: 100%;
margin-top: 86rpx; margin-top: 86rpx;
background-color: var(--view-theme); background-color: var(--view-theme);
@ -1040,6 +1039,7 @@
.productList .list { .productList .list {
padding: 0 20rpx; padding: 0 20rpx;
} }
.productList .list.on { .productList .list.on {
@ -1075,6 +1075,7 @@
position: relative; position: relative;
width: 100%; width: 100%;
height: 345rpx; height: 345rpx;
} }
.productList .list .item .pictrue.on { .productList .list .item .pictrue.on {
@ -1417,7 +1418,8 @@
} }
.store-wrapper { .store-wrapper {
margin-top: 240rpx; margin-top: 310rpx;
border-top: 1px solid #F6F6F6; border-top: 1px solid #F6F6F6;
.star-box { .star-box {

View File

@ -8,12 +8,13 @@
<view class="special_work com" v-if="true"> <view class="special_work com" v-if="true">
<view class="title">市级供应链</view> <view class="title">市级供应链</view>
<view class="content"> <view class="content">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)"> <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> <image class="icon_img" :src="`${prefix}zsgl.png`" mode="aspectFill"></image>
<text class="text">在售管理</text> <text class="text">在售管理</text>
</view> </view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98`)"> @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> <image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
<text class="text">财务管理</text> <text class="text">财务管理</text>
</view> </view>
@ -39,8 +40,8 @@
<text class="text">提现管理</text> <text class="text">提现管理</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)"> <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" <image class="icon_img"
mode="aspectFill"> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png" mode="aspectFill">
</image> </image>
<text class="text">视频教学</text> <text class="text">视频教学</text>
</view> </view>
@ -64,11 +65,13 @@
<view class="title">我的店铺</view> <view class="title">我的店铺</view>
<view class="content "> <view class="content ">
<view class="examine" <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}`)"> @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> <image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text> <text class="text">供货采购</text>
</view> </view>
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')"> <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> <image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text> <text class="text">进货管理</text>
</view> </view>
@ -101,7 +104,8 @@
</image> </image>
<text class="text">订单核销</text> <text class="text">订单核销</text>
</view> </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}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image> </image>
<text class="text">订单管理</text> <text class="text">订单管理</text>
@ -111,11 +115,29 @@
</image> </image>
<text class="text">商品管理</text> <text class="text">商品管理</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')"> <view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image> </image>
<text class="text">商户设置</text> <text class="text">商户设置</text>
</view> </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}`)"> <!-- <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 class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image> </image>
@ -129,7 +151,8 @@
<!-- <gatherBusiness :userInfoData="userInfoData" /> --> <!-- <gatherBusiness :userInfoData="userInfoData" /> -->
</view> </view>
</view> </view>
<view class="business com" v-if="userInfoData.mer_info.type_id === 11">
<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="business com" v-if="true">
<view class="special_work com"> <view class="special_work com">
<view class="title">里海云仓</view> <view class="title">里海云仓</view>
@ -172,7 +195,8 @@
</image> </image>
<text class="text">订单核销</text> <text class="text">订单核销</text>
</view> </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}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image> </image>
<text class="text">订单管理</text> <text class="text">订单管理</text>
@ -182,7 +206,8 @@
</image> </image>
<text class="text">商品管理</text> <text class="text">商品管理</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')"> <view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image> </image>
<text class="text">商户设置</text> <text class="text">商户设置</text>
@ -197,6 +222,9 @@
</view> </view>
</view> </view>
</view> </view>
</block> </block>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
@ -205,11 +233,16 @@
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->
<view class="" v-if='jurisdiction==false&&isShow==false'>
<emptyPage title="暂无信息"></emptyPage>
</view>
</view> </view>
</template> </template>
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import emptyPage from '@/components/emptyPage.vue';
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import { import {
mapState, mapState,
@ -236,7 +269,8 @@
export default { export default {
components: { components: {
mTabbar, mTabbar,
zbpSwiper zbpSwiper,
emptyPage
}, },
data() { data() {
return { return {
@ -290,10 +324,11 @@
this.isShow = true this.isShow = true
this.mer_id = res.data.service.mer_id this.mer_id = res.data.service.mer_id
} }
if (!res.data.mer_info) { if (!res.data.mer_info) {
that.$set(this, 'jurisdiction', false); that.$set(this, 'jurisdiction', false);
} }
console.log(that.userInfoData); // console.log(that.userInfoData);
}); });
} }
} }

View File

@ -585,6 +585,7 @@
])), ])),
}, },
onLoad(options) { onLoad(options) {
// console.log(options)
this.referer = options.referer this.referer = options.referer
if (options.product_type) { if (options.product_type) {
this.product_type = options.product_type this.product_type = options.product_type
@ -1349,9 +1350,10 @@
postCartAdd(q) postCartAdd(q)
.then(function(res) { .then(function(res) {
that.isOpen = that.attr.cartAttr = false; that.isOpen = that.attr.cartAttr = false;
console.log(that.storeInfo);
if (news) { if (news) {
uni.navigateTo({ 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 { } else {
that.$util.Tips({ that.$util.Tips({

View File

@ -7,13 +7,16 @@
<view class="tabs_wrapper"> <view class="tabs_wrapper">
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs> <u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
</view> </view>
<view class="">
</view>
<view class="goods"> <view class="goods">
<block v-for="(item,index) in cateGoods" :key="index"> <block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)"> <view class="goods_item" @click="gogogo(item)">
<view style="height: 294.74rpx;"> <view style="height: 294.74rpx;">
<u--image :src="item.image[0]" width="342.11rpx" height="294.74rpx" :showLoading="true" lazyLoad fade <u--image :src="item.image[0]" width="342.11rpx" height="294.74rpx" :showLoading="true"
duration="450"> lazyLoad fade duration="450">
<template v-slot:loading> <template v-slot:loading>
<u-loading-icon color="#f5f5f5"></u-loading-icon> <u-loading-icon color="#f5f5f5"></u-loading-icon>
</template> </template>
@ -23,12 +26,13 @@
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
class="g_img"></image> mode="aspectFill" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view> <view class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box" @click.stop="giveStart(item)"> <view class="nice_box" @click.stop="giveStart(item)">
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text> <text class="iconfont"
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text> <text class="collect">{{item.count_start}}</text>
</view> </view>
</view> </view>
@ -43,7 +47,7 @@
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm" <u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> @cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<u-loadmore :status="status" /> <u-loadmore :status="status" v-if="cateGoods.length>=where.limit" />
<!-- <view class="bg_color"></view> --> <!-- <view class="bg_color"></view> -->
<!-- <m-tabbar native> <!-- <m-tabbar native>
@ -60,12 +64,29 @@
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import { getSlideAPI } from '@/api/lihai.js' import {
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js' getSlideAPI
import { getIndexData, getDiy } from '@/api/api.js' } from '@/api/lihai.js'
import { getGeocoder, merClassifly } from '@/api/store.js'; import {
import { getArea, getStreet } from '@/api/article.js'; graphicLstApi,
import { Toast } from '@/libs/uniApi' 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 { export default {
components: { components: {
mTabbar, mTabbar,
@ -98,16 +119,21 @@
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getCateList() this.getCateList()
this.cateGoods=[]
this.getGoods() this.getGoods()
this.selfLocation() this.selfLocation()
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onLoad() { onLoad() {
this.getCateList() this.getCateList()
this.getGoods() this.getGoods()
this.selfLocation() this.selfLocation()
this.Area() this.Area()
this.setPermissions()
// this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => { uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = '' var connectstr = ''
if (connectstatus == true) { if (connectstatus == true) {
@ -125,6 +151,7 @@
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.
this.getGoods() this.getGoods()
}, },
methods: { methods: {
@ -195,26 +222,34 @@
}) })
}, },
getGoods: function(item) { getGoods: function(item) {
// console.log(item);
graphicLstApi(this.where).then(res => { graphicLstApi(this.where).then(res => {
this.cateGoods.push(...res.data.list) this.cateGoods.push(...res.data.list)
if (res.data.list.length < this.where.limit) this.status = 'nomore' 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 (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
if (item.index == 1) {
if(item){
if (item.index == 1 &&this.cateGoods[0] ) {
uni.navigateTo({ uni.navigateTo({
// #ifdef MP || H5 // #ifdef MP || H5
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif // #endif
// #ifdef APP // #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}` url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif // #endif
}) })
} }
}
}) })
}, },
/*获取分类列表*/ /*获取分类列表*/
async getCateList() { async getCateList() {
const { data } = await getTopicList() const {
data
} = await getTopicList()
this.tabsData.list = [{ this.tabsData.list = [{
cate_name: "推荐", cate_name: "推荐",
category_id: 0 category_id: 0
@ -227,6 +262,7 @@
tabsChange(item) { tabsChange(item) {
this.cateGoods = [] this.cateGoods = []
this.where.category_id = item.category_id this.where.category_id = item.category_id
this.emptyShow = false
this.where.page = 1 this.where.page = 1
this.getGoods(item) this.getGoods(item)
this.street_id = item.id this.street_id = item.id
@ -236,13 +272,16 @@
selfLocation() { selfLocation() {
const that = this const that = this
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
timeout: '10', timeout: '10',
success: (res) => { success: (res) => {
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.toString(); longitude = res.longitude.toString();
getGeocoder({ lat: latitude, long: longitude }).then(res => { getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
that.$store.commit('setLocation', res.data) that.$store.commit('setLocation', res.data)
that.street = res.data.address_component.street that.street = res.data.address_component.street
}).catch(err => { }).catch(err => {
@ -261,6 +300,88 @@
} }
}); });
}, },
/**
* 设置手机通知权限
*/
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.v4androidx
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> </script>

View File

@ -33,7 +33,7 @@
<button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button> <button class="bnt bg-color" open-type="share" hover-class='none'>和好友一起分享</button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-PLUS --> <!-- #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 --> <!-- #endif -->
</view> </view>
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo> <shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
@ -57,12 +57,22 @@
} from '@/api/api.js'; } from '@/api/api.js';
import shareInfo from '@/components/shareInfo'; import shareInfo from '@/components/shareInfo';
import home from '@/components/home'; import home from '@/components/home';
import UniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
const uniShare = new UniShare();
export default { export default {
components: { components: {
shareInfo, shareInfo,
home, home,
"jyf-parser": parser, "jyf-parser": parser,
}, },
onBackPress({from}) {
if(from=='backbutton'){
this.$nextTick(function(){
uniShare.hide()
})
return uniShare.isShow;
}
},
data() { data() {
return { return {
id: 0, id: 0,
@ -96,6 +106,78 @@
this.getArticleOne(); this.getArticleOne();
}, },
methods: { methods: {
//
uniShare() {
uniShare.show({
content: { // typeherftitlesummaryimageUrl
type: 0,
href: 'https://uniapp.dcloud.io/',
title: '标题',
summary: '描述',
imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png'
},
menus: [{
"img": "/static/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() { getArticleOne: function() {
let that = this; let that = this;
getArticleDetails(that.id).then(res => { getArticleDetails(that.id).then(res => {

View File

@ -1,6 +1,13 @@
<template> <template>
<view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}"> <view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}">
<view class="head-wrapper"></view> <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="town-title">{{town}}里海云仓</view>
<view class="body-wrapper"> <view class="body-wrapper">
<block v-for="(item,index) in cloudList" :key="index"> <block v-for="(item,index) in cloudList" :key="index">
@ -8,7 +15,7 @@
:url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.category_name}`" :url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.category_name}`"
:style="{'background-image': `url(${item.background})`}"> :style="{'background-image': `url(${item.background})`}">
<text class="item-title">{{item.category_name}}云仓服务</text> <text class="item-title">{{item.category_name}}云仓服务</text>
<text>{{item.description}}</text> <text style="color: #3274F9;">{{item.description}}</text>
<view class="chakan-btn">查看</view> <view class="chakan-btn">查看</view>
</navigator> </navigator>
</block> </block>
@ -17,8 +24,12 @@
</template> </template>
<script> <script>
import { getCityCloundShop } from '@/api/api.js' import {
import { Toast } from '@/libs/uniApi'; getCityCloundShop
} from '@/api/api.js'
import {
Toast
} from '@/libs/uniApi';
export default { export default {
data() { data() {
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13'; let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
@ -46,7 +57,11 @@
}, },
methods: { methods: {
async getCloundShop() { async getCloundShop() {
const { data } = await getCityCloundShop({ street_code: this.street_code }) const {
data
} = await getCityCloundShop({
street_code: this.street_code
})
this.cloudList = data this.cloudList = data
data.length < 1 ? Toast("暂无云仓") : ''; data.length < 1 ? Toast("暂无云仓") : '';
} }
@ -56,15 +71,16 @@
<style lang="scss"> <style lang="scss">
.cloud_entrepot { .cloud_entrepot {
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat; // background: url("../../../static/images/tabbar/YCBG.png") no-repeat;
background-size: cover; // background-size: cover;
padding-bottom: 92.98rpx; // padding-bottom: 92.98rpx;
background-color: #E3ECFE;
} }
.head-wrapper { .head-wrapper {
height: 485.96rpx; height: 550rpx;
width: 100%; // width: 100vw;
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/top.png") no-repeat; // background: url("../../../static/images/tabbar/YCBG.png") no-repeat;
background-size: cover; background-size: cover;
margin-bottom: 49.12rpx; margin-bottom: 49.12rpx;
} }
@ -74,7 +90,9 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 50.88rpx; font-size: 50.88rpx;
color: #fff; color: #3274F9;
font-weight: bold;
font-style: italic;
margin-bottom: 28.07rpx; margin-bottom: 28.07rpx;
&::after { &::after {
@ -132,9 +150,10 @@
font-size: 28.07rpx; font-size: 28.07rpx;
text-align: center; text-align: center;
line-height: 49.12rpx; line-height: 49.12rpx;
color: #fff; color: #3274F9;
margin-top: auto; margin-top: auto;
background: linear-gradient(90deg, #FE5300 0%, #F84221 100%); // background: linear-gradient(90deg, #FE5300 0%, #F84221 100%);
border: 1px solid #3274F9;
border-radius: 50px; border-radius: 50px;
} }
} }

View File

@ -2,7 +2,8 @@
<view class="select_warehouse"> <view class="select_warehouse">
<view class="wrapper flex_a_c_j_sb"> <view class="wrapper flex_a_c_j_sb">
<block v-for="item in goodsData" :key="item.name"> <block v-for="item in goodsData" :key="item.name">
<view class="select_item" @click="navigato(item.type)" :style="{'background-image': `url(${item.src})`}"> <view class="select_item" @click="navigato(item.type)"
:style="{'background-image': `url(${item.src})`}">
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>

View File

@ -11,8 +11,8 @@
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit"></input> :value='where.keyword' @confirm="searchSubmit"></input>
</view> </view>
<view style="text-align: right;" class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' <view style="text-align: right;" class='iconfont'
@click='Changswitch'></view> :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
</view> </view>
<view class="nav-wrapper"> <view class="nav-wrapper">
<view class='nav acea-row row-middle'> <view class='nav acea-row row-middle'>
@ -94,8 +94,8 @@
<view class="down-wrapper" v-if="downStatus"> <view class="down-wrapper" v-if="downStatus">
<view class="bg"></view> <view class="bg"></view>
<view class="down-box"> <view class="down-box">
<view class="down-item" v-for="(item,index) in downMenu" :key="item.key" :class="{'on':index == downKey}" <view class="down-item" v-for="(item,index) in downMenu" :key="item.key"
@click="bindDown(item,index)"> :class="{'on':index == downKey}" @click="bindDown(item,index)">
{{item.title}} {{item.title}}
<text v-if="index == downKey" class="iconfont icon-gou"></text> <text v-if="index == downKey" class="iconfont icon-gou"></text>
</view> </view>
@ -118,10 +118,18 @@
import recommend from '@/components/recommend'; import recommend from '@/components/recommend';
import rightSlider from '@/components/rightSlider.vue' import rightSlider from '@/components/rightSlider.vue'
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue' import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
import { initiateAssistApi } from '@/api/activity.js'; import {
import { cloudWarehouse } from '@/api/api.js' initiateAssistApi
import { configMap } from "@/utils"; } from '@/api/activity.js';
import { mapGetters } from "vuex"; import {
cloudWarehouse
} from '@/api/api.js'
import {
configMap
} from "@/utils";
import {
mapGetters
} from "vuex";
// #ifndef H5 // #ifndef H5
import passwordPopup from '@/components/passwordPopup'; import passwordPopup from '@/components/passwordPopup';
// #endif // #endif
@ -129,10 +137,15 @@
import { import {
goShopDetail goShopDetail
} from '@/libs/order.js' } from '@/libs/order.js'
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
const app = getApp(); const app = getApp();
export default { export default {
computed: configMap({ hide_mer_status: 1, recommend_switch: 0 }, mapGetters(['uid', 'isLogin', 'scrollTop', computed: configMap({
hide_mer_status: 1,
recommend_switch: 0
}, mapGetters(['uid', 'isLogin', 'scrollTop',
'viewColor', 'keyColor' 'viewColor', 'keyColor'
])), ])),
components: { components: {

View File

@ -14,12 +14,12 @@
<image class="goods_img" :src="item.image" mode="aspectFill"></image> <image class="goods_img" :src="item.image" mode="aspectFill"></image>
<view class="r_box flex_a_c_j_sb"> <view class="r_box flex_a_c_j_sb">
<view class="message"> <view class="message">
<view class="title">{{item.store_name}}</view> <view class="goodstitle">{{item.store_name}}</view>
<view class="flex_a_c"> <view class="flex_a_c">
<view class="">分类{{item.storeCategory.cate_name}}</view> <view class="">分类{{item.storeCategory.cate_name}}</view>
<view class="unit">单位{{item.unit_name}}</view> <view class="unit">单位{{item.unit_name}}</view>
</view> </view>
<view class="bar_code">条形码{{ item.bar_code || "0" }}</view> <view class="bar_code">条形码{{ item.bar_code || "" }}</view>
</view> </view>
<view class="redact_box"> <view class="redact_box">
<view class="order_price">订货价{{item.price}}</view> <view class="order_price">订货价{{item.price}}</view>
@ -38,7 +38,7 @@
<view class="">订货价{{redactGoods.price}}</view> <view class="">订货价{{redactGoods.price}}</view>
</view> </view>
<view class="bar_code flex_a_c_j_sb"> <view class="bar_code flex_a_c_j_sb">
<view>条形码{{ redactGoods.bar_code || "0" }}</view> <view>条形码{{ redactGoods.bar_code || "" }}</view>
<view>库存{{ redactGoods.stock }}</view> <view>库存{{ redactGoods.stock }}</view>
</view> </view>
<view class="sub_title">订货价</view> <view class="sub_title">订货价</view>
@ -63,8 +63,15 @@
hideLoading, hideLoading,
Modal Modal
} from '@/libs/uniApi.js'; } from '@/libs/uniApi.js';
import { productLstApi, productCreate, productUpdate, productDetail } from '@/api/product.js' import {
import { checkLogin } from '../../../libs/login'; productLstApi,
productCreate,
productUpdate,
productDetail
} from '@/api/product.js'
import {
checkLogin
} from '../../../libs/login';
export default { export default {
data() { data() {
return { return {
@ -110,11 +117,15 @@
onShow() {}, onShow() {},
methods: { methods: {
async searchClick() { async searchClick() {
const { data } = await productLstApi(this.mer_id, this.params) const {
data
} = await productLstApi(this.mer_id, this.params)
this.goodsList = data.list this.goodsList = data.list
}, },
async getGoodsList() { async getGoodsList() {
const { data } = await productLstApi(this.mer_id, this.params) const {
data
} = await productLstApi(this.mer_id, this.params)
this.goodsList.push(...data.list) this.goodsList.push(...data.list)
if (data.length < 9) this.status = 'nomore'; if (data.length < 9) this.status = 'nomore';
}, },
@ -168,7 +179,8 @@
if (getStorage('addGoodsSecoundData')) { if (getStorage('addGoodsSecoundData')) {
Object.keys(this.addGoodsSecoundData).forEach(item => { Object.keys(this.addGoodsSecoundData).forEach(item => {
if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] == 0) { if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] ==
0) {
this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item]; this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item];
} }
}); });
@ -221,6 +233,7 @@
line-height: 59.65rpx; line-height: 59.65rpx;
background: $uni-theme-bg-color; background: $uni-theme-bg-color;
border-radius: 100px; border-radius: 100px;
font-size: 25rpx;
} }
} }
} }
@ -236,7 +249,7 @@
margin-top: 21.05rpx; margin-top: 21.05rpx;
.title { .title {
font-size: 31.58rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
@ -262,6 +275,7 @@
line-height: 50.88rpx; line-height: 50.88rpx;
background: $uni-theme-bg-color; background: $uni-theme-bg-color;
border-radius: 7px; border-radius: 7px;
font-size: 25rpx
} }
.r_box { .r_box {
@ -281,6 +295,17 @@
} }
} }
.goodstitle {
width: 42vw;
font-weight: bold;
white-space: nowrap;
/* 不换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
}
.popup_cont { .popup_cont {
width: 680.7rpx; width: 680.7rpx;
padding: 31.58rpx; padding: 31.58rpx;
@ -288,13 +313,12 @@
.message { .message {
margin: 28.07rpx 0 21.05rpx 0; margin: 28.07rpx 0 21.05rpx 0;
} }
.title {
text-align: center;
font-size: 31.58rpx;
font-weight: bold;
}
.sub_title { .sub_title {
font-size: 28.07rpx; font-size: 28.07rpx;

View File

@ -41,6 +41,35 @@
<navigator class="bottom_purchase" url="./shopping_trolley" open-type="navigate">采购清单</navigator> <navigator class="bottom_purchase" url="./shopping_trolley" open-type="navigate">采购清单</navigator>
<goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup> <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> </view>
</template> </template>
@ -52,6 +81,9 @@
} from '@/api/store.js' } from '@/api/store.js'
import { Toast } from '@/libs/uniApi' import { Toast } from '@/libs/uniApi'
import goodsPopup from '../cpns/goodsPopup.vue' import goodsPopup from '../cpns/goodsPopup.vue'
import {
changeCartNum
} from '@/api/order.js';
export default { export default {
components: { components: {
goodsPopup goodsPopup
@ -88,7 +120,16 @@
}, },
id: '', id: '',
order: true, order: true,
num: '' num: '',
show: false,
scrollTop: 0,
attrValue: [],
Image: '',
goods: [{
cart_num: 0
}],
goodsLite: {},
goodsindexL: ''
} }
}, },
onLoad(e) { onLoad(e) {
@ -176,23 +217,27 @@
* 获取产品详情 * 获取产品详情
*/ */
getGoodsDetails(item) { getGoodsDetails(item) {
// console.log('e,item',e,item); console.log(item);
// let that = this; if (item.product.attrValue.length == 1) {
// 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; let that = this;
const count = '1' const count = '1'
// console.log(111);
getProductDetail(item.product_id, { product_type: 98 }).then(res => { getProductDetail(item.product_id, { product_type: 98 }).then(res => {
const unique = Object.values(res.data.sku)[0].unique const unique = Object.values(res.data.sku)[0].unique
that.goCat(res.data.product_id, count, unique) that.goCat(res.data.product_id, count, unique)
}).catch(err => { }).catch(err => {
Toast(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,8 +265,97 @@
}); });
}); });
}, },
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() { onReachBottom() {
//nomore //nomore
if (this.status != 'nomore') { if (this.status != 'nomore') {
@ -395,4 +529,91 @@
background-color: $uni-theme-color; background-color: $uni-theme-color;
color: #fff; 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> </style>

View File

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

View File

@ -1,47 +1,121 @@
<template> <template>
<view> <view>
<view class='productList' :style="viewColor"> <view class='productList'>
<view class='search acea-row row-between-wrapper' :class="'styleType'+store_street_theme"> <view style="height: 150rpx;">
<!--#ifdef H5--> <view class='search acea-row row-between-wrapper' style="background-color: white;"
:class="'styleType'+store_street_theme">
<view class="back" @click='backjJump()'> <view class="back" @click='backjJump()'>
<view class="iconfont icon-xiangzuo"></view> <view class="iconfont icon-xiangzuo" style="color: black;"></view>
</view> </view>
<!--#endif--> <view class="serch_btn">
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text> <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" <input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='sotreParam.keyword' @confirm="searchSubmit"></input> :value='sotreParam.keyword' @confirm="searchSubmit"></input>
</view> </view> -->
<view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
<!-- <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'> class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
<view class="iconfont icon-dingwei"></view> <view class="iconfont icon-dingwei"></view>
<view class="right-text" v-if="recommend_address"> <view class="right-text" v-if="recommend_address">
{{recommend_address}} {{recommend_address}}
</view> </view>
<view class="iconfont icon-xiangyou" v-if="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>
<view class="nav-wrapper" :class="'styleType'+store_street_theme"> <!-- <view class="nav-wrapper" :class="'styleType'+store_street_theme"> -->
<view class='nav acea-row row-middle' :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 v-for="item in downMenus" :key="item.key" class='item'
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'> :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
<view class=""> <view class="">
{{item.title}} {{item.title}}
</view> </view>
<view class="line" :class="{'font-line':firstKey == item.key}"> <view class="line" :class="{'font-line':firstKey == item.key}">
</view> </view>
</view> </view> -->
<view class="item" @click="bindRight"> <!-- <view class="item" @click="bindRight">
<view>筛选 <view>筛选
<!-- <text class="iconfont icon-shaixuan"></text> --> <text class="iconfont icon-shaixuan"></text>
</view> </view>
<view class="line"> <view class="line">
</view> </view>
</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="store-item" v-for="(item,index) in storeList" :key="index">
<view class="head"> <view class="head">
<view class="bgc_img" :style="{ backgroundImage: `url(${item.mini_banner})`}"> <view class="bgc_img" :style="{ backgroundImage: `url(${item.mini_banner})`}">
@ -49,10 +123,10 @@
<view class="zhezhao"> <view class="zhezhao">
</view> </view>
<view class="zhezhao1" @click="goStore(item.mer_id)"> <view class="zhezhao1" @click="goStore(item.mer_id)">
<view class="title"> <view class="title" style="display: ;">
<view>{{item.mer_name}} <view>{{item.mer_name}}
</view> </view>
<span> <span class="go_store">
{{item.type_name}} {{item.type_name}}
</span> </span>
</view> </view>
@ -84,8 +158,10 @@
</view> </view>
</view> </view>
</view> </view>
-->
</view> </view>
</block>
<block v-if="store_street_theme == 2"> <block v-if="store_street_theme == 2">
<view class="mer-item2" v-for="(item,index) in storeList" :key='index'> <view class="mer-item2" v-for="(item,index) in storeList" :key='index'>
<view class="mer-hd mer-shop-count" @click="goStore(item.mer_id)"> <view class="mer-hd mer-shop-count" @click="goStore(item.mer_id)">
@ -222,6 +298,21 @@
}, },
data() { data() {
return { return {
tabLists: [{
name: '默认',
order: ''
}, {
name: '销量',
order: 'sales'
}, {
name: '好评',
order: 'rate'
},
{
name: '距离',
order: 'location'
}
],
price: 0, price: 0,
stock: 0, stock: 0,
nows: false, nows: false,
@ -239,27 +330,27 @@
downKey: 0, downKey: 0,
downStatus: false, downStatus: false,
// //
downMenu: [{ // downMenu: [{
title: '默认', // title: '',
key: 0, // key: 0,
order: "" // order: ""
}, // },
{ // {
title: '销量', // title: '',
key: 1, // key: 1,
order: 'sales' // order: 'sales'
}, // },
{ // {
title: '好评', // title: '',
key: 2, // key: 2,
order: 'rate' // order: 'rate'
}, // },
{ // {
title: '距离', // title: '',
key: 3, // key: 3,
order: 'location' // order: 'location'
} // }
], // ],
// //
firstKey: 0, firstKey: 0,
// //
@ -289,15 +380,18 @@
merList: [], // merList: [], //
product_type: 0, product_type: 0,
show: false, show: false,
image: '' // image: '', //,
credit_buy: '', //
}; };
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.product_type = options.product_type ?? 0 this.product_type = options.product_type ?? 0
if (options.street_id != undefined) { if (options.street_id != undefined) {
this.sotreParam.street_id = options.street_id 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
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || '' this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.sotreParam.category_id = options.cate_id && options.cate_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() { getClassfication: function() {
let temp = [] let temp = []
@ -496,7 +594,8 @@
order: this.sotreParam.order, order: this.sotreParam.order,
category_id: this.sotreParam.category_id, category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_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) { if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude rqData.location = this.latitude + ',' + this.longitude
@ -524,8 +623,9 @@
} }
}, },
searchSubmit: function(e) { 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) this.set_where(this.firstKey)
}, },
// //
@ -570,7 +670,7 @@
this.storeList = [] this.storeList = []
this.firstKey = e this.firstKey = e
this.sotreParam.page = 1 this.sotreParam.page = 1
this.sotreParam.order = this.downMenu[e].order this.sotreParam.order = this.tabLists[e].order
this.storeMerchantList(); this.storeMerchantList();
}, },
backjJump() { backjJump() {
@ -618,15 +718,36 @@
</script> </script>
<style lang="scss" scoped> <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 { .productList .search {
width: 100%; width: 100%;
height: 86rpx; height: 140rpx;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; padding-top: 70rpx;
// box-sizing: border-box;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
z-index: 9; z-index: 99;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
background-color: #fff; 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.styleType2 .right-text,
.search-right.styleType3 .right-text { .search-right.styleType3 .right-text {
color: #282828; color: #282828;
@ -731,7 +862,7 @@
z-index: 9; z-index: 9;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 40rpx;
width: 100%; width: 100%;
margin-top: 86rpx; margin-top: 86rpx;
background-color: #fff; background-color: #fff;
@ -852,192 +983,91 @@
margin-left: 10rpx; margin-left: 10rpx;
} }
.store-wrapper { .tabs {
margin-top: 165rpx; // background-color: ;
border-top: 1px solid #F6F6F6; background-color: #F4F7FE;
border-radius: 20rpx 20rpx 0 0;
}
.store-item { .store_wrapper {
margin: 20rpx auto;
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 { .head {
display: flex; display: flex;
align-items: center; justify-content: space-between;
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; color: white;
font-size: 12px; font-size: 30rpx;
padding: 3px; background-color: rgba(0, 0, 0, 0.3);
border-radius: 5px; padding: 25rpx;
margin-left: 5px;
}
} }
.coent { .content {
padding: 25rpx;
background-color: white;
// height: 160.68rpx;
display: flex; display: flex;
margin-left: 20px; color: black;
border-radius: 20rpx 20rpx 0 0;
// width: ;
.avater { .left {
width: 60px; margin-right: 20rpx;
height: 80px; border-radius: 15rpx;
overflow: hidden;
image {
width: 60px;
height: 80px;
}
} }
.text { .rights {
.text_one {
display: flex; display: flex;
height: 30px; flex-direction: column;
line-height: 30px; justify-content: space-between;
padding-left: 10px;
image { .first_li {
width: 20px; display: flex;
height: 20px; justify-content: space-between;
margin-right: 10px;
.type {
border: 1px solid #3274F9;
color: #3274F9;
padding: 0 10rpx;
border-radius: 10rpx;
} }
.text_one_r { .pf {
margin-left: 10px; background-color: rgba(0, 0, 0, 0.3);
} color: white;
} padding: 0 10rpx;
border-radius: 10rpx;
.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;
}
}
}
}
}
}
.pro-box {
white-space: nowrap;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20rpx 20rpx 30rpx;
.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 { .hot {
margin-top: 5rpx; color: #F84221;
font-size: 28rpx; }
color: var(--view-priceColor); }
font-weight: bold;
text {
font-size: 28rpx;
} }
} }
&:last-child {
margin-right: 0;
}
} }
&.styleType3 {
padding: 20rpx;
.pro-item {
display: inline-block;
background-color: #fff;
border-radius: 16rpx;
text-align: center;
padding: 10rpx 0 20rpx;
.picture,
/deep/image,
uni-image {
width: 194rpx;
height: 194rpx;
text-align: center;
border-radius: 8rpx;
position: relative;
margin: 0 auto;
}
}
}
}
}
} }
.mer-item2 { .mer-item2 {
@ -1124,6 +1154,7 @@
} }
} }
} }
.guanbi { .guanbi {
width: 20px; width: 20px;
height: 20px; height: 20px;

View File

@ -1,16 +1,19 @@
<template> <template>
<view :style="viewColor"> <view :style="viewColor">
<view class='shoppingCart' :class="(newData.status && newData.status.status) ? 'showFoot' : ''"> <view class='shoppingCart' :class="(newData.status && newData.status.status) ? 'showFoot' : ''">
<view class='nav acea-row row-between-wrapper'>
<view>购物车 <text class='num'>({{cartTotalCount}})</text></view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"
class='administrate acea-row row-center-wrapper' :class="footerswitch?'':'administratetxt'"
@click='manage'>{{ footerswitch ? '管理' : '退出管理'}}
</view>
</view>
<view class='labelNav acea-row row-around row-middle'> <view class='labelNav acea-row row-around row-middle'>
<view class='item'><text class='iconfont icon-xuanzhong'></text>100%正品保证</view> <view class='item'><text class='iconfont icon-xuanzhong' style="color:#3274F9"></text>100%正品保证</view>
<view class='item'><text class='iconfont icon-xuanzhong'></text>所有商品精挑细选</view> <view class='item'><text class='iconfont icon-xuanzhong'></text>所有商品精挑细选</view>
<view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view> <view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view>
</view> </view>
<view class='nav acea-row row-between-wrapper'>
<view>购物数量 <text class='num t-color'>{{cartTotalCount}}</text></view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper'
@click='manage'>{{ footerswitch ? '管理' : '取消'}}</view>
</view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"> <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0">
<view class='list'> <view class='list'>
<block v-for="(item,index) in cartList.valid" :key="index"> <block v-for="(item,index) in cartList.valid" :key="index">
@ -20,43 +23,60 @@
<text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text> <text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text> <text v-else class="iconfont icon-xuanzhong1"></text>
</view> </view>
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info"> <navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'"
<text class="iconfont icon-shangjiadingdan"></text> class="info">
<!-- <text class="iconfont icon-shangjiadingdan"></text> -->
<view class="shop_title">
<image src="@/static/images/shop.png" mode="aspectFill"></image>
</view>
<view class="name">{{item.mer_name}}</view> <view class="name">{{item.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</navigator> </navigator>
<view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view> <view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
</view> </view>
<navigator v-for="goods in item.list" :key="goods.cart_id" :url='"/pages/goods_details/index?id="+goods.product.product_id' <navigator v-for="goods in item.list" :key="goods.cart_id"
hover-class='none' class='picTxt acea-row'> :url='"/pages/goods_details/index?id="+goods.product.product_id' hover-class='none'
class='picTxt acea-row'>
<view class="checkbox" @click.stop="goodsCheck(goods,index)"> <view class="checkbox" @click.stop="goodsCheck(goods,index)">
<text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text> <text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text> <text v-else class="iconfont icon-xuanzhong1"></text>
</view> </view>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'></image> <image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'>
</image>
<!-- <image v-else :src='item.productInfo.image'></image> --> <!-- <image v-else :src='item.productInfo.image'></image> -->
</view> </view>
<view class='text'> <view class='text'>
<view class='line1'>{{goods.product.store_name}}</view> <view class='line1'>{{goods.product.store_name}}</view>
<view class='infor line1' v-if="goods.productAttr.sku" @click.stop='changeCart(goods,goods.cart_id)'> <view class='infor line1' v-if="goods.productAttr.sku"
@click.stop='changeCart(goods,goods.cart_id)'>
{{goods.productAttr.sku}} {{goods.productAttr.sku}}
<text class="iconfont icon-xiala1"></text> <text class="iconfont icon-xiala1"></text>
</view> </view>
<view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0" class="buy_limit"> <view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0"
<text v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购,</text><text v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text> class="buy_limit">
<text
v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购</text><text
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view> </view>
<view class='money acea-row row-middle'> <view class='money acea-row row-middle'>
<text>{{goods.productAttr.price}}</text> <text class='t-color'>
<span></span>
{{goods.productAttr.price.split('.')[0]}}</span>.<span
style="color: #F84221;">{{goods.productAttr.price.split('.')[1]}}</span>
</text>
<view v-if="goods.productAttr.show_svip_price" class="vipImg"> <view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image> <image src="/static/images/svip.png"></image>
</view> </view>
</view> </view>
</view> </view>
<view class='carnum acea-row row-center-wrapper'> <view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view> <view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>
-</view>
<view class='num'>{{goods.cart_num}}</view> <view class='num'>{{goods.cart_num}}</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view> <view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+
</view>
</view> </view>
</navigator> </navigator>
</view> </view>
@ -64,15 +84,18 @@
</view> </view>
<view class='invalidGoods' v-if="cartList.invalid.length > 0"> <view class='invalidGoods' v-if="cartList.invalid.length > 0">
<view class='goodsNav acea-row row-between-wrapper'> <view class='goodsNav acea-row row-between-wrapper'>
<view @click='goodsOpen'><text class='iconfont' :class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view> <view @click='goodsOpen'><text class='iconfont'
:class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
<view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view> <view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view>
</view> </view>
<view class='goodsList' :hidden='goodsHidden'> <view class='goodsList' :hidden='goodsHidden'>
<block v-for="(item,index) in cartList.invalid" :key='index'> <block v-for="(item,index) in cartList.invalid" :key='index'>
<navigator :url="'/pages/goods_details/index?id='+item.product_id" class='item acea-row row-between-wrapper' hover-class='none'> <navigator :url="'/pages/goods_details/index?id='+item.product_id"
class='item acea-row row-between-wrapper' hover-class='none'>
<view class='invalid'>失效</view> <view class='invalid'>失效</view>
<view class='pictrue'> <view class='pictrue'>
<image :src='(item.productAttr && item.productAttr.image) || item.product.image'></image> <image :src='(item.productAttr && item.productAttr.image) || item.product.image'>
</image>
</view> </view>
<view class='text acea-row row-column-between'> <view class='text acea-row row-column-between'>
@ -88,17 +111,20 @@
</view> </view>
</view> </view>
</view> </view>
<view class='noCart' v-if="recommend" :style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }"> <view class='noCart' v-if="recommend"
:style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }">
<view class='pictrue'> <view class='pictrue'>
<image src='../../static/images/noCart.png'></image> <image src='../../static/images/noCart.png'></image>
<view>暂无商品去添加点什么吧</view> <view>暂无商品去添加点什么吧</view>
</view> </view>
<recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend> <recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend>
<view class='loadingicon acea-row row-center-wrapper' v-if="hostProduct.length>5 && recommend_switch == 1"> <view class='loadingicon acea-row row-center-wrapper'
v-if="hostProduct.length>5 && recommend_switch == 1">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
</view> </view>
<view class='footer acea-row row-between-wrapper' :class="isFooter?'':'on'" v-if="cartList.valid.length > 0"> <view class='footer acea-row row-between-wrapper' :class="isFooter?'':'on'"
v-if="cartList.valid.length > 0">
<view> <view>
<view class="allcheckbox" @click.stop="checkboxAllChange"> <view class="allcheckbox" @click.stop="checkboxAllChange">
<text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text> <text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text>
@ -107,14 +133,18 @@
</view> </view>
</view> </view>
<view class='money acea-row row-middle' v-if="footerswitch==true"> <view class='money acea-row row-middle' v-if="footerswitch==true">
<text class='t-color'>{{selectCountPrice}}</text> <text class='t-colora'>合计</text>
<!-- selectCountPrice -->
<text class='t-color'><span></span>
<span style="font-size:44rpx;">{{selectCountPrice.toFixed(2).split('.')[0]}}</span>.<span
style="color: #F84221;">{{selectCountPrice.toFixed(2).split('.')[1]}}</span></text>
<form @submit="subOrder" report-submit='true'> <form @submit="subOrder" report-submit='true'>
<button class='placeOrder' formType="submit">去结算</button> <button class='placeOrder' formType="submit">去结算</button>
</form> </form>
</view> </view>
<view class='button acea-row row-middle' v-else> <view class='button acea-row row-middle' v-else>
<form @submit="subCollect" report-submit='true'> <form @submit="subCollect" report-submit='true'>
<button class='bnt bt-color' formType="submit">收藏</button> <button class='bnt bt-color' formType="submit">移至收藏</button>
</form> </form>
<form @submit="subDel" report-submit='true'> <form @submit="subDel" report-submit='true'>
<button class='bnt' formType="submit">删除</button> <button class='bnt' formType="submit">删除</button>
@ -124,19 +154,16 @@
</view> </view>
<!-- 优惠券弹窗 --> <!-- 优惠券弹窗 -->
<block v-if="coupon.coupon"> <block v-if="coupon.coupon">
<couponListWindow <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone"
:coupon='coupon' @ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
@ChangCouponsClone="ChangCouponsClone"
@ChangCouponsUseState="ChangCouponsUseState"
></couponListWindow>
</block> </block>
<!-- 组件 --> <!-- 组件 -->
<addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow> <addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow>
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<view class="foot" v-if="newData.status && newData.status.status"> <view class="foot" v-if="newData.status && newData.status.status">
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}"> <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
@click="goRouter(item)">
<block v-if="item.link == activeRouter"> <block v-if="item.link == activeRouter">
<image :src="item.imgList[0]"></image> <image :src="item.imgList[0]"></image>
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}} <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
@ -183,7 +210,9 @@
} from "vuex"; } from "vuex";
import recommend from '@/components/recommend'; import recommend from '@/components/recommend';
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
const app = getApp(); const app = getApp();
export default { export default {
props: { props: {
@ -248,7 +277,11 @@
activeRouter: '', activeRouter: '',
}; };
}, },
computed: configMap({hide_mer_status: 1,recommend_switch:0,navigation: {}}, mapGetters(['isLogin','viewColor'])), computed: configMap({
hide_mer_status: 1,
recommend_switch: 0,
navigation: {}
}, mapGetters(['isLogin', 'viewColor'])),
onReady() {}, onReady() {},
mounted: function() {}, mounted: function() {},
onLoad: function(options) { onLoad: function(options) {
@ -434,7 +467,8 @@
"store_name", "store_name",
goods.product.store_name goods.product.store_name
); );
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product.image); this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods
.product.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -513,7 +547,8 @@
} }
}, },
attrVal(val) { attrVal(val) {
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val.indexn]); this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
.indexn]);
}, },
/** /**
* 属性变动赋值 * 属性变动赋值
@ -525,16 +560,17 @@
this.newVal = this.productValue[res]; this.newVal = this.productValue[res];
if (productSelect) this.$set(this, "uniqueValue", productSelect.unique); if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique); this.$set(this, "uniqueValue", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res); this.$set(this, "attrValue", res);
} } else {
else { this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); .attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", 0); this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
@ -593,7 +629,8 @@
cart_num: that.goods.cart_num, cart_num: that.goods.cart_num,
product_attr_unique: that.newVal.unique product_attr_unique: that.newVal.unique
}).then(res => { }).then(res => {
if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods.productAttr.stock) { if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods
.productAttr.stock) {
that.goods.cart_num = that.goods.productAttr.stock; that.goods.cart_num = that.goods.productAttr.stock;
that.goods.numAdd = true; that.goods.numAdd = true;
that.goods.numSub = false; that.goods.numSub = false;
@ -732,7 +769,8 @@
// // // //
el.list.forEach(e => { el.list.forEach(e => {
if (e.check) { if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num)) totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr
.price, e.cart_num))
totalNum += e.cart_num totalNum += e.cart_num
} }
}) })
@ -778,7 +816,8 @@
}, },
// //
unsetCart: function() { unsetCart: function() {
let that = this,ids = []; let that = this,
ids = [];
for (let i = 0, len = that.cartList.invalid.length; i < len; i++) { for (let i = 0, len = that.cartList.invalid.length; i < len; i++) {
ids.push(that.cartList.invalid[i].cart_id); ids.push(that.cartList.invalid[i].cart_id);
} }
@ -810,7 +849,9 @@
ids: ids.join(',') ids: ids.join(',')
}).then(res => { }).then(res => {
goodsArr = res.data goodsArr = res.data
getShopCoupons(item.mer_id).then(({data})=>{ getShopCoupons(item.mer_id).then(({
data
}) => {
uni.hideLoading(); uni.hideLoading();
couponList = goodsArr.concat(data) couponList = goodsArr.concat(data)
this.$set(this.coupon, 'list', couponList); this.$set(this.coupon, 'list', couponList);
@ -841,30 +882,46 @@
<style scoped lang="scss"> <style scoped lang="scss">
.shoppingCart .labelNav { .shoppingCart .labelNav {
height: 76rpx; height: 76rpx;
padding: 0 30rpx; // padding: 0 30rpx;
font-size: 22rpx; line-height: 76rpx;
color: #8c8c8c; font-size: 26rpx;
font-weight: 400;
color: #3274F9;
position: fixed; position: fixed;
left: 0; left: 0;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
background-color: #f5f5f5; background-color: #f5f5f5;
z-index: 5; z-index: 5;
top: 0; top: 86rpx;
} }
.icon-xiala1 { .icon-xiala1 {
display: inline-block; display: inline-block;
transform: rotate(180deg); transform: rotate(180deg);
font-size: 14rpx; font-size: 14rpx;
padding: 0 5rpx; padding: 0 5rpx;
} }
.shoppingCart .labelNav .item .iconfont { .shoppingCart .labelNav .item .iconfont {
font-size: 25rpx; font-size: 25rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.t-color { .t-color {
color: var(--view-theme); color: var(--view-theme);
span {
font-size: 23rpx;
} }
}
.t-colora {
font-size: 26rpx;
color: #333333;
font-weight: 400;
}
.shoppingCart { .shoppingCart {
/* #ifndef MP */ /* #ifndef MP */
padding-bottom: 180rpx; padding-bottom: 180rpx;
@ -872,6 +929,7 @@
/* #ifdef MP */ /* #ifdef MP */
padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
/* #endif */ /* #endif */
&.showFoot { &.showFoot {
padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom)); padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom));
@ -879,6 +937,7 @@
} }
} }
.shoppingCart .nav { .shoppingCart .nav {
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
@ -890,76 +949,109 @@
position: fixed; position: fixed;
left: 0; left: 0;
z-index: 5; z-index: 5;
top: 76rpx; top: 0rpx;
} }
.shoppingCart .nav .administrate { .shoppingCart .nav .administrate {
font-size: 26rpx; font-size: 30rpx;
color: #282828; font-weight: 400;
width: 110rpx; color: #333333;
height: 46rpx; height: 46rpx;
border-radius: 6rpx; // border-radius: 6rpx;
border: 1px solid #868686; // border: 1px solid #868686;
} }
.administratetxt {
color: #3274F9 !important;
}
.shoppingCart .noCart { .shoppingCart .noCart {
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #fff; background-color: #fff;
padding-top: 0.1rpx; padding-top: 0.1rpx;
} }
.shoppingCart .noCart .pictrue { .shoppingCart .noCart .pictrue {
text-align: center; text-align: center;
margin: 78rpx auto 56rpx auto; margin: 78rpx auto 56rpx auto;
padding-bottom: 60rpx; padding-bottom: 60rpx;
} }
.shoppingCart .noCart .pictrue image { .shoppingCart .noCart .pictrue image {
width: 414rpx; width: 414rpx;
height: 305rpx; height: 305rpx;
} }
.shoppingCart .noCart .pictrue view { .shoppingCart .noCart .pictrue view {
color: #999; color: #999;
} }
.shoppingCart .list { .shoppingCart .list {
margin: 171rpx 0 20rpx; margin: 171rpx 0 20rpx;
} }
.shoppingCart .list .item { .shoppingCart .list .item {
background-color: #fff; background-color: #fff;
margin-bottom: 15rpx; margin-bottom: 15rpx;
.store-title { .store-title {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
padding: 0 30rpx; padding: 0 30rpx;
height: 85rpx; height: 85rpx;
border-bottom: 1px solid #f0f0f0;
.checkbox { .checkbox {
width: 60rpx; width: 60rpx;
.iconfont { .iconfont {
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.info { .info {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
.iconfont { .iconfont {
font-size: 36rpx; font-size: 36rpx;
} }
.shop_title {
width: 52rpx;
height: 52rpx;
image {
width: 100%;
height: 100%;
}
}
.name { .name {
margin: 0 0 0 10rpx; margin: 0 0 0 10rpx;
font-size: 28rpx; font-size: 30rpx;
color: #282828; font-weight: 400;
font-weight: bold; color: #333333;
} }
.icon-xiangyou { .icon-xiangyou {
margin-top: 6rpx; margin-top: 6rpx;
font-size: 22rpx; font-size: 32rpx;
color: #999; color: #333;
} }
} }
.coupon-btn { .coupon-btn {
color: var(--view-theme); color: var(--view-theme);
font-size: 22rpx; font-size: 22rpx;
@ -971,53 +1063,64 @@
} }
} }
} }
.vipImg { .vipImg {
width: 65rpx; width: 65rpx;
height: 28rpx; height: 28rpx;
margin-left: 10rpx; margin-left: 10rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
} }
.shoppingCart .list .item .picTxt { .shoppingCart .list .item .picTxt {
width: 100%; width: 100%;
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
position: relative; position: relative;
align-items: center; align-items: center;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
.checkbox { .checkbox {
width: 60rpx; width: 60rpx;
.iconfont { .iconfont {
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
} }
.shoppingCart .list .item .picTxt .pictrue { .shoppingCart .list .item .picTxt .pictrue {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
} }
.shoppingCart .list .item .picTxt .pictrue image { .shoppingCart .list .item .picTxt .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 6rpx;
} }
.shoppingCart .list .item .picTxt .text { .shoppingCart .list .item .picTxt .text {
width: 444rpx; width: 444rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.shoppingCart .list .item .picTxt .buy_limit { .shoppingCart .list .item .picTxt .buy_limit {
margin-top: 10rpx; margin-top: 10rpx;
color: #E93323; color: #E93323;
font-size: 22rpx; font-size: 22rpx;
} }
.shoppingCart .list .item .picTxt .text .infor { .shoppingCart .list .item .picTxt .text .infor {
display: inline-block; display: inline-block;
padding: 6rpx; padding: 6rpx;
@ -1028,44 +1131,63 @@
background-color: #F5F5F5; background-color: #F5F5F5;
max-width: 460rpx; max-width: 460rpx;
} }
.shoppingCart .list .item .picTxt .text .money { .shoppingCart .list .item .picTxt .text .money {
font-size: 32rpx; font-size: 32rpx;
color: #282828; color: #282828;
margin-top: 28rpx; margin-top: 28rpx;
} }
.shoppingCart .list .item .picTxt .carnum { .shoppingCart .list .item .picTxt .carnum {
height: 47rpx; height: 42rpx;
position: absolute; position: absolute;
bottom: 30rpx; bottom: 30rpx;
right: 30rpx; right: 30rpx;
} }
.shoppingCart .list .item .picTxt .carnum view { .shoppingCart .list .item .picTxt .carnum view {
border: 1px solid #a4a4a4;
min-width: 66rpx; min-width: 44rpx;
text-align: center; text-align: center;
height: 100%; height: 100%;
line-height: 46rpx; line-height: 35rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400;
color: #333333;
color: #a4a4a4; color: #a4a4a4;
} }
.shoppingCart .list .item .picTxt .carnum .reduce { .shoppingCart .list .item .picTxt .carnum .reduce {
border-right: 0; // border-right: 0;
border-radius: 3rpx 0 0 3rpx; border-radius: 7rpx 0 0 7rpx;
border: 1px solid #B3CBFC;
} }
.shoppingCart .list .item .picTxt .carnum .reduce.on { .shoppingCart .list .item .picTxt .carnum .reduce.on {
border-color: #e3e3e3; // border-color: #e3e3e3;
color: #dedede; // color: #dedede;
border-radius: 7rpx 0 0 7rpx;
border: 1px solid #B3CBFC;
} }
.shoppingCart .list .item .picTxt .carnum .plus { .shoppingCart .list .item .picTxt .carnum .plus {
border-left: 0;
border-radius: 0 3rpx 3rpx 0; border-radius: 7rpx 0 0 7rpx;
border: 1px solid #B3CBFC;
} }
.shoppingCart .list .item .picTxt .carnum .num { .shoppingCart .list .item .picTxt .carnum .num {
color: #282828; width: 63rpx;
font-size: 26rpx;
font-weight: 400;
color: #333333;
padding-top: 5rpx;
} }
.shoppingCart .invalidGoods { .shoppingCart .invalidGoods {
background-color: #fff; background-color: #fff;
} }
.shoppingCart .invalidGoods .goodsNav { .shoppingCart .invalidGoods .goodsNav {
width: 100%; width: 100%;
height: 66rpx; height: 66rpx;
@ -1074,25 +1196,30 @@
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.shoppingCart .invalidGoods .goodsNav .iconfont { .shoppingCart .invalidGoods .goodsNav .iconfont {
color: #424242; color: #424242;
font-size: 28rpx; font-size: 28rpx;
margin-right: 17rpx; margin-right: 17rpx;
} }
.shoppingCart .invalidGoods .goodsNav .del { .shoppingCart .invalidGoods .goodsNav .del {
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;
} }
.shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 { .shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 {
color: #999; color: #999;
font-size: 33rpx; font-size: 33rpx;
vertical-align: -2rpx; vertical-align: -2rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.shoppingCart .invalidGoods .goodsList .item { .shoppingCart .invalidGoods .goodsList .item {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
border-top: 1px solid #f5f5f5; border-top: 1px solid #f5f5f5;
} }
.shoppingCart .invalidGoods .goodsList .item .invalid { .shoppingCart .invalidGoods .goodsList .item .invalid {
font-size: 22rpx; font-size: 22rpx;
color: #fff; color: #fff;
@ -1103,98 +1230,123 @@
text-align: center; text-align: center;
line-height: 36rpx; line-height: 36rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .pictrue { .shoppingCart .invalidGoods .goodsList .item .pictrue {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .pictrue image { .shoppingCart .invalidGoods .goodsList .item .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 6rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text { .shoppingCart .invalidGoods .goodsList .item .text {
width: 433rpx; width: 433rpx;
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
height: 140rpx; height: 140rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text .name { .shoppingCart .invalidGoods .goodsList .item .text .name {
width: 100%; width: 100%;
} }
.shoppingCart .invalidGoods .goodsList .item .text .infor { .shoppingCart .invalidGoods .goodsList .item .text .infor {
font-size: 24rpx; font-size: 24rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text .end { .shoppingCart .invalidGoods .goodsList .item .text .end {
font-size: 26rpx; font-size: 26rpx;
color: #bbb; color: #bbb;
} }
.shoppingCart .footer { .shoppingCart .footer {
z-index: 9; z-index: 9;
width: 100%; width: 100%;
height: 96rpx; height: 195rpx;
background-color: #fafafa;
background: #FFFFFF;
box-shadow: 0px -5px 18px 2px rgba(233, 240, 254, 1);
border-radius: 32px 32px 0px 0px;
position: fixed; position: fixed;
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #eee; border-top: 1px solid #eee;
bottom: 98rpx; bottom: 0;
bottom: calc(98rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
} }
.shoppingCart .footer.on { .shoppingCart .footer.on {
// #ifndef H5 // #ifndef H5
bottom: 0rpx; bottom: 0rpx;
// #endif // #endif
} }
.shoppingCart .footer .checkAll { .shoppingCart .footer .checkAll {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
margin-left: 16rpx; margin-left: 16rpx;
} }
.shoppingCart .footer .money { .shoppingCart .footer .money {
font-size: 30rpx; font-size: 30rpx;
} }
.shoppingCart .footer .placeOrder { .shoppingCart .footer .placeOrder {
color: #fff; color: #fff;
font-size: 30rpx; font-size: 30rpx;
width: 226rpx; font-weight: 500;
height: 70rpx; width: 217rpx;
border-radius: 50rpx; height: 84rpx;
border-radius: 42rpx;
text-align: center; text-align: center;
line-height: 70rpx; line-height: 84rpx;
margin-left: 22rpx; margin-left: 22rpx;
background-color: var(--view-theme); // background-color: var(--view-theme);
background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
} }
.shoppingCart .footer .button .bnt { .shoppingCart .footer .button .bnt {
font-size: 28rpx; font-size: 30rpx;
color: #999; font-weight: 500;
border-radius: 50rpx; color: #FFFFFF;
border: 1px solid #999; background: #B3B3B3;
width: 160rpx; border-radius: 42rpx 42rpx 42rpx 42rpx;
height: 60rpx; // border: 1px solid #999;
width: 189rpx;
height: 84rpx;
text-align: center; text-align: center;
line-height: 60rpx; line-height: 84rpx;
&.bt-color { &.bt-color {
color: var(--view-theme); // color: var(--view-theme);
border: 1px solid var(--view-theme); // border: 1px solid var(--view-theme);
background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
} }
} }
.shoppingCart .footer .button form~form { .shoppingCart .footer .button form~form {
margin-left: 17rpx; margin-left: 17rpx;
} }
.allcheckbox { .allcheckbox {
display: flex; display: flex;
align-items: center; align-items: center;
width: 260rpx;
.iconfont { .iconfont {
margin-right: 20rpx; margin-right: 20rpx;
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.page-footer { .page-footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
@ -1211,9 +1363,11 @@
box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32); box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/ padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/ padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
&.filter { &.filter {
filter: blur(2rpx); filter: blur(2rpx);
} }
.foot-item { .foot-item {
display: flex; display: flex;
width: max-content; width: max-content;
@ -1221,6 +1375,7 @@
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
.count-num { .count-num {
position: absolute; position: absolute;
display: flex; display: flex;
@ -1237,15 +1392,16 @@
padding: 4rpx; padding: 4rpx;
} }
} }
.foot-item image { .foot-item image {
height: 50rpx; height: 50rpx;
width: 50rpx; width: 50rpx;
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
} }
.foot-item .txt { .foot-item .txt {
font-size: 24rpx; font-size: 24rpx;
} }
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -14,26 +14,30 @@
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>支付方式</view> <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-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3"
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝</view> 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 v-else class='itemCom'>余额</view>
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>支付金额</view> <view>支付金额</view>
<view class='itemCom'>{{order_pay_info.pay_price}}</view> <view class='itemCom'>{{order_pay_info.pay_price}}</view>
</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>赠送积分</view>
<view class='itemCom t-color'>{{order_pay_info.give_integral}}</view> <view class='itemCom t-color'>{{order_pay_info.give_integral}}</view>
</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>失败原因</view>
<view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view> <view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view>
</view> </view>
</view> </view>
<!--失败时 重新购买 --> <!--失败时 重新购买 -->
<view @tap="goOrderDetails"> <view @tap="goOrderDetails(order_pay_info.paid)">
<button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button> <button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button>
</view> </view>
<!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1"> <!-- <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"> <!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2">
<button class='returnBnt bg-color' hover-class='none'>重新支付</button> <button class='returnBnt bg-color' hover-class='none'>重新支付</button>
</view> --> </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 @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit"
<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> 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="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
<view class="hd"> <view class="hd">
<view class="line"></view> <view class="line"></view>
@ -53,12 +59,16 @@
<view class="coupon-box" :class="{on:isOpen}"> <view class="coupon-box" :class="{on:isOpen}">
<block v-for="(item,index) in couponList" :key="index"> <block v-for="(item,index) in couponList" :key="index">
<view class="coupon-item flex"> <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="info">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="des">{{item.use_min_price}}元可用</view> <view class="des">{{item.use_min_price}}元可用</view>
<block v-if="item.coupon_type == 1"> <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>
<block v-if="item.coupon_type == 0"> <block v-if="item.coupon_type == 0">
<view class="des">领取后{{ item.coupon_time}}天内可用</view> <view class="des">领取后{{ item.coupon_time}}天内可用</view>
@ -88,11 +98,19 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import {getPayOrder} from '@/api/order.js'; import {
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js'; getPayOrder
import {mapGetters} from "vuex"; } from '@/api/order.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
components: { components: {
authorize, authorize,
@ -119,7 +137,9 @@
isOpen: false, // isOpen: false, //
moneyBg: '/static/images/couponBg', moneyBg: '/static/images/couponBg',
text: '展开更多', text: '展开更多',
timer: null timer: null,
product_type: '',
}; };
}, },
computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), computed: mapGetters(['isLogin', 'viewColor', 'keyColor']),
@ -134,6 +154,7 @@
this.order_type = options.order_type; this.order_type = options.order_type;
this.status = options.status || 0; this.status = options.status || 0;
this.msg = options.msg || ''; this.msg = options.msg || '';
this.product_type = options.product_type
if (this.isLogin) { if (this.isLogin) {
this.refreshData(); this.refreshData();
} else { } else {
@ -143,9 +164,8 @@
}, },
methods: { methods: {
refreshData() { refreshData() {
this.timer = setInterval(()=>{
this.getOrderPayInfo(); this.getOrderPayInfo();
},1000)
}, },
// //
bindMore() { bindMore() {
@ -199,18 +219,32 @@
* *
* 去订单详情页面 * 去订单详情页面
*/ */
goOrderDetails: function(e) { goOrderDetails: function(val) {
let that = this; let that = this;
if (this.order_pay_info.paid == 0) { if (this.product_type == 98) {
uni.redirectTo({ if(val==1){
url: '/pages/users/order_list/index' uni.navigateTo({
url: `/pages/users/order_list/indexCopy?status=1&product_type=${this.product_type}`
}) })
}else{ }else{
uni.redirectTo({ uni.navigateTo({
url: '/pages/users/order_list/index?status=1' url: `/pages/users/order_list/indexCopy?status=0&product_type=${this.product_type}`
}) })
} }
} else {
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'
})
}
}
} }
}, },
destroyed() { destroyed() {
@ -231,6 +265,7 @@
border-radius: 10rpx; border-radius: 10rpx;
padding: 1rpx 0 28rpx 0; padding: 1rpx 0 28rpx 0;
} }
.payment-status .icon { .payment-status .icon {
font-size: 70rpx; font-size: 70rpx;
width: 140rpx; width: 140rpx;
@ -242,19 +277,23 @@
border: 6rpx solid #f5f5f5; border: 6rpx solid #f5f5f5;
margin: -76rpx auto 0 auto; margin: -76rpx auto 0 auto;
background-color: #999; background-color: #999;
&.icon-duihao2 { &.icon-duihao2 {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
} }
.payment-status .icon.fail { .payment-status .icon.fail {
text-shadow: 0px 4px 0px #7a7a7a; text-shadow: 0px 4px 0px #7a7a7a;
} }
.payment-status .status { .payment-status .status {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
margin: 25rpx 0 37rpx 0; margin: 25rpx 0 37rpx 0;
} }
.payment-status .wrapper { .payment-status .wrapper {
border: 1px solid #eee; border: 1px solid #eee;
margin: 0 30rpx 47rpx 30rpx; margin: 0 30rpx 47rpx 30rpx;
@ -262,16 +301,20 @@
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
} }
.payment-status .wrapper .item { .payment-status .wrapper .item {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.payment-status .wrapper .item~.item { .payment-status .wrapper .item~.item {
margin-top: 20rpx; margin-top: 20rpx;
} }
.payment-status .wrapper .item .itemCom { .payment-status .wrapper .item .itemCom {
color: #666; color: #666;
} }
.payment-status .returnBnt { .payment-status .returnBnt {
width: 630rpx; width: 630rpx;
height: 86rpx; height: 86rpx;
@ -281,17 +324,21 @@
text-align: center; text-align: center;
line-height: 86rpx; line-height: 86rpx;
margin: 0 auto 20rpx auto; margin: 0 auto 20rpx auto;
&.gColor { &.gColor {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
&.s-Color { &.s-Color {
color: var(--view-theme); color: var(--view-theme);
border: 1px solid var(--view-theme); border: 1px solid var(--view-theme);
} }
} }
.t-color { .t-color {
color: var(--view-theme) !important; color: var(--view-theme) !important;
} }
.coupon-wrapper { .coupon-wrapper {
.hd { .hd {
display: flex; display: flex;
@ -300,26 +347,32 @@
margin: 30rpx 0; margin: 30rpx 0;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
.line { .line {
width: 70rpx; width: 70rpx;
height: 1px; height: 1px;
background: #DCDCDC; background: #DCDCDC;
} }
.txt { .txt {
margin: 0 20rpx; margin: 0 20rpx;
} }
} }
.coupon-box { .coupon-box {
height: 356rpx; height: 356rpx;
padding: 0 20rpx; padding: 0 20rpx;
overflow: hidden; overflow: hidden;
&.on { &.on {
height: auto; height: auto;
} }
.coupon-item { .coupon-item {
width: 100%; width: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06); box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
.left-bg { .left-bg {
display: flex; display: flex;
align-items: center; align-items: center;
@ -328,21 +381,25 @@
height: 160rpx; height: 160rpx;
color: #fff; color: #fff;
font-size: 64rpx; font-size: 64rpx;
text { text {
margin-top: 26rpx; margin-top: 26rpx;
font-size: 36rpx; font-size: 36rpx;
} }
} }
.info { .info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
margin-left: 20rpx; margin-left: 20rpx;
padding: 20rpx 0; padding: 20rpx 0;
.title { .title {
color: #282828; color: #282828;
font-size: 30rpx; font-size: 30rpx;
} }
.des { .des {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
@ -350,6 +407,7 @@
} }
} }
} }
.more { .more {
display: flex; display: flex;
align-items: center; align-items: center;
@ -357,6 +415,7 @@
padding-top: 24rpx; padding-top: 24rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
.iconfont { .iconfont {
margin-top: 6rpx; margin-top: 6rpx;
margin-left: 10rpx; margin-left: 10rpx;

View File

@ -2,7 +2,8 @@
<view :style="viewColor"> <view :style="viewColor">
<form @submit="formSubmit" report-submit='true'> <form @submit="formSubmit" report-submit='true'>
<view class="release_content"> <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)"> <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}} <text class="iconfont" :class="item.icon"></text>{{item.name}}
</view> </view>
@ -467,6 +468,7 @@
}); });
} }
}else{ }else{
if (value.image.length == 0) return that.$util.Tips({ if (value.image.length == 0) return that.$util.Tips({
title: '请添加话题图片' title: '请添加话题图片'
}); });

View File

@ -1,9 +1,9 @@
<template> <template>
<!-- #ifdef MP --> <!-- #ifdef MP -->
<view :style="viewColor" style="padding-top: 180rpx;"> <view :style="viewColor" >
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP || H5 --> <!-- #ifdef APP || H5 -->
<view :style="viewColor" style="padding-top: 80rpx;"> <view :style="viewColor" >
<!-- #endif --> <!-- #endif -->
<form @submit="formSubmit" report-submit='true'> <form @submit="formSubmit" report-submit='true'>
<view class="release_content"> <view class="release_content">
@ -20,7 +20,8 @@
<block v-if="tabActive == 2"> <block v-if="tabActive == 2">
<view class="pictrue" v-if="formData.video_link"> <view class="pictrue" v-if="formData.video_link">
<view v-if="videoplay"> <view v-if="videoplay">
<video controls id="myvideo" :src="video_link" @fullscreenchange="screenChange"></video> <video controls id="myvideo" :src="video_link"
@fullscreenchange="screenChange"></video>
</view> </view>
<!--#ifndef APP-PLUS--> <!--#ifndef APP-PLUS-->
<video class="pictrue" :src="formData.video_link"></video> <video class="pictrue" :src="formData.video_link"></video>
@ -35,14 +36,16 @@
</view> </view>
<text class="video-text">点击可预览视频</text> <text class="video-text">点击可预览视频</text>
<view class="close_btn" @click="formData.video_link = ''"><text <view class="close_btn" @click="delVideo"><text
class="iconfont icon-guanbi4"></text></view> class="iconfont icon-guanbi4"></text></view>
</view> </view>
<view v-else class="pictrue acea-row row-center-wrapper row-column add" @click="uploadVideo"> <view v-else class="pictrue acea-row row-center-wrapper row-column add"
@click="uploadVideo">
<view><text class='iconfont icon-tianjiashipin'></text></view> <view><text class='iconfont icon-tianjiashipin'></text></view>
<view class="text">添加视频</view> <view class="text">添加视频</view>
</view> </view>
<view v-if="formData.image.length < 1" class="pictrue acea-row row-center-wrapper row-column add" <view v-if="formData.image.length < 1"
class="pictrue acea-row row-center-wrapper row-column add"
@click.stop="clk"> @click.stop="clk">
<view><text class='iconfont icon-fengmian'></text></view> <view><text class='iconfont icon-fengmian'></text></view>
<view class="text">添加封面</view> <view class="text">添加封面</view>
@ -51,17 +54,20 @@
<view class="pictrue" v-for="(item, index) in formData.image" :key="index"> <view class="pictrue" v-for="(item, index) in formData.image" :key="index">
<easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage> <easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage>
<text class="cover_text" v-if="tabActive == 2">封面</text> <text class="cover_text" v-if="tabActive == 2">封面</text>
<view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view> <view class="close_btn" @click="DelPic(index)"><text
class="iconfont icon-guanbi4"></text></view>
</view> </view>
<block v-if="tabActive == 1"> <block v-if="tabActive == 1">
<view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add" <view v-if="formData.image.length < 6"
class="pictrue acea-row row-center-wrapper row-column add"
@click.stop="clk"> @click.stop="clk">
<view><text class='iconfont icon-icon25201'></text></view> <view><text class='iconfont icon-icon25201'></text></view>
<view class="text">添加图片</view> <view class="text">添加图片</view>
</view> </view>
</block> </block>
<view v-if="showCd" :ratio="16/9" class="container"> <view v-if="showCd" :ratio="16/9" class="container">
<bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage" :dWidth="800" :compress="true"> <bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage"
:dWidth="800" :compress="true">
<!-- 你想插入的内容 --> <!-- 你想插入的内容 -->
<button class="crop_btn" @click="crop">裁切</button> <button class="crop_btn" @click="crop">裁切</button>
</bt-cropper> </bt-cropper>
@ -69,13 +75,15 @@
</view> </view>
</view> </view>
<view class="textarea"> <view class="textarea">
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment" placeholder-class='placeholder' <textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment"
v-model="formData.content" maxlength="600"></textarea> placeholder-class='placeholder' v-model="formData.content"
maxlength="600"></textarea>
</view> </view>
</view> </view>
<view class="release_item"> <view class="release_item">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view> <view class='name'><text
class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view>
<view class="select"> <view class="select">
<view class="select_count" @click.stop="addProduct"> <view class="select_count" @click.stop="addProduct">
<text v-if="productList.length == 0" class="text">选择产品</text> <text v-if="productList.length == 0" class="text">选择产品</text>
@ -118,7 +126,8 @@
<!--#endif--> <!--#endif-->
</view> </view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view> <view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx"> <avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx"
selHeight="250upx">
</avatar> </avatar>
<!-- 提到的宝贝弹窗 --> <!-- 提到的宝贝弹窗 -->
<uni-popup ref="associated" type="bottom"> <uni-popup ref="associated" type="bottom">
@ -128,7 +137,8 @@
<uni-popup ref="participateTopic" type="bottom"> <uni-popup ref="participateTopic" type="bottom">
<participate-topic @close="close" @getTopic="getTopic"></participate-topic> <participate-topic @close="close" @getTopic="getTopic"></participate-topic>
</uni-popup> </uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
@ -142,16 +152,31 @@
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import avatar from "@/components/yq-avatar/yq-avatar.vue"; import avatar from "@/components/yq-avatar/yq-avatar.vue";
import associated from '@/components/associated.vue'; import associated from '@/components/associated.vue';
import participateTopic from '@/components/participateTopic.vue'; import participateTopic from '@/components/participateTopic.vue';
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js'; import {
import { createPlantApi, updatePlantApi, plantDetailApi, orderAssociatePlantApi } from "@/api/community"; TOKENNAME,
import { setStorage, getStorage } from '@/libs/uniApi.js'; HTTP_REQUEST_URL
} from '@/config/app.js';
import {
createPlantApi,
updatePlantApi,
plantDetailApi,
orderAssociatePlantApi
} from "@/api/community";
import {
setStorage,
getStorage
} from '@/libs/uniApi.js';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
import store from '@/store'; import store from '@/store';
export default { export default {
components: { components: {
@ -183,9 +208,16 @@
imgName: "", imgName: "",
upload_max: 50, upload_max: 50,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`, uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
tabList: [ tabList: [{
{ name: '图文', value: 1, icon: 'icon-tuwen' }, name: '图文',
{ name: '视频', value: 2, icon: 'icon-shipin' }, value: 1,
icon: 'icon-tuwen'
},
{
name: '视频',
value: 2,
icon: 'icon-shipin'
},
], ],
tabActive: 1, tabActive: 1,
isPlay: false, isPlay: false,
@ -198,7 +230,9 @@
}, },
computed: { computed: {
...mapGetters(['isLogin', 'viewColor', 'uid']), ...mapGetters(['isLogin', 'viewColor', 'uid']),
...configMap({ community_app_switch: [] }) ...configMap({
community_app_switch: []
})
}, },
watch: { watch: {
// formData:{ // formData:{
@ -253,6 +287,7 @@
this.productList = [] this.productList = []
this.topicName = {} this.topicName = {}
}, },
methods: { methods: {
onLoadFun() { onLoadFun() {
this.isShowAuth = false; this.isShowAuth = false;
@ -291,6 +326,18 @@
if (this.tabActive == item.value) return if (this.tabActive == item.value) return
this.tabActive = item.value this.tabActive = item.value
this.formData.image = [] this.formData.image = []
this.productList = []
/**
* 将对象所有值为空
* */
this.formData = {
image: [],
content: "",
topic_id: "",
spu_id: [],
video_link: "",
}
this.topicName = {}
}, },
/*删除话题*/ /*删除话题*/
deleteTopic() { deleteTopic() {
@ -442,6 +489,10 @@
let that = this let that = this
that.formData.image.splice(index, 1); that.formData.image.splice(index, 1);
}, },
/*删除视频*/
delVideo() {
this.formData.video_link = '';
},
/*添加宝贝*/ /*添加宝贝*/
addProduct() { addProduct() {
this.$refs.associated.open(); this.$refs.associated.open();
@ -508,7 +559,9 @@
}); });
} }
if (!value.category_id || !value.topic_id) { if (!value.category_id || !value.topic_id) {
return that.$util.Tips({ title: '请选择话题' }) return that.$util.Tips({
title: '请选择话题'
})
} }
if (that.id) { if (that.id) {
if (value.relevance.length) { if (value.relevance.length) {
@ -530,19 +583,22 @@
setTimeout(function() { setTimeout(function() {
if (that.tabActive == 2) { if (that.tabActive == 2) {
uni.redirectTo({ uni.navigateTo({
//#ifdef APP //#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/appSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
//#ifndef APP //#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/nvueSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
}); });
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + res.data.community_id + '&type=' + that url: '/pages/plantGrass/plant_detail/index?id=' + res.data
.community_id + '&type=' + that
.tabActive .tabActive
}) })
} }
@ -574,19 +630,22 @@
setStorage('addPlant', ''); setStorage('addPlant', '');
setTimeout(function() { setTimeout(function() {
if (that.tabActive == 2) { if (that.tabActive == 2) {
uni.redirectTo({ uni.navigateTo({
//#ifdef APP //#ifdef APP
url: '/pages/short_video/appSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/appSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
//#ifndef APP //#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + res.data.community_id + '&user=1&uid=' + url: '/pages/short_video/nvueSwiper/index?id=' + res.data
.community_id + '&user=1&uid=' +
that.uid that.uid
//#endif //#endif
}); });
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + res.data.community_id + '&type=' + that url: '/pages/plantGrass/plant_detail/index?id=' + res.data
.community_id + '&type=' + that
.tabActive .tabActive
}) })
} }
@ -720,7 +779,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 0;
.iconfont { .iconfont {
color: #ffffff; color: #ffffff;

View File

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

View File

@ -50,10 +50,39 @@
<view class="video_list"> <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()"> <view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video> <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> <image src="../static/images/close.png" mode="widthFix"></image>
</view> </view>
<!--#ifndef APP-PLUS-->
<view style="position: absolute;">
<view class="videoHover" @click="videoshow">
</view> </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 class="photo" @click="uploadVideo" v-else>
<view> <view>
<image src="../static/images/creamer.png" mode="widthFix"></image> <image src="../static/images/creamer.png" mode="widthFix"></image>
@ -63,7 +92,17 @@
</view> </view>
</view> </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 dobuButton">
<view class="handle_button margin_right" @click="lastStep">上一步</view> <view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view> <view class="handle_button" @click="submitCreatedGoods">提交</view>
@ -109,6 +148,7 @@
}, },
data() { data() {
return { return {
showVideo:false,
disModel: false, disModel: false,
upload_max: 10, upload_max: 10,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`, uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
@ -144,6 +184,16 @@
} }
}, },
methods: { 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() { initData() {
let editGoodsDetils = {}; let editGoodsDetils = {};
if (getStorage('goodsDis')) { if (getStorage('goodsDis')) {
@ -270,6 +320,8 @@
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['camera', 'album'], sourceType: ['camera', 'album'],
success: res => { success: res => {
console.log(res)
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) { if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({ uni.uploadFile({
url: this.uploadUrl, // url: this.uploadUrl, //
@ -301,9 +353,11 @@
} }
}, },
fail: err => { 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 { .photo {
border: 1px solid #dddddd; border: 1px solid #dddddd;
opacity: 1; opacity: 1;
@ -400,7 +479,10 @@
height: 150rpx; height: 150rpx;
} }
} }
.preview_video{
position: absolute;
}
.container_input { .container_input {
background: #fff; background: #fff;
padding: 0 20rpx; padding: 0 20rpx;
@ -519,7 +601,24 @@
.marginTop_none { .marginTop_none {
margin-top: 0; 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 { // .writeBg {
// background: #fff; // background: #fff;
// } // }

View File

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

View File

@ -2,47 +2,69 @@
<view class="basic_set"> <view class="basic_set">
<view class="basice_item"> <view class="basice_item">
<view class="headline"> <view class="headline">
<view class="text flex_a_c">店铺基本配置</view> <view class="text flex_a_c">
<u--image :showLoading="true" src="../../static/images/SHSZ/JBPZ.png" width="50.82rpx"
height="50.82rpx"></u--image>
店铺基本配置
</view>
</view> </view>
<view class="store_bg"> <view class="store_bg">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view> <view class="text flex_a_c">上传店铺背景图</view>
<block v-if="images[0].img"> <block v-if="images[0].img">
<u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[0].img" width="100%" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFill"></u--image> @click="delImg(0)" mode="aspectFill"></u--image>
</block> </block>
<view v-else class="upload" @click="seleckImage(0)"> <view v-else class="upload" @click="seleckImage(0)">
<view class="iconfont icon-tupian1"></view> <u--image :showLoading="true" src="../../static/images/SHSZ/SCBJ.png" width="87.62rpx"
height="87.62rpx"></u--image>
建议尺寸710*220PX 建议尺寸710*220PX
</view> </view>
</view> </view>
<view class="store_avatar flex_a_c_j_sb"> <view class="store_avatar flex_a_c_j_sb">
<view class="avatar_box"> <view class="avatar_box">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view> <view class="text flex_a_c">上传店铺头像</view>
<block v-if="images[1].img"> <block v-if="images[1].img">
<u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx"
@click="delImg(1)" mode="aspectFill"></u--image> radius="4px" @click="delImg(1)" mode="aspectFill"></u--image>
</block> </block>
<view v-else class="avatar_img" @click="seleckImage(1)"> <view v-else class="avatar_img" @click="seleckImage(1)">
<view class="iconfont icon-tupian1"></view> <u--image :showLoading="true" src="../../static/images/SHSZ/SCBJ.png" width="87.62rpx"
建议尺寸120*120px height="87.62rpx"></u--image>
</view> </view>
</view> </view>
<view class="zizhi_box"> <view class="zizhi_box">
<view class="text">店铺资质</view> <view class="text">店铺资质</view>
<block v-if="images[3].img"> <block v-if="images[3].img">
<u--image :showLoading="true" :src="images[3].img" width="382.46rpx" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[3].img" width="382.46rpx" height="210.53rpx"
@click="delImg(3)"></u--image> radius="4px" @click="delImg(3)"></u--image>
</block> </block>
<view v-else class="zizhi_img" @click="seleckImage(3)"> <view v-else class="zizhi_img" @click="seleckImage(3)">
<view class="iconfont icon-tupian1"></view> <u--image :showLoading="true" src="../../static/images/SHSZ/SCBJ.png" width="87.62rpx"
height="87.62rpx"></u--image>
</view> </view>
</view> </view>
</view> </view>
<view class="ask_title">拍摄要求</view> <view class="ask_title">拍摄要求</view>
<view class="ask_tit">
<u--image :showLoading="true" src="../../static/images/SHSZ/SLDP.png" width="147.2rpx"
height="105.14rpx"></u--image>
<u--image :showLoading="true" src="../../static/images/SHSZ/YYZZ.png" width="147.2rpx"
height="105.14rpx"></u--image>
<view class="">
<view style="font-weight: bold;">
正确示范
</view>
<view>
请上传真实有效的图片信息
</view>
</view>
</view>
<view class="shoot_ask flex_a_c_j_sb"> <view class="shoot_ask flex_a_c_j_sb">
<block v-for="(item,i) in shootAsk" :key="i"> <block v-for="(item,i) in shootAsk" :key="i">
<view class="shoot_item"> <view class="shoot_item">
<image class="shoot_img" :src="item.url" mode=""></image> <u--image :showLoading="true" class="shoot_img" :src="item.url" width="94.02rpx"
height="87.62rpx"></u--image>
<view class="shoot_msg flex_a_c"> <view class="shoot_msg flex_a_c">
<u-icon v-if="i > 0" name="close" color="#F20950" size="18"></u-icon> <u-icon v-if="i > 0" name="close" color="#F20950" size="18"></u-icon>
<u-icon v-else name="checkmark" color="#20A162" size="18"></u-icon> <u-icon v-else name="checkmark" color="#20A162" size="18"></u-icon>
@ -52,51 +74,64 @@
</block> </block>
</view> </view>
<view class="street_bg"> <view class="street_bg">
<view class="text flex_a_c"> <i class="iconfont icon-xinghao"></i> 店铺街背景图</view> <view class="text flex_a_c"> 店铺街背景图</view>
<block v-if="images[2].img"> <block v-if="images[2].img">
<u--image :showLoading="true" :src="images[2].img" width="388px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[2].img" width="100%" height="210.53rpx" radius="4px"
@click="delImg(2)"></u--image> @click="delImg(2)"></u--image>
</block> </block>
<view v-else class="street_img flex_a_c" @click="seleckImage(2)"> <view v-else class="street_img flex_a_c" @click="seleckImage(2)">
<view class="iconfont icon-tupian1"></view> <u--image :showLoading="true" src="../../static/images/SHSZ/SCBJ.png" width="87.62rpx"
<view>建议尺寸:710*134px或710*460px(请根据平台要求选择尺寸此图如未上传默认展示店铺背景图)</view> height="87.62rpx"></u--image>
<view style="margin-left: 20rpx;">建议尺寸:710*134px或710*460px(请根据平台要求选择尺寸此图如未上传默认展示店铺背景图)</view>
</view> </view>
</view> </view>
</view> </view>
<view class="basice_item"> <view class="basice_item">
<view class="headline"> <view class="headline" style="display: flex;align-items: center;">
<view class="text flex_a_c">配送基本配置</view> <u--image :showLoading="true" src="../../static/images/SHSZ/FHPZ.png" width="37.54rpx"
height="28.57rpx"></u--image>
<view class="text flex_a_c" style="margin-left: 10rpx;">发货基本配置</view>
</view> </view>
<view class="item_cell"> <view class="item_cell">
<view class="flex_a_c"> <view class="flex_a_c">
<text class="sub_title">配送方式</text> <text class="sub_title">配送方式</text>
<view class="flex"> <view class="flex">
<checkbox-group name="" @change="checkboxChange"> <!-- <checkbox-group name="" @change="checkboxChange">
<checkbox :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text> <checkbox :checked="isZiti" color="#FFCC33" :value="check.ziti" /><text
class="text ziti">到店自提</text>
<checkbox :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text> <checkbox :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text>
</checkbox-group> </checkbox-group> -->
<u-checkbox-group @change="checkboxChange">
<u-checkbox :checked="isZiti" :value="check.ziti" shape="circle" /><text
class="text ziti">到店自提</text>
<u-checkbox :checked="isKuaidi" :value="check.kuaidi" shape="circle" /><text
class="text ziti">快递配送</text>
</u-checkbox-group>
</view> </view>
</view> </view>
<view class="remark"> <view class="remark">
*只选择一种配送方式时,会自动修改店铺所有商品的配送方式 *只选择一种配送方式时,会自动修改店铺所有商品配送方式
</view> </view>
</view> </view>
<block> <block>
<view class="item_cell flex_a_c"> <view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>详细地址</view> <view class="sub_title flex_a_c">详细地址</view>
<input class="com_input" type="text" v-model="mer_address" placeholder="输入商户地址"> <input class="com_input" type="text" v-model="mer_address" placeholder="输入商户地址">
</view> </view>
<view class="long_lat"> <view class="long_lat">
经纬度
<input class="com_input site_input" type="text" v-model="longLati" placeholder="输入经纬度坐标"> <input class="com_input site_input" type="text" v-model="longLati" placeholder="输入经纬度坐标">
<view class="get_site flex_a_c" @click="selfLocation"> <view class="get_site flex_a_c" @click="selfLocation">
<i class="iconfont icon-dizhi"></i> <u--image :showLoading="true" src="../../static/images/SHSZ/DW.png" width="50.82rpx"
获取地址 height="50.82rpx"></u--image>
<!-- <i class="iconfont icon-dizhi"></i> -->
</view> </view>
</view> </view>
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>提货点营业日期:</view> <view class="sub_title flex_a_c">提货点营业日期:</view>
<view class="week_box"> <view class="week_box">
<view class="week_item" v-for="(item,index) in dateWeek" :key="index" @click="sel(item,index)"> <view class="week_item" v-for="(item,index) in dateWeek" :key="index" @click="sel(item,index)">
<view class="date_week" :class="item.isCheck ? 'date_week_a' : ''"> <view class="date_week" :class="item.isCheck ? 'date_week_a' : ''">
@ -105,27 +140,47 @@
</view> </view>
</view> </view>
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>店铺营业时间:</view> <view class="sub_title flex_a_c">提货点营业时间:</view>
<view class="bus_time flex_a_c"> <view class="bus_time flex_a_c">
<view class="select" @click="beginTimeShow = true">{{ mer_take_time[0] ? mer_take_time[0] : '选择开始时间' }}</view> <view class="select" @click="beginTimeShow = true">
{{ mer_take_time[0] ? mer_take_time[0] : '选择开始时间' }}
</view>
<view class="select" @click="overTimeShow = true">{{ mer_take_time[1] ? mer_take_time[1] : '选择结束时间' }}</view> <view class="select" @click="overTimeShow = true">
{{ mer_take_time[1] ? mer_take_time[1] : '选择结束时间' }}
</view>
</view> </view>
</block> </block>
</view> </view>
<view class="basice_item"> <view class="basice_item">
<view class="headline"> <view class="headline">
<view class="text flex_a_c">商户信息配置</view> <u--image :showLoading="true" src="../../static/images/SHSZ/DPPZ.png" width="37.54rpx"
height="28.57rpx"></u--image>
<view class="text flex_a_c">店铺基本配置</view>
</view> </view>
<view class="item_cell flex_a_c"> <view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>商户简介</view> <view class="sub_title flex_a_c"></i>商户简介</view>
<input class="com_input" type="text" v-model="intro" placeholder="输入商户简介"> <input class="com_input" type="text" v-model="intro" placeholder="输入商户简介">
</view> </view>
<view class="item_cell flex_a_c"> <view class="item_cell flex_a_c">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话</view> <view class="sub_title flex_a_c"></i>客服电话</view>
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话"> <input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</view> </view>
<view class="item_cell flex_a_c">
<view class="sub_title flex_a_c">开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch>
</view>
<view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c">先货后款结算周期:</view>
<input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天">
</view>
<view class="remarks" v-if="credit_buy">*周期结算时间范围为:15~90 周期单位为:</view>
<view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c">先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view>
<view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view>
<!-- <view class="item_cell"> <!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb"> <view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text> <text class="sub_title">是否开启商户</text>
@ -139,38 +194,55 @@
<button class="submit_btn l_center" @click="postMerchantUpdata">提交审核</button> <button class="submit_btn l_center" @click="postMerchantUpdata">提交审核</button>
<u-datetime-picker :show="beginTimeShow" v-model="mer_take_time[0]" mode="time" @close="beginTimeShow = false" <u-datetime-picker :show="beginTimeShow" v-model="mer_take_time[0]" mode="time" @close="beginTimeShow = false"
:closeOnClickOverlay="true" @cancel="beginTimeShow = false" @confirm="beginTimeShow = false"></u-datetime-picker> :closeOnClickOverlay="true" @cancel="beginTimeShow = false"
@confirm="beginTimeShow = false"></u-datetime-picker>
<u-datetime-picker :show="overTimeShow" v-model="mer_take_time[1]" mode="time" @close="overTimeShow = false" <u-datetime-picker :show="overTimeShow" v-model="mer_take_time[1]" mode="time" @close="overTimeShow = false"
:closeOnClickOverlay="true" @cancel="overTimeShow = false" @confirm="overTimeShow = false"></u-datetime-picker> :closeOnClickOverlay="true" @cancel="overTimeShow = false"
@confirm="overTimeShow = false"></u-datetime-picker>
</view> </view>
</template> </template>
<script> <script>
import { Toast } from '@/libs/uniApi.js' import {
import { merchantUpdateAPI, merchantInfoAPI } from "@/api/product" Toast
import { uploads } from '@/api/upload.js' } from '@/libs/uniApi.js'
import {
merchantUpdateAPI,
merchantInfoAPI
} from "@/api/product"
import {
uploads
} from '@/api/upload.js'
export default { export default {
data() { data() {
return { return {
shootAsk: [{ shootAsk: [{
url: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/bzps.png', url: '../../static/images/SHSZ/BZ1.png',
text: '标准拍摄' text: '标准拍摄'
}, },
{ {
url: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/bkqs.png', url: '../../static/images/SHSZ/BKQS.png',
text: '边框缺失' text: '边框缺失'
}, },
{ {
url: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/zpmh.png', url: '../../static/images/SHSZ/ZPMH.png',
text: '照片模糊' text: '照片模糊'
}, },
{ {
url: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/sgql.png', url: '../../static/images/SHSZ/SGQL.png',
text: '闪光强烈' text: '闪光强烈'
} }
], ],
images: [{ img: '' }, { img: '' }, { img: '' }, { img: '' }], images: [{
img: ''
}, {
img: ''
}, {
img: ''
}, {
img: ''
}],
storeBg: '', storeBg: '',
check: { check: {
ziti: '1', ziti: '1',
@ -224,7 +296,10 @@
overTimeShow: false, overTimeShow: false,
mer_address: '', mer_address: '',
id: '', id: '',
mer_certificate: '' mer_certificate: '',
credit_buy: false, //
interest_rate: '', //
settle_cycle: '', //
} }
}, },
onLoad(e) { onLoad(e) {
@ -234,7 +309,9 @@
onShow() {}, onShow() {},
methods: { methods: {
getMerchantInfo(id) { getMerchantInfo(id) {
merchantInfoAPI({ id }).then(res => { merchantInfoAPI({
id
}).then(res => {
console.log(res); console.log(res);
this.images[0].img = res.data.mer_banner this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar this.images[1].img = res.data.mer_avatar
@ -258,6 +335,18 @@
this.servicePhone = res.data.service_phone this.servicePhone = res.data.service_phone
this.mer_address = res.data.mer_address this.mer_address = res.data.mer_address
this.merState = res.data.mer_state === 1 ? true : false this.merState = res.data.mer_state === 1 ? true : false
this.credit_buy = res.data.credit_buy === 1 ? true : false
if (res.data.settle_cycle == 0) {
this.settle_cycle = ''
} else {
this.settle_cycle = res.data.settle_cycle
}
if (res.data.interest_rate == 0) {
this.interest_rate = ''
} else {
this.interest_rate = res.data.interest_rate
}
// console.log('res', res.data); // console.log('res', res.data);
}).catch(err => { }).catch(err => {
// console.log('err', err); // console.log('err', err);
@ -266,6 +355,11 @@
checkboxChange(val) { checkboxChange(val) {
this.delivery_way = val.detail.value this.delivery_way = val.detail.value
}, },
//
change(e) {
this.credit_buy = e
console.log(e);
},
// //
sel(item, i) { sel(item, i) {
if (item.isCheck == false) { if (item.isCheck == false) {
@ -287,6 +381,16 @@
}) })
}, },
submitData() { submitData() {
if (this.settle_cycle < 15) {
this.settle_cycle = 15
} else if (this.settle_cycle > 90) {
this.settle_cycle = 90
}
if (this.interest_rate < 0.01) {
this.interest_rate = 0.01
} else if (this.interest_rate > 0.1) {
this.interest_rate = 0.1
}
let data = { let data = {
mer_banner: this.images[0].img, mer_banner: this.images[0].img,
mer_avatar: this.images[1].img, mer_avatar: this.images[1].img,
@ -308,7 +412,10 @@
mer_state: this.merState ? '1' : '0', mer_state: this.merState ? '1' : '0',
type: '2', type: '2',
uploadedqualifications: '', uploadedqualifications: '',
id: this.id id: this.id,
credit_buy: this.credit_buy,
settle_cycle: this.settle_cycle,
interest_rate: this.interest_rate
} }
merchantUpdateAPI(data).then(res => { merchantUpdateAPI(data).then(res => {
Toast(res.message) Toast(res.message)
@ -325,12 +432,14 @@
}) })
}, },
selfLocation() { selfLocation() {
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: (res) => { success: (res) => {
console.log(res);
this.latitude = res.latitude.toString(); this.latitude = res.latitude.toString();
this.longitude = res.longitude.toString(); this.longitude = res.longitude.toString();
this.longLati = `${res.longitude},${res.longitude}` this.longLati = `${res.latitude},${res.longitude}`
}, },
fail: (err) => { fail: (err) => {
Toast(err) Toast(err)
@ -345,7 +454,9 @@
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: function(res) { success: function(res) {
console.log(res); console.log(res);
uni.showLoading({ title: '上传中...' }) uni.showLoading({
title: '上传中...'
})
uploads(res.tempFilePaths[0], 'img').then(res => { uploads(res.tempFilePaths[0], 'img').then(res => {
that.images[i].img = res that.images[i].img = res
uni.hideLoading() uni.hideLoading()
@ -380,35 +491,39 @@
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.icon-xinghao { /* 页面样式 */
font-size: 28.07rpx;
color: red;
margin-right: 6px; input {
font-size: 28rpx;
} }
.basic_set {
background-color: white;
padding: 30rpx;
}
.basice_item { .basice_item {
background-color: #fff; box-sizing: border-box;
background-color: #F4F7FE;
padding: 38.6rpx 35.09rpx; padding: 38.6rpx 35.09rpx;
margin-bottom: 35.09rpx; margin-bottom: 35.09rpx;
border-radius: 20rpx;
} }
.headline { .headline {
margin-bottom: 42.11rpx; margin-bottom: 42.11rpx;
display: flex;
align-items: center;
.text { .text {
font-size: 35.09rpx; font-size: 35.09rpx;
font-weight: bold; font-weight: bold;
&::before {
content: '';
display: inline-block;
width: 4px;
height: 20px;
background: linear-gradient(180deg, #66CE69 0%, #20A162 100%);
border-radius: 0px 2px 2px 0px;
margin-right: 8.77rpx;
}
} }
} }
@ -424,14 +539,16 @@
width: 100%; width: 100%;
height: 210.53rpx; height: 210.53rpx;
border-radius: 7.02rpx; border-radius: 7.02rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dpbjt.png'); // background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dpbjt.png');
background-repeat: no-repeat; // background-repeat: no-repeat;
background-size: cover; // background-size: cover;
background-color: white;
text-align: center; text-align: center;
font-size: 28.07rpx; font-size: 28.07rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center;
.icon-tupian1 { .icon-tupian1 {
font-size: 77.19rpx; font-size: 77.19rpx;
@ -452,13 +569,15 @@
.avatar_img { .avatar_img {
width: 210.53rpx; width: 210.53rpx;
height: 210.53rpx; height: 210.53rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dptx.png'); // background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dptx.png');
background-repeat: no-repeat; // background-repeat: no-repeat;
background-size: cover; // background-size: cover;
background-color: white;
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center;
.icon-tupian1 { .icon-tupian1 {
font-size: 52.63rpx; font-size: 52.63rpx;
@ -476,13 +595,15 @@
.zizhi_img { .zizhi_img {
width: 382.46rpx; width: 382.46rpx;
height: 210.53rpx; height: 210.53rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dpzz.png'); // background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dpzz.png');
background-repeat: no-repeat; // background-repeat: no-repeat;
background-size: cover; // background-size: cover;
background-color: white;
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center;
.icon-tupian1 { .icon-tupian1 {
font-size: 52.63rpx; font-size: 52.63rpx;
@ -496,18 +617,34 @@
margin: 36.84rpx 0 24.56rpx 0; margin: 36.84rpx 0 24.56rpx 0;
} }
.ask_tit {
display: flex;
justify-content: space-around;
}
.shoot_ask { .shoot_ask {
margin-bottom: 49.12rpx; margin-bottom: 49.12rpx;
.shoot_item { .shoot_item {
width: 150.7rpx;
height: 101.64rpx;
background-color: #DEE9FE;
position: relative;
.shoot_img { .shoot_img {
width: 157.89rpx; position: absolute;
height: 105.26rpx; top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin-bottom: 15rpx;
} }
.shoot_msg { .shoot_msg {
margin-top: 100rpx;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
// position: absolute;
} }
} }
} }
@ -521,28 +658,27 @@
} }
.street_img { .street_img {
padding: 0 31.58rpx; padding: 0 20rpx;
width: 100%; width: 100%;
height: 184.21rpx; height: 184.21rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dpbjt.png'); // background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/wyly/dpbjt.png');
background-repeat: no-repeat; // background-repeat: no-repeat;
background-size: cover; // background-size: cover;
background-color: white;
font-size: 28.07rpx; font-size: 28.07rpx;
.icon-tupian1 {
font-size: 52.63rpx;
margin-right: 47.37rpx;
}
} }
} }
.sub_title { .sub_title {
font-size: 31.58rpx; // font-size: 31.58rpx;
} }
.item_cell { .item_cell {
padding: 31.58rpx 0; padding: 31.58rpx 0;
border-bottom: 1px solid #F7F7F7; border-bottom: 1px solid #F7F7F7;
border-bottom: 1px solid #B3CBFC;
.ziti { .ziti {
margin-right: 21.05rpx; margin-right: 21.05rpx;
@ -555,6 +691,13 @@
color: #CCCCCC; color: #CCCCCC;
} }
.remarks {
margin-left: 20px;
font-size: 24.56rpx;
color: #CCCCCC;
margin-top: 10rpx;
}
.long_lat { .long_lat {
margin: 31.58rpx 0; margin: 31.58rpx 0;
width: 100%; width: 100%;
@ -575,6 +718,7 @@
margin-top: 31.58rpx; margin-top: 31.58rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
.week_item { .week_item {
margin-right: 17.54rpx; margin-right: 17.54rpx;
@ -589,12 +733,14 @@
line-height: 56.14rpx; line-height: 56.14rpx;
width: 149.12rpx; width: 149.12rpx;
height: 56.14rpx; height: 56.14rpx;
border-radius: 31.54rpx 31.54rpx 31.54rpx 31.54rpx;
background-color: #F2F2F2; background-color: #F2F2F2;
} }
.date_week_a { .date_week_a {
color: #20A162; color: #3274F9;
background-color: rgba(102, 206, 105, 0.5); background-color: #B3CBFC;
border-radius: 31.54rpx 31.54rpx 31.54rpx 31.54rpx;
} }
} }
} }
@ -609,8 +755,8 @@
line-height: 84.21rpx; line-height: 84.21rpx;
width: 284.21rpx; width: 284.21rpx;
height: 84.21rpx; height: 84.21rpx;
background: #F6F6F6; background: #E7EFFE;
border-radius: 4px; border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
} }
} }
@ -619,7 +765,7 @@
transform: translate(-50%); transform: translate(-50%);
line-height: 84.21rpx; line-height: 84.21rpx;
border-radius: 100px; border-radius: 100px;
background-color: #20A162; background-color: #3274F9;
color: #fff; color: #fff;
height: 84.21rpx; height: 84.21rpx;
width: 680.7rpx; width: 680.7rpx;

View File

@ -9,27 +9,32 @@
<swiper-item :class="{ active: 0 == swiperCur }"> <swiper-item :class="{ active: 0 == swiperCur }">
<view class="slide-navigator"> <view class="slide-navigator">
<view class="item" hover-class='none' @click="jumpAddGoods"> <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> <text class="text">添加商品</text>
</view> </view>
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`" <navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`"
hover-class='none'> 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> <text class="text">在售商品</text>
</navigator> </navigator>
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=3`" <navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=3`"
hover-class='none'> 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> <text class="text">售罄商品</text>
</navigator> </navigator>
<navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=5`" <navigator class="item" :url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=5`"
hover-class='none'> 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> <text class="text">回收站</text>
</navigator> </navigator>
<navigator class="item" :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" <navigator class="item" :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
hover-class='none'> 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> <text class="text">店铺分类</text>
</navigator> </navigator>
</view> </view>
@ -38,7 +43,8 @@
<view class="slide-navigator"> <view class="slide-navigator">
<navigator class="item" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`" <navigator class="item" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
hover-class='none'> 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> <text class="text">运费模板</text>
</navigator> </navigator>
<navigator class="item" :url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`" <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> <image mode='widthFix' class="image" src="../static/images/product_specification.png"></image>
<text class="text">规格模板</text> <text class="text">规格模板</text>
</navigator> </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> </view>
</swiper-item> </swiper-item>
</block> </block>
@ -75,28 +87,60 @@
<text class='ot_price'>{{item.ot_price}}</text> <text class='ot_price'>{{item.ot_price}}</text>
</view> </view>
</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>
<view class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<view></view>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view v-if="item.is_show == 1 && item.status == 1" class="bnt" @tap.stop="handleShelves(item,0)">下架 <view v-if="item.is_show == 1 && item.status == 1" class="bnt" @tap.stop="handleShelves(item,0)">下架
</view> </view>
<view v-if="item.is_show == 0 && item.status == 1" class="bnt" @tap.stop="handleShelves(item),1">上架 <view v-if="item.is_show == 0 && item.status == 1" class="bnt" @tap.stop="handleShelves(item),1">上架
</view> </view>
<view @click="editGoods(item)" class="bnt">编辑</view> <view @click="editGoods(item)" class="bnt">编辑</view>
<navigator :url="'/pages/admin/goods_details/index?product_id='+item.product_id+'&product_type=0'" <view class="bnt" v-if="item.is_show == 0" @tap.stop="handleRecycle(item,index)">删除
class="bnt" hover-class='none'>预览</navigator> </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)"> <view class="bnt bnt_recommend" v-if="item.is_show == 1" @tap.stop="handleRecommend(item)">
{{item.is_good ? '取消推荐' : '店铺推荐'}} {{item.is_good ? '取消推荐' : '店铺推荐'}}
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</view> </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> </view>
</template> </template>
@ -114,7 +158,8 @@
productLstApi, productLstApi,
productDeleteApi, productDeleteApi,
productOffApi, productOffApi,
productRecommendApi productRecommendApi,
postImport
} from "@/api/product"; } from "@/api/product";
import Loading from '@/components/Loading/index.vue'; import Loading from '@/components/Loading/index.vue';
import { import {
@ -145,6 +190,32 @@
productList: [], productList: [],
swiperCur: 0, swiperCur: 0,
circular: true, 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) { onLoad(options) {
@ -158,7 +229,95 @@
this.getList(this.mer_id); this.getList(this.mer_id);
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onHide() {
this.show = false
},
methods: { 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() { jumpAddGoods() {
const data = getStorage('addGoodsFormData'); 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 // swiper
swiperChange(e) { swiperChange(e) {
let { current, source } = e.detail; let {
current,
source
} = e.detail;
if (source === 'touch') { if (source === 'touch') {
// source swiperchangeautoplaytouchcurrentbug // source swiperchangeautoplaytouchcurrentbug
this.swiperCur = e.detail.current; this.swiperCur = e.detail.current;
@ -192,6 +356,7 @@
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.productList.push.apply(that.productList, res.data.list); that.productList.push.apply(that.productList, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
}, },
error => { error => {
that.$util.Tips({ that.$util.Tips({
@ -217,7 +382,10 @@
removeStorage(item); 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) { handleRecycle(item, index) {
let that = this; let that = this;
@ -261,7 +429,9 @@
// //
onAndOff(item, status) { onAndOff(item, status) {
let that = this; 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({ that.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
@ -278,7 +448,9 @@
handleRecommend(item) { handleRecommend(item) {
let that = this let that = this
let is_good = item.is_good ? 0 : 1 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({ that.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
@ -528,7 +700,7 @@
} }
.operation { .operation {
padding: 20upx 30upx; padding: 20upx 10px;
background: #ffffff; background: #ffffff;
width: 100%; width: 100%;
border-radius: 0 0 10rpx 10rpx; 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> </style>

View File

@ -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)"> <view class="items" @click.stop="navTap(2)">
<text class="tName" :class="currentNav==2?'on':''">关注</text> <text class="tName" :class="currentNav==2?'on':''">关注</text>
</view> </view>
@ -257,6 +257,7 @@
<view class="nice_box flex_a_c" @click.stop="giveStart(item)"> <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="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text> <text class="collect">{{item.count_start}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -1036,14 +1037,15 @@
/* #ifdef MP */ /* #ifdef MP */
padding-top: 200rpx; padding-top: 200rpx;
/* #endif */ /* #endif */
background-color: #000000; // background-color: #000000;
background-color: #F5F5F5;
.goods_item { .goods_item {
width: 342.11rpx; width: 342.11rpx;
height: 491.23rpx; height: 491.23rpx;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
background-color: #000; // background-color: #000;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-bottom: 10px; padding-bottom: 10px;
@ -1170,11 +1172,11 @@
position: fixed; position: fixed;
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 86rpx; height: 186rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 70rpx; padding-top: 70rpx;
.items { .items {
margin: 0 30rpx; margin: 0 30rpx;
@ -1191,7 +1193,7 @@
} }
.container { .container {
background-color: #000000; background-color: #F5F5F5;
} }
.item { .item {

View File

@ -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="tool-bar">
<view class='iconfont icon-xiangzuo' @tap='goBack'></view> <view class='iconfont icon-xiangzuo' @tap='goBack'></view>
</view> </view>
@ -31,7 +34,18 @@
:vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false"> :vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
<swiper-item v-for="(list,index) in dataList"> <swiper-item v-for="(list,index) in dataList">
<view v-if="max > index"> <view v-if="max > index">
<!-- <view style="width: 100px;height: 100px;background-color: red;">
5666
</view> -->
<view> <view>
<!-- 这种视频背景模糊的效果怎么做呢 -->
<!-- <!--
1.v-if用于控制视频在节点的渲染数 1.v-if用于控制视频在节点的渲染数
2.muted的默认值是 false代表默认是禁音视频的 2.muted的默认值是 false代表默认是禁音视频的
@ -46,13 +60,18 @@
:show-center-play-btn="false" :enable-progress-gesture="false" :src="list.video_link" :show-center-play-btn="false" :enable-progress-gesture="false" :src="list.video_link"
@ended="ended" @play="play(index)" @click="tapVideoHover(list.state,$event)" @ended="ended" @play="play(index)" @click="tapVideoHover(list.state,$event)"
@waiting="waiting(index)" @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> </view>
<!-- 播放状态pause 的时候就会暂停 --> <!-- 播放状态pause 的时候就会暂停 -->
<view class="videoHover" @click="tapVideoHover(list.state,$event)" <!-- <view class="videoHover" @click="tapVideoHover(list.state,$event)"
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"> :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'">
<image v-if="list.state=='pause'" class="playState" src="../static/img/index/play.png"></image> <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==0 || list.status==-2" class="video-status">
<view v-if="list.status == -1 || list.status == -2" class="status-title"> <view v-if="list.status == -1 || list.status == -2" class="status-title">
@ -1135,10 +1154,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.video-list { .video-list {
padding: 200rpx 28.07rpx 28.07rpx 28.07rpx; padding: 150rpx 28.07rpx 28.07rpx 28.07rpx;
/* #ifdef MP */ /* #ifdef MP */
padding-top: 200rpx; padding-top: 150rpx;
/* #endif */ /* #endif */
background-color: #F5F5F5;
.goods_item { .goods_item {
width: 342.11rpx; width: 342.11rpx;
@ -1237,13 +1257,13 @@
position: fixed; position: fixed;
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 86rpx; height: 120rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 20rpx; padding-top: 20rpx;
/* #ifdef MP */ /* #ifdef MP */
top: 75rpx; padding-top: 75rpx;
/* #endif */ /* #endif */
.tool-bar { .tool-bar {
@ -1258,8 +1278,9 @@
.icon-xiangzuo { .icon-xiangzuo {
margin-right: 40rpx; margin-right: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 26rpx; font-size: 30rpx;
color: #fff; color: #fff;
margin-top: 60rpx;
} }
} }
@ -1290,6 +1311,7 @@
.shortVideo, .shortVideo,
.container { .container {
background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, #000000 100%); background: linear-gradient(180deg, rgba(0, 0, 0, .8) 0%, #000000 100%);
} }
.item { .item {
@ -1336,6 +1358,7 @@
flex: 1; flex: 1;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
// background-color: red;
} }
.playState { .playState {
@ -1861,4 +1884,8 @@
color: #999; color: #999;
} }
} }
.videoa {
background-color: red;
}
</style> </style>

View File

@ -5,14 +5,18 @@
<view class="card-top"> <view class="card-top">
<view class="title">{{item.mer_name}}</view> <view class="title">{{item.mer_name}}</view>
<view class="time">提交时间{{item.create_time}}</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>
<view class="line"></view> <view class="line"></view>
<view class="card-bottom"> <view class="card-bottom">
<view class="card-status"> <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-if="item.status === 0" src="../../../static/images/SJRZ/DSH.png"
<image class="status-icon" v-else-if="item.status === 1" src="../static/images/passed.png" mode=""></image> mode="">
<image class="status-icon" v-else-if="item.status === 2" src="../static/images/not-pass.png" mode=""></image> </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> <text class="status-text">{{statusText(item.status)}}</text>
</view> </view>
<view class="status-btn" @click="jump(item)">{{statusBtn(item.status)}}</view> <view class="status-btn" @click="jump(item)">{{statusBtn(item.status)}}</view>
@ -83,16 +87,17 @@
}, },
// //
jump(item) { jump(item) {
// console.log(item)
if ([0, 2].includes(item.status)) { if ([0, 2].includes(item.status)) {
console.log(item)
uni.navigateTo({ 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) { } else if (item.status === 1) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/store/merchantDetails/index?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}` url: `/pages/store/merchantDetails/index?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}`
}) })
} }
}, },
// //
statusText(number) { statusText(number) {
@ -108,9 +113,9 @@
statusBtn(number) { statusBtn(number) {
// 使 // 使
let statusData = { let statusData = {
0: "编辑", 0: "",
1: "查看", 1: "查看详情",
2: "重新提交", 2: "查看详情",
}; };
return statusData[number] return statusData[number]
}, },
@ -125,72 +130,87 @@
align-items: center; align-items: center;
background-color: #F5F5F5; background-color: #F5F5F5;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
.card-list { .card-list {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
padding: 20rpx 24rpx; padding: 20rpx 24rpx;
margin: 10rpx 20rpx; margin: 10rpx 20rpx;
border-radius: 12rpx; border-radius: 12rpx;
.card-top { .card-top {
height: 140rpx; height: 140rpx;
.title { .title {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
} }
.time { .time {
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
padding: 5rpx 0; padding: 5rpx 0;
margin-top: 10rpx;
} }
.reason { .reason {
color: #E93323; color: #E93323;
font-weight: bold; font-weight: bold;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.line { .line {
height: 2rpx; height: 2rpx;
margin: 20rpx 0 20rpx 0; margin: 20rpx 0 20rpx 0;
background-color: #EEEEEE; background-color: #EEEEEE;
} }
.card-bottom { .card-bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
color: #333; color: #333;
.card-status { .card-status {
display: flex; display: flex;
align-items: center; align-items: center;
.status-icon { .status-icon {
width: 30rpx; width: 50.82rpx;
height: 30rpx; height: 50.82rpx;
margin: 10rpx; margin: 10rpx;
} }
.status-text { .status-text {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
} }
} }
.status-btn { .status-btn {
font-size: 26rpx; font-size: 26rpx;
color: #555; color: #555;
border: 1px solid #999999; border: 1px solid #729FFA;
padding: 8rpx 32rpx; padding: 8rpx 32rpx;
border-radius: 40rpx; border-radius: 40rpx;
} }
} }
} }
} }
.no-shop { .no-shop {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
height: 100vh; height: 100vh;
.pictrue { .pictrue {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
color: $uni-nothing-text; color: $uni-nothing-text;
image { image {
width: 414rpx; width: 414rpx;
height: 380rpx; height: 380rpx;

View File

@ -1,6 +1,65 @@
<template> <template>
<view class="merchant-details"> <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> <image class="img" src="../static/images/successTop.png" mode=""></image>
<view class="title"> <view class="title">
恭喜您的申请已通过 恭喜您的申请已通过
@ -18,12 +77,8 @@
</view> </view>
<text class="cope" @click="copyTBL()">复制</text> <text class="cope" @click="copyTBL()">复制</text>
</view> </view>
</view> </view> -->
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
</view> </view>
</template> </template>
@ -54,6 +109,11 @@
} }
}, },
methods: { methods: {
navgo(url) {
uni.navigateTo({
url
})
},
getGoodsDetails(id) { getGoodsDetails(id) {
getGoodsDetails(id).then(res => { getGoodsDetails(id).then(res => {
this.resData = res.data this.resData = res.data
@ -138,69 +198,100 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.merchant-details { .merchant-details {
display: flex; padding: 0 4vw;
flex-direction: column; // padding: ;
align-items: center;
background-color: #fff;
height: 100vh; height: 100vh;
position: relative; 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 { .top {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.img { .img {
width: 340rpx; width: 340rpx;
height: 280rpx; height: 280rpx;
margin: 140rpx 0 30rpx 0; margin: 140rpx 0 30rpx 0;
} }
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333; 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 { .btn {
width: 70%; // width: 70%;
position: absolute; // position: absolute;
text-align: center; // text-align: center;
color: #999999; // color: #999999;
font-size: 24rpx; // font-size: 24rpx;
bottom: 80rpx // bottom: 80rpx
// background-color: red;
// height: 100vw;
margin-top: 5vw;
}
.btn_bottom {
position: fixed;
width: 92vw;
bottom: 20rpx;
} }
} }
</style> </style>

View File

@ -1,14 +1,25 @@
<template> <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'> <form report-submit='true'>
<view class='merchantsSettled'> <view class='merchantsSettled'>
<view class="merchantBgCount"> <view class="merchantBgCount">
<image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'" <image mode="widthFix" class="merchantBg" src="../../../static/images/SJRZ/bg.png" alt="">
alt="">
</view> </view>
<view class="application-record" @click="jumpToList">
申请记录 <view class="application-record">
<text class="iconfont icon-xiangyou"></text> <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>
<view class='list'> <view class='list'>
<view class="item"> <view class="item">
@ -59,7 +70,7 @@
<view class="uni-list-cell"> <view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle"> <view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">商户分类</text> <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"> range-key="category_name">
<input placeholder="请选择商户分类" type="text" readonly disabled <input placeholder="请选择商户分类" type="text" readonly disabled
v-model="mer_classification"> v-model="mer_classification">
@ -132,7 +143,8 @@
</checkbox-group> </checkbox-group>
<button class="settleAgree" @click="getConfig">入驻协议</button> <button class="settleAgree" @click="getConfig">入驻协议</button>
</view> </view>
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">提交申请</button> <button class='submitBtn' :style="validate === true ? 'background:#3274F9':''"
@click="formSubmit">提交申请</button>
</view> </view>
</view> </view>
</form> </form>
@ -301,6 +313,9 @@
onShow() {}, onShow() {},
onReady() {}, onReady() {},
methods: { methods: {
goBack() {
uni.navigateBack()
},
// //
// change(e) { // change(e) {
// this.isnum = (e === true ? 1 : 0) // this.isnum = (e === true ? 1 : 0)
@ -724,9 +739,9 @@
<style scoped lang="scss"> <style scoped lang="scss">
/deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked, /deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked,
/deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked { /deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid var(--view-theme) !important; border: 1px solid #3274F9 !important;
background-color: var(--view-theme) !important; background-color: #3274F9 !important;
color: #fff !important; color: white !important;
} }
.uni-input-placeholder { .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 { .merchantBgCount {
line-height: 0; line-height: 0;
} }
@ -779,14 +806,23 @@
} }
.application-record { .application-record {
height: 40rpx;
position: absolute; position: absolute;
display: flex; display: flex;
align-items: center; align-items: center;
top: 240rpx; width: 100vw;
display: flex;
justify-content: space-between;
top: 40rpx;
right: 0; right: 0;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
/* #endif */
color: #fff; color: #fff;
font-size: 22rpx; 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; padding: 8rpx 18rpx;
border-radius: 20px 0px 0px 20px; border-radius: 20px 0px 0px 20px;
} }
@ -996,9 +1032,10 @@
position: absolute; position: absolute;
width: 93px; width: 93px;
line-height: 27px; line-height: 27px;
border: 1px solid var(--view-theme); border: 1px solid #3274F9;
border-radius: 15px; border-radius: 15px;
color: var(--view-theme); color: #3274F9;
// color: $primary-color;
text-align: center; text-align: center;
bottom: 8px; bottom: 8px;
right: 0; right: 0;
@ -1022,7 +1059,7 @@
color: #fff; color: #fff;
background: #E3E3E3; background: #E3E3E3;
margin-top: 25px; margin-top: 25px;
pointer-events: none; // pointer-events: none;
} }
.merchantsSettled .submitBtn.on { .merchantsSettled .submitBtn.on {
@ -1241,4 +1278,6 @@
} }
} }
.my-picker {}
</style> </style>

View File

@ -113,6 +113,7 @@
}, },
onLoad() { onLoad() {
getHotBanner('good').then(res => { getHotBanner('good').then(res => {
// console.log(res);
this.bgData = res.data this.bgData = res.data
}) })
this.getArticle() this.getArticle()

View File

@ -105,7 +105,7 @@
<view class="order-wrapper"> <view class="order-wrapper">
<view class="order-hd flex skeleton-rect"> <view class="order-hd flex skeleton-rect">
<view class="left">我的订单</view> <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"> open-type="navigate">
全部订单 全部订单
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
@ -287,19 +287,19 @@
{ {
icon: 'icon-daifahuo1', icon: 'icon-daifahuo1',
title: '待发货', title: '待发货',
url: '/pages/users/order_list/index?status=1', url: '/pages/users/order_list/index?status=2',
num: 0 num: 0
}, },
{ {
icon: 'icon-daishouhuo1', icon: 'icon-daishouhuo1',
title: '待收货', title: '待收货',
url: '/pages/users/order_list/index?status=2', url: '/pages/users/order_list/index?status=3',
num: 0 num: 0
}, },
{ {
icon: 'icon-daipingjia1', icon: 'icon-daipingjia1',
title: '待评价', title: '待评价',
url: '/pages/users/order_list/index?status=3', url: '/pages/users/order_list/index?status=4',
num: 0 num: 0
}, },
{ {
@ -420,7 +420,10 @@
// //
filterMenus: function(item) { filterMenus: function(item) {
let that = this; 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') { else if (item.url == '/pages/users/user_spread_user/index') {
if (that.extension_status == 0) { if (that.extension_status == 0) {
item.isShow = false 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_grade/index') item.isShow = that.member_status == 1
else if (item.url == '/pages/users/user_integral/index') item.isShow = that.integral_status == 1 else if (item.url == '/pages/users/user_integral/index') item.isShow = that.integral_status == 1
else item.isShow = true else item.isShow = true
}, },
showMenu(menu) { showMenu(menu) {
return !menu || ['integral', 'service', 'admin_order', 'verify_order', 'intention', 'promoter', 'balance'] return !menu || ['integral', 'service', 'admin_order', 'verify_order', 'intention', 'promoter', 'balance']
@ -556,6 +561,7 @@
that.filterMenus(item) that.filterMenus(item)
that.personalMenu.push(item) that.personalMenu.push(item)
}) })
that.imgUrls = res.data.banner that.imgUrls = res.data.banner
}); });
}, },

View File

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

View File

@ -8,8 +8,9 @@
<h3>提现次数</h3> <h3>提现次数</h3>
</view> </view>
<view class="sum"> <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> <h3>提现总额</h3>
</view> </view>
</view> </view>
</view> </view>
@ -66,7 +67,11 @@
UserApplylist:[] UserApplylist:[]
} }
}, },
computed: {}, computed: {
sumTofixed(){
return this.returnFloat(this.sum)
}
},
watch: { watch: {
}, },
@ -79,6 +84,21 @@
// }) // })
}, },
methods: { 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() { tixian() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1

View File

@ -80,39 +80,7 @@
class="font_pro">隐私政策</text></text> class="font_pro">隐私政策</text></text>
</checkbox-group> </checkbox-group>
</div> </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>
<div class="whiteBg" v-else> <div class="whiteBg" v-else>
<div class="title">注册账号</div> <div class="title">注册账号</div>
@ -168,24 +136,6 @@
class="font_pro">隐私政策</text></text> class="font_pro">隐私政策</text></text>
</checkbox-group> </checkbox-group>
</div> </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> </div>
<div class="bottom"></div> <div class="bottom"></div>

View File

@ -8,8 +8,10 @@
<text class='phone'>{{addressInfo.phone}}</text> <text class='phone'>{{addressInfo.phone}}</text>
</view> </view>
<view> <view>
<text class='default t-color' <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>
</view> </view>
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none" <navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
@ -119,6 +121,7 @@
<view class="boxs"> <view class="boxs">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>配送方式</view> <view>配送方式</view>
<view <view
v-if="item.delivery_way.length == 2 && (item.order.allow_delivery && item.order.allow_take)" v-if="item.delivery_way.length == 2 && (item.order.allow_delivery && item.order.allow_take)"
class='discount' @tap="openShowBox(item,index)"> 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 == 0"><text></text>{{ item.order.pay_price }}</view>
<view class="price" v-if="item.isTake == 1"><text></text>{{ item.order.org_price}}</view> <view class="price" v-if="item.isTake == 1"><text></text>{{ item.order.org_price}}</view>
</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> </view>
</view> </view>
@ -379,7 +386,11 @@
<view class="footer_count"> <view class="footer_count">
<view> <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>
<view class="coupon_price" v-if="couponData.total_coupon > 0"> <view class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{couponData.total_coupon}} 优惠:¥ {{couponData.total_coupon}}
@ -524,6 +535,12 @@
value: 'offline', value: 'offline',
title: '线下支付', title: '线下支付',
payStatus: 2, payStatus: 2,
}, {
"name": "先货后款",
"icon": "tan-a-lujing17324",
value: 'creditBuy',
title: `结算周期:${this.settle_cycle}天 日利率:${this.interest_rate}%`,
payStatus: '',
}, },
], ],
tagStyle: { tagStyle: {
@ -638,6 +655,10 @@
order_key: '', order_key: '',
is_take: '', is_take: '',
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
product_type: '',
interest_rate: '', //
settle_cycle: '', //
type_id: '', //
}; };
}, },
computed: { computed: {
@ -655,6 +676,8 @@
onReady() {}, onReady() {},
mounted: function() {}, mounted: function() {},
onLoad: function(options) { onLoad: function(options) {
this.type_id = options.type_id
this.product_type = options.product_type
this.seckillId = options.seckillId this.seckillId = options.seckillId
// #ifdef H5 // #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5' this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
@ -794,6 +817,7 @@
getUserInfo() { getUserInfo() {
getUserInfo().then(res => { getUserInfo().then(res => {
this.userInfo = res.data this.userInfo = res.data
}) })
}, },
/*获取发票说明*/ /*获取发票说明*/
@ -989,6 +1013,9 @@
*/ */
getConfirm: function(address_id) { getConfirm: function(address_id) {
// console.log(address_id, 'address_id') // console.log(address_id, 'address_id')
// console.log(this.take,)
// console.log(this.subCoupon,)
// console.log(this.use_integral, )
let that = this; let that = this;
// console.log(that.cartId.split(",")) // console.log(that.cartId.split(","))
uni.showLoading({ uni.showLoading({
@ -1003,6 +1030,7 @@
use_integral: that.use_integral use_integral: that.use_integral
}).then(res => { }).then(res => {
// //
that.product_type=res.data.order_type
that.is_take = false that.is_take = false
res.data.order.forEach(el => { res.data.order.forEach(el => {
if (el.order.isTake == 1) that.is_take = true if (el.order.isTake == 1) that.is_take = true
@ -1053,6 +1081,16 @@
that.allow_address = res.data.allow_address that.allow_address = res.data.allow_address
that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货' that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
that.order_key = res.data.key 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({ uni.getStorage({
key: "invoice_Data", key: "invoice_Data",
success: function(res) { success: function(res) {
@ -1080,6 +1118,7 @@
if (that.addressId) { if (that.addressId) {
getAddressDetail(that.addressId).then(res => { getAddressDetail(that.addressId).then(res => {
res.data.is_default = parseInt(res.data.is_default); res.data.is_default = parseInt(res.data.is_default);
that.addressInfo = res.data || {}; that.addressInfo = res.data || {};
that.addressId = res.data.address_id || 0; that.addressId = res.data.address_id || 0;
that.address.addressId = res.data.address_id || 0; that.address.addressId = res.data.address_id || 0;
@ -1087,8 +1126,12 @@
real_name: res.data.real_name, real_name: res.data.real_name,
phone: res.data.phone phone: res.data.phone
} }
console.log(that.addressId);
this.$nextTick(() => {
this.getConfirm(that.addressId); this.getConfirm(that.addressId);
}) })
})
} else { } else {
getAddressList().then(res => { getAddressList().then(res => {
that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {}; that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {};
@ -1106,10 +1149,10 @@
} }
}, },
payItem: function(e) { payItem: function(e) {
console.log(e);
let that = this; let that = this;
let active = e; let active = e;
that.active = active; that.active = active;
// console.log(this.active);
that.animated = true; that.animated = true;
that.payType = that.cartArr[active].value; that.payType = that.cartArr[active].value;
if (that.payType == 'weixin') { if (that.payType == 'weixin') {
@ -1174,7 +1217,12 @@
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key, callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config, 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; that.orderPay = true;
uni.hideLoading(); uni.hideLoading();
switch (status) { switch (status) {
@ -1186,7 +1234,7 @@
title: res.message title: res.message
}, { }, {
tab: 5, tab: 5,
url: goPages url: goPagesOrder
}); });
break; break;
case 'success': case 'success':
@ -1200,10 +1248,10 @@
break; break;
case 'alipay': case 'alipay':
case "alipayQr": case "alipayQr":
uni.navigateTo({ // uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' + // url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
jsConfig // jsConfig
}) // })
return; return;
break; break;
// #ifndef MP // #ifndef MP
@ -1240,8 +1288,10 @@
provider: 'wxpay', provider: 'wxpay',
orderInfo: jsConfig, orderInfo: jsConfig,
success: (e) => { success: (e) => {
//
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=支付成功'; '&msg=支付成功' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功', title: '支付成功',
icon: 'success' icon: 'success'
@ -1251,8 +1301,9 @@
}); });
}, },
fail: (e) => { fail: (e) => {
//
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付'; '&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
}, { }, {
@ -1261,8 +1312,9 @@
}); });
}, },
complete: () => { complete: () => {
//
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付'; '&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
}, { }, {
@ -1297,8 +1349,10 @@
}); });
}, },
fail: function(e) { fail: function(e) {
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&product_type=' + that
.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1322,10 +1376,11 @@
case 'h5': case 'h5':
let host = window.location.protocol + "//" + window.location.host; let host = window.location.protocol + "//" + window.location.host;
let url = 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 eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}` let locations = `${jsurl}&redirect_url=${eUrl}`
//
setTimeout(() => { setTimeout(() => {
location.href = locations; location.href = locations;
}, 100); }, 100);
@ -1346,8 +1401,10 @@
}); });
}, },
fail: (e) => { fail: (e) => {
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=支付失败' orderId + '&msg=支付失败' + '&product_type=' + that
.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '支付失败' title: '支付失败'
}, { }, {
@ -1357,8 +1414,11 @@
}, },
complete: () => { complete: () => {
uni.hideLoading(); uni.hideLoading();
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&product_type=' + that
.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1370,8 +1430,10 @@
break; break;
// #endif // #endif
default: default:
//
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' orderId + '&msg=取消支付' + '&product_type=' + that.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1429,7 +1491,6 @@
this.virtualIndex = index; this.virtualIndex = index;
}, },
SubOrder: function(e) { SubOrder: function(e) {
console.log(this.active);
let that = this, let that = this,
data = {}; data = {};
@ -1555,6 +1616,15 @@
.Tips({ .Tips({
title: '余额不足!' title: '余额不足!'
}); });
//
// if (this.payType == 'creditBuy') {
// uni.navigateTo({
// ur
// })
// return
// }
uni.showLoading({ uni.showLoading({
title: '订单支付中', title: '订单支付中',
mask: true mask: true
@ -1567,8 +1637,6 @@
// #ifndef MP // #ifndef MP
that.payment(data); that.payment(data);
// #endif // #endif
}, },
// //
openShowBox(item, index) { openShowBox(item, index) {

View File

@ -1,7 +1,9 @@
<template> <template>
<view :style="viewColor"> <view :style="viewColor">
<view class='my-order'> <view class='my-order'>
<view class='header'> <view class='header'>
<view class='picTxt acea-row row-between-wrapper'> <view class='picTxt acea-row row-between-wrapper'>
<view class='text'> <view class='text'>
<view class='name'>订单信息</view> <view class='name'>订单信息</view>
@ -19,21 +21,21 @@
<view class='nav acea-row row-around'> <view class='nav acea-row row-around'>
<view class='item' :class='orderStatus==-1 ? "on": ""' @click="statusClick(-1)"> <view class='item' :class='orderStatus==-1 ? "on": ""' @click="statusClick(-1)">
<view>全部</view> <view>全部</view>
<view class='num'>{{orderData.all || 0}}</view> <view class='num'>{{orderData.orderCount || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)"> <view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view>待付款</view> <view>待付款</view>
<view class='num'>{{orderData.noPay || 0}}</view> <view class='num'>{{orderData.noPay || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)"> <view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)">
<view>待发货</view> <view>待发货</view>
<view class='num'>{{orderData.noPostage || 0}}</view> <view class='num'>{{orderData.noPostage || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)"> <view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
<view>待收货</view> <view>待收货</view>
<view class='num '>{{orderData.noDeliver || 0}}</view> <view class='num '>{{orderData.noDeliver || 0}}</view>
</view> </view>
<view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)"> <view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
<view>待评价</view> <view>待评价</view>
<view class='num'>{{orderData.noComment || 0}}</view> <view class='num'>{{orderData.noComment || 0}}</view>
</view> </view>
@ -43,11 +45,14 @@
<navigator class="acea-row row-between" url="/pages/users/presell_order_list/index" hover-class='none'> <navigator class="acea-row row-between" url="/pages/users/presell_order_list/index" hover-class='none'>
<view class="info"> <view class="info">
<view class="title">预售尾款订单转到这里了</view> <view class="title">预售尾款订单转到这里了</view>
<view class="desc"> <text class="t-color">{{ presellOrderCount }}</text> 笔预售尾款订单待付款请点击查看</view> <view class="desc"> <text class="t-color">{{ presellOrderCount }}</text> 笔预售尾款订单待付款请点击查看
</view>
</view> </view>
<view class="photo acea-row row-between"> <view class="photo acea-row row-between">
<view class='picture'> <view class='picture'>
<image :src='(presellProList[0].orderProduct[0].cart_info.productAttr && presellProList[0].orderProduct[0].cart_info.productAttr.image) || presellProList[0].orderProduct[0].cart_info.product.image'></image> <image
:src='(presellProList[0].orderProduct[0].cart_info.productAttr && presellProList[0].orderProduct[0].cart_info.productAttr.image) || presellProList[0].orderProduct[0].cart_info.product.image'>
</image>
</view> </view>
<view class="more_btn"><text class="iconfont icon-gengduo3"></text></view> <view class="more_btn"><text class="iconfont icon-gengduo3"></text></view>
</view> </view>
@ -63,7 +68,9 @@
<view class="acea-row row-middle left-wrapper"> <view class="acea-row row-middle left-wrapper">
{{item.group_order_sn}} {{item.group_order_sn}}
</view> </view>
<view class='t-color'>{{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}</view> <view class='t-color'>
{{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}
</view>
</view> </view>
<view v-for="(order,j) in item.orderList" :key="order.order_id+j"> <view v-for="(order,j) in item.orderList" :key="order.order_id+j">
<!--预售--> <!--预售-->
@ -71,28 +78,36 @@
<block v-for="(goods,g) in order.orderProduct"> <block v-for="(goods,g) in order.orderProduct">
<view class='item-info acea-row row-between row-top'> <view class='item-info acea-row row-between row-top'>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name line1'> <view class='name line1'>
<text class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text> <text
class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text>
<view class="event_ship event_color">发货时间 <view class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 1"> <text
v-if="goods.cart_info.productPresell.presell_type === 1">
{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内 {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
</text> </text>
<!--定金预售--> <!--定金预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
</view> </view>
<view class='money'> <view class='money'>
<view>{{goods.cart_info.productPresellAttr.presell_price}}</view> <view>{{goods.cart_info.productPresellAttr.presell_price}}
</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
</view> </view>
<view v-if="goods.cart_info.productPresell.presell_type === 2" class="event_price"> <view v-if="goods.cart_info.productPresell.presell_type === 2"
class="event_price">
定金待支付 <text class="t-color">{{ order.pay_price }}</text> 定金待支付 <text class="t-color">{{ order.pay_price }}</text>
尾款待支付 <text class="t-color">{{ order.presellOrder.pay_price }}</text> 尾款待支付 <text
class="t-color">{{ order.presellOrder.pay_price }}</text>
</view> </view>
</view> </view>
</block> </block>
@ -101,14 +116,18 @@
<block v-for="(goods,g) in order.orderProduct"> <block v-for="(goods,g) in order.orderProduct">
<view class='item-info acea-row row-between row-top'> <view class='item-info acea-row row-between row-top'>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name line2'>{{goods.cart_info.product.store_name}}</view> <view class='name line2'>{{goods.cart_info.product.store_name}}
</view>
<view class='money' v-if="item.orderList[0].activity_type == 4"> <view class='money' v-if="item.orderList[0].activity_type == 4">
<view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view> <view v-if="goods.cart_info.activeSku">
{{goods.cart_info.activeSku.active_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
<view v-else class='money'> <view v-else class='money'>
@ -120,11 +139,13 @@
</block> </block>
</view> </view>
</view> </view>
<view class='totalPrice' v-if="item.orderList[0].activity_type !== 2">{{item.total_num || 0}}件商品总金额 <view class='totalPrice' v-if="item.orderList[0].activity_type !== 2">
{{item.total_num || 0}}件商品总金额
<text class='money p-color'>{{item.pay_price}}</text> <text class='money p-color'>{{item.pay_price}}</text>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<view class='bnt b-color' @click.stop='goPay(item.pay_price,item.group_order_id)'>立即付款</view> <view class='bnt b-color' @click.stop='goPay(item.pay_price,item.group_order_id)'>
立即付款</view>
</view> </view>
</view> </view>
</view> </view>
@ -139,32 +160,46 @@
<view class="store-name">{{item.merchant.mer_name}}</view> <view class="store-name">{{item.merchant.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </view>
<view v-if="item.status == 0" class='t-color'>
<text v-if="item.order_type==1">{{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}</text> <view v-if="item.order_status ==7" class='t-color'>
<text v-else>待发货</text> <text
v-if="item.order_type==1">{{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}</text>
<!-- <text v-else>待发货</text> -->
</view> </view>
<view v-if="item.status == 1" class='t-color'>待收货</view> <view v-if="item.order_status == 2 && item.pay_type !=3" class='t-color'>待发货</view>
<view v-if="item.status == 2" class='t-color'>待评价</view> <view v-if="item.order_status == 1 && item.pay_type==3" class='t-color'>待付款</view>
<view v-if="item.status == 3" class='t-color'>已完成</view> <view v-if="item.order_status == 3" class='t-color'>待收货</view>
<view v-if="item.status == -1" class='t-color'>已退款</view> <view v-if="item.order_status == 4 && item.pay_type !== 8" class='t-color'>待评价</view>
<view v-if="item.order_status == 5" class='t-color'>已完成</view>
<view v-if="item.order_status == 6" class='t-color'>已退款</view>
<view v-if="item.order_status == 8 && item.pay_type == 8" class='t-color'>待结算</view>
</view> </view>
<view v-if="item.activity_type === 2"> <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"> <view class='item-info acea-row row-between row-top'
v-for="(goods,index) in item.orderProduct" :key="index">
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name '> <view class='name '>
<view class='name' :class="item.status === 0 ? 'line1' : 'line2'"> <view class='name' :class="item.status === 0 ? 'line1' : 'line2'">
<text class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text> <text
class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text>
<view v-if="item.status == 0" class="event_ship event_color">发货时间 <view v-if="item.status == 0" class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 1">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="goods.cart_info.productPresell.presell_type === 1">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
<!--定金预售--> <!--定金预售-->
<text v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
</view> </view>
<view style="margin-top: 10rpx;" class="t-color">{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}</view> <view style="margin-top: 10rpx;" class="t-color">
{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
</view>
</view> </view>
<view class='money'> <view class='money'>
<view>{{goods.cart_info.productPresellAttr.presell_price}}</view> <view>{{goods.cart_info.productPresellAttr.presell_price}}</view>
@ -174,23 +209,30 @@
</view> </view>
</view> </view>
<view v-else> <view v-else>
<view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index"> <view class='item-info acea-row row-between row-top'
v-for="(goods,index) in item.orderProduct" :key="index">
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image
:src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'>
</image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name '> <view class='name '>
<view class='name line2'> <view class='name line2'>
<text>{{goods.cart_info.product.store_name}}</text> <text>{{goods.cart_info.product.store_name}}</text>
</view> </view>
<view style="margin-top: 10rpx;" class="t-color">{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}</view> <view style="margin-top: 10rpx;" class="t-color">
{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
</view>
</view> </view>
<view class='money' v-if="item.activity_type == 3"> <view class='money' v-if="item.activity_type == 3">
<view v-if="goods.cart_info.productAssistAttr">{{goods.cart_info.productAssistAttr.assist_price}}</view> <view v-if="goods.cart_info.productAssistAttr">
{{goods.cart_info.productAssistAttr.assist_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
<view class='money' v-else-if="item.activity_type == 4"> <view class='money' v-else-if="item.activity_type == 4">
<view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view> <view v-if="goods.cart_info.activeSku">
{{goods.cart_info.activeSku.active_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
<view class='money' v-else> <view class='money' v-else>
@ -208,27 +250,35 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' @click.stop='applyInvoice(item.order_id)'>申请开票</view> <!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
</block> </block>
<block v-if="item.status == 1"> <block v-if="item.status == 1">
<view class='bnt cancelBnt' v-if="item.delivery_type == 1 || item.delivery_type == 2" @click='goOrderDetails(item.order_id)'>查看物流</view> <view class='bnt cancelBnt'
<view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view> v-if="item.delivery_type == 1 || item.delivery_type == 2"
@click='goOrderDetails(item.order_id)'>查看物流</view>
<view class='bnt b-color' @tap='confirmOrder(item,index)'>取件码</view>
</block> </block>
<block v-if="item.status == 2"> <block v-if="item.status == 2">
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> <navigator v-if="community_status == 1 && !item.community_id"
:url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id"
class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> </navigator>
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view> <view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价
</view>
</block> </block>
<block v-if="item.status == 3"> <block v-if="item.status == 3">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'
<navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">
查看详情</view>
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view>
</block> </block>
</view> </view>
@ -245,7 +295,8 @@
</view> </view>
<home></home> <home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment> <payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing> <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
</view> </view>
</template> </template>
@ -274,15 +325,23 @@
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js'; import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import payment from '@/components/payment'; import payment from '@/components/payment';
import home from '@/components/home/index.vue'; import home from '@/components/home/index.vue';
import addInvoicing from '@/components/addInvoicing'; import addInvoicing from '@/components/addInvoicing';
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
import { configMap } from '@/utils' import {
import { HTTP_REQUEST_URL } from '@/config/app'; configMap
} from '@/utils'
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
components: { components: {
payment, payment,
@ -360,17 +419,25 @@
this.getOrderData(); this.getOrderData();
this.getOrderList(); this.getOrderList();
this.getUserInfo(); this.getUserInfo();
this.getpreSellOrderList(); // this.getpreSellOrderList();
} else { } else {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
} }
}, },
onReady(){ onReady() {},
}, mounted: function() {},
mounted: function() {
},
methods: { methods: {
// 退
returns() {
uni.navigateBack()
},
//
goHome() {
uni.switchTab({
url: '/pages/index/index'
});
},
// //
goMall(item) { goMall(item) {
if (this.hide_mer_status == 0) { if (this.hide_mer_status == 0) {
@ -421,7 +488,9 @@
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
if (options.status) this.orderStatus = options.status; if (options.status) this.orderStatus = options.status;
}, },
/** /**
* 获取订单统计数据 * 获取订单统计数据
@ -429,7 +498,9 @@
*/ */
getOrderData: function() { getOrderData: function() {
let that = this; let that = this;
orderData().then(res => { orderData({
product_type: 0
}).then(res => {
that.$set(that, 'orderData', res.data); that.$set(that, 'orderData', res.data);
}) })
}, },
@ -493,7 +564,9 @@
* 去订单详情 * 去订单详情
*/ */
goOrderDetails: function(order_id) { goOrderDetails: function(order_id) {
let self = this let self = this
if (!order_id) return that.$util.Tips({ if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情' title: '缺少订单号无法查看订单详情'
}); });
@ -501,12 +574,19 @@
uni.showLoading({ uni.showLoading({
title: '正在加载', title: '正在加载',
}) })
openOrderSubscribe().then(() => { openOrderSubscribe().then(() => {
uni.hideLoading(); uni.hideLoading();
if (self.orderStatus == 0) { if (self.orderStatus == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + order_id
}) })
} else if (self.orderStatus == 1) {
uni.navigateTo({
url: `/pages/order_details/stay?order_id=${order_id}&orderStatus=${self.orderStatus}`
})
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: '/pages/order_details/index?order_id=' + order_id
@ -521,6 +601,13 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + order_id
}) })
} else if (self.orderStatus == 1) {
// uni.navigateTo({
// url: '/pages/order_details/index?order_id=' + order_id
// })
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
})
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: '/pages/order_details/index?order_id=' + order_id
@ -564,6 +651,7 @@
*/ */
statusClick: function(status) { statusClick: function(status) {
if (status == this.orderStatus) return; if (status == this.orderStatus) return;
this.orderStatus = status; this.orderStatus = status;
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
@ -586,12 +674,14 @@
groupOrderList({ groupOrderList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0
}).then(res => { }).then(res => {
that.isReady = true; that.isReady = true;
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;
// console.log(that.orderList) // console.log(that.orderList)
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList); that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList); that.$set(that, 'orderList', that.orderList);
// console.log(that.orderList) // console.log(that.orderList)
that.getProductCount(); that.getProductCount();
@ -601,14 +691,22 @@
that.page = that.page + 1 that.page = that.page + 1
}) })
} else { } else {
let arr;
if (that.orderStatus > -1) {
arr = that.orderStatus
} else {
arr = ''
}
getOrderList({ getOrderList({
status: that.orderStatus - 1, status: arr,
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList); that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList); that.$set(that, 'orderList', that.orderList);
that.getProductCount(); that.getProductCount();
that.loadend = loadend; that.loadend = loadend;
@ -676,28 +774,40 @@
}, },
// //
confirmOrder: function(item, index) { confirmOrder: function(item, index) {
let that = this;
uni.showModal({ uni.showModal({
title: '确认收货', title: '取件码',
content: '为保障权益,请收到货确认无误后,再确认收货', content: item.logistics_code,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
orderTake(item.order_id).then(res => { // console.log('');
return that.$util.Tips({ } else if (res.cancel) {
title: '操作成功', // console.log('');
icon: 'success'
}, function() {
that.orderList.splice(index, 1);
that.getOrderData();
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
} }
} }
}) })
// let that = this;
// uni.showModal({
// title: '',
// content: '',
// success: function(res) {
// if (res.confirm) {
// orderTake(item.order_id).then(res => {
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, function() {
// that.orderList.splice(index, 1);
// that.getOrderData();
// });
// }).catch(err => {
// return that.$util.Tips({
// title: err
// });
// })
// }
// }
// })
}, },
/*申请开票*/ /*申请开票*/
applyInvoice(order_id) { applyInvoice(order_id) {
@ -733,14 +843,31 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.head-menu {
height: 50rpx;
padding-left: 20rpx;
line-height: 50rpx;
font-weight: bold;
}
.my-order .header { .my-order .header {
height: 260rpx; height: 260rpx;
padding: 0 30rpx; padding: 0 30rpx;
background-color: var(--view-theme); background-color: var(--view-theme);
} }
.t-color{color: var(--view-theme);}
.p-color{color: var(--view-priceColor);} .t-color {
.b-color{background-color:var(--view-theme);} color: var(--view-theme);
}
.p-color {
color: var(--view-priceColor);
}
.b-color {
background-color: var(--view-theme);
}
.my-order .header .picTxt { .my-order .header .picTxt {
height: 190rpx; height: 190rpx;
} }
@ -859,12 +986,15 @@
width: 320rpx; width: 320rpx;
color: #282828; color: #282828;
} }
.event_bg { .event_bg {
background: #FF7F00; background: #FF7F00;
} }
.event_color { .event_color {
color: #FF7F00; color: #FF7F00;
} }
.my-order .list .item .event_name { .my-order .list .item .event_name {
display: inline-block; display: inline-block;
margin-right: 9rpx; margin-right: 9rpx;
@ -875,13 +1005,16 @@
text-align: center; text-align: center;
border-radius: 6rpx; border-radius: 6rpx;
} }
.my-order .list .item .event_ship { .my-order .list .item .event_ship {
font-size: 20rpx; font-size: 20rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
.my-order .list .event_price { .my-order .list .event_price {
margin: 0 0 50rpx 120rpx; margin: 0 0 50rpx 120rpx;
} }
.my-order .list .item .item-info .text .money { .my-order .list .item .item-info .text .money {
text-align: right; text-align: right;
} }
@ -920,14 +1053,17 @@
border: 1px solid #ddd; border: 1px solid #ddd;
color: #aaa; color: #aaa;
} }
.my-order .list .item .bottom .bnt.colorBnt { .my-order .list .item .bottom .bnt.colorBnt {
border: 1px solid var(--view-theme); border: 1px solid var(--view-theme);
color: var(--view-theme); color: var(--view-theme);
} }
.my-order .list .item .bottom .bnt .icon-fabu { .my-order .list .item .bottom .bnt .icon-fabu {
font-size: 26rpx; font-size: 26rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.my-order .list .item .bottom .bnt~.bnt { .my-order .list .item .bottom .bnt~.bnt {
margin-left: 17rpx; margin-left: 17rpx;
} }
@ -947,6 +1083,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.event_container { .event_container {
width: 690rpx; width: 690rpx;
background-image: url(../static/images/presell_orderBg.png); background-image: url(../static/images/presell_orderBg.png);
@ -955,29 +1092,36 @@
margin: 20rpx auto; margin: 20rpx auto;
padding: 26rpx 30rpx; padding: 26rpx 30rpx;
border-radius: 16rpx; border-radius: 16rpx;
.info { .info {
width: 420rpx; width: 420rpx;
.title { .title {
color: #282828; color: #282828;
font-size: 26rpx; font-size: 26rpx;
} }
.desc { .desc {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
} }
.photo { .photo {
width: 180rpx; width: 180rpx;
.picture { .picture {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 8rpx; border-radius: 8rpx;
} }
} }
.more_btn { .more_btn {
color: #fff; color: #fff;
background: #F97E3B; background: #F97E3B;
@ -988,6 +1132,7 @@
line-height: 40rpx; line-height: 40rpx;
position: relative; position: relative;
top: 40rpx; top: 40rpx;
text { text {
font-size: 20rpx; font-size: 20rpx;
} }

View File

@ -110,11 +110,13 @@
<view class="store-name">{{item.merchant.mer_name}}</view> <view class="store-name">{{item.merchant.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </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 == 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 == 3" class='t-color'>已完成</view>
<view v-if="item.status == -1" 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>
<view v-if="item.activity_type === 2"> <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"> <view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index">

View File

@ -5,50 +5,70 @@
<view class='list'> <view class='list'>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>姓名</view> <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>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>联系电话</view> <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>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>所在地区</view> <view class='name'>所在地区</view>
<view class="region"> <view class="region">
<view class="region_count" @click="changeRegion"> <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 v-else>{{addressText}}</text>
<text class="iconfont icon-xiangyou"></text>
</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>
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'>详细地址</view> <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"> <view class="location" @click="selfLocation">
<text class="iconfont icon-chakanditu"></text> <image src="@/static/images/loction.png" mode=""></image>
<br>
定位
</view> </view>
</view> </view>
</view> </view>
<view class='default acea-row row-middle'> <view class='default acea-row row-middle'>
<checkbox-group @change='ChangeIsDefault'> <checkbox-group @change='ChangeIsDefault'>
<checkbox :checked="userAddress.is_default ? true : false" />设置为默认地址</checkbox-group> <checkbox :checked="userAddress.is_default ? true : false" />设置为默认地址
</checkbox-group>
</view> </view>
<button class='keepBnt' form-type="submit">立即保存</button> <button class='keepBnt' form-type="submit">保存</button>
<!-- #ifdef MP --> <!-- #ifdef MP -->
<view class="wechatAddress" v-if="!address_id" @click="getWxAddress">导入微信地址</view> <view class="wechatAddress" v-if="!address_id" @click="getWxAddress">导入微信地址</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #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 --> <!-- #endif -->
</view> </view>
</form> </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> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>
</template> </template>
@ -63,16 +83,28 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { editAddress, getAddressDetail } from '@/api/user.js'; import {
import { getCityV2, getCityList } from '@/api/api.js'; editAddress,
import { mapGetters } from "vuex"; getAddressDetail
} from '@/api/user.js';
import {
getCityV2,
getCityList
} from '@/api/api.js';
import {
mapGetters
} from "vuex";
import areaWindow from '@/components/areaWindow'; 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'; import authorize from '@/components/Authorize';
export default { export default {
components: { components: {
areaWindow, areaWindow,
authorize, authorize,
villageTeam
}, },
data() { data() {
return { return {
@ -83,7 +115,7 @@
userAddress: { userAddress: {
is_default: false is_default: false
}, // }, //
region: ['省', '市', '区'], region: [],
valueRegion: [0, 0, 0], valueRegion: [0, 0, 0],
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
@ -92,14 +124,21 @@
multiIndex: [0, 0, 0], multiIndex: [0, 0, 0],
cityId: 0, cityId: 0,
display: false, display: false,
display_one: false,
addressInfo: [], addressInfo: [],
villageInfo: [],
list: [],
latitude: '', latitude: '',
longitude: '' longitude: ''
}; };
}, },
computed: {...mapGetters(['isLogin','viewColor']), computed: {
...mapGetters(['isLogin', 'viewColor']),
addressText() { addressText() {
return this.addressInfo.map(v => v.name).join('/'); return this.addressInfo.map(v => v.name).join('/');
},
villageText() {
return this.villageInfo.map(v => v.name).join('/');
} }
}, },
onLoad(options) { onLoad(options) {
@ -119,8 +158,16 @@
} }
}, },
methods: { methods: {
areaComplete(address) {
this.addressInfo = address
},
OnChangeAddress(address) { OnChangeAddress(address) {
this.addressInfo = address; this.addressInfo = address;
this.list = address
},
OnChangevAddress(address) {
this.villageInfo = address;
}, },
// //
getCityList: function() { getCityList: function() {
@ -130,12 +177,20 @@
}) })
}, },
changeRegion() { changeRegion() {
this.display = true; // this.display = true;
this.$refs.areaChoose.show()
},
changevillage() {
// this.display_one = true;
this.$refs.villageTeam.show()
}, },
// //
changeClose: function() { changeClose: function() {
this.display = false; this.display = false;
}, },
changevClose: function() {
this.display_one = false;
},
// //
onLoadFun: function() { onLoadFun: function() {
this.isShowAuth = false; this.isShowAuth = false;
@ -155,11 +210,14 @@
if (!this.address_id) return false; if (!this.address_id) return false;
let that = this; let that = this;
getAddressDetail(this.address_id).then(res => { 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, 'userAddress', res.data);
that.$set(that, 'region', region); // that.$set(that, 'region', region);
that.city_id = res.data.city_id 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) { success: function(res) {
uni.chooseAddress({ uni.chooseAddress({
success: function(res) { 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.addressInfo = res.data;
}) })
that.userAddress.real_name = res.userName; that.userAddress.real_name = res.userName;
@ -183,7 +242,8 @@
icon: 'none', icon: 'none',
duration: 1000 duration: 1000
}); });
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({ if (res.errMsg == 'chooseAddress:cancel') return that.$util
.Tips({
title: '取消选择' title: '取消选择'
}); });
}, },
@ -241,9 +301,13 @@
long: longitude long: longitude
}).then(res => { }).then(res => {
const data = res.data; 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.addressInfo = res.data;
self.$set(self.userAddress, 'detail', data.formatted_addresses.recommend); self.$set(self.userAddress, 'detail', data.formatted_addresses
.recommend);
uni.hideLoading(); uni.hideLoading();
}).catch(e => { }).catch(e => {
uni.hideLoading(); uni.hideLoading();
@ -291,12 +355,16 @@
if (!that.addressInfo.length) return that.$util.Tips({ if (!that.addressInfo.length) return that.$util.Tips({
title: '请选择所在地区' title: '请选择所在地区'
}); });
if (!that.villageInfo.length) return that.$util.Tips({
title: '请选择所在村队'
});
if (!value.detail) return that.$util.Tips({ if (!value.detail) return that.$util.Tips({
title: '请填写详细地址' title: '请填写详细地址'
}); });
value.address_id = that.address_id; value.address_id = that.address_id;
value.is_default = that.userAddress.is_default ? 1 : 0; value.is_default = that.userAddress.is_default ? 1 : 0;
value.area = that.addressInfo; value.area = that.addressInfo;
value.brigade = that.villageInfo[0]
uni.showLoading({ uni.showLoading({
title: '保存中', title: '保存中',
@ -323,8 +391,10 @@
that.couponId = ''; that.couponId = '';
uni.$emit('updataAddress') uni.$emit('updataAddress')
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data url: '/pages/users/order_confirm/index?cartId=' + cartId +
.address_id) + '&pinkId=' + pinkId + '&couponId=' + couponId '&addressId=' + (that.id ? that.id : res.data
.address_id) + '&pinkId=' + pinkId + '&couponId=' +
couponId
}); });
} else { } else {
// #ifdef H5 // #ifdef H5
@ -357,70 +427,114 @@
background-color: var(--view-theme) !important; background-color: var(--view-theme) !important;
color: #fff !important; color: #fff !important;
} }
.addAddress .list { .addAddress .list {
background-color: #fff; background-color: #fff;
} }
.addAddress .list .item { .addAddress .list .item {
padding: 30rpx; padding: 30rpx;
border-top: 1px solid #eee;
position: relative; position: relative;
} }
.addAddress .list .item .location { .addAddress .list .item .location {
position: absolute; position: absolute;
right: 30rpx;
top: 15rpx; right: 40rpx;
text-align: center; top: 50rpx;
font-size: 20rpx; width: 58rpx;
.iconfont{ height: 58rpx;
color: var(--view-theme);
image {
width: 100%;
height: 100%;
} }
} }
.addAddress .list .item .name { .addAddress .list .item .name {
width: 195rpx; width: 195rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.addAddress .list .item .address { .addAddress .list .item .address {
flex: 1; flex: 1;
margin-left: 20rpx; margin-left: 20rpx;
} }
.addAddress .list .item input,.region .region_count {
width: 475rpx; .addAddress .list .item input,
font-size: 30rpx; {
box-sizing: border-box; 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 { .region .region_count {
height: 42rpx; padding-left: 28rpx;
line-height: 42rpx; width: 491rpx;
.icon-xiangyou{ padding: 28rpx 21rpx;
float: right; 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 .location-input { .addAddress .list .location-input {
padding-right: 70rpx; width: 491rpx;
height: 147rpx !important;
padding: 28rpx 21rpx;
white-space: normal !important;
background: #F4F7FE;
border-radius: 21rpx 21rpx 21rpx 21rpx;
} }
.addAddress .list .item .placeholder { .addAddress .list .item .placeholder {
color: #ccc; color: #ccc;
} }
.addAddress .list .item picker { .addAddress .list .item picker {
width: 475rpx; width: 475rpx;
} }
.addAddress .list .item picker .picker { .addAddress .list .item picker .picker {
width: 410rpx; width: 410rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.addAddress .list .item picker .iconfont { .addAddress .list .item picker .iconfont {
font-size: 43rpx; font-size: 43rpx;
} }
.addAddress .default { .addAddress .default {
padding: 0 30rpx; padding: 0 30rpx;
height: 90rpx; height: 90rpx;
background-color: #fff; background-color: #fff;
margin-top: 23rpx; margin-top: 23rpx;
} }
.addAddress .default checkbox { .addAddress .default checkbox {
margin-right: 15rpx; margin-right: 15rpx;
} }
.addAddress .keepBnt { .addAddress .keepBnt {
width: 690rpx; width: 690rpx;
height: 86rpx; height: 86rpx;
@ -430,8 +544,9 @@
margin: 50rpx auto; margin: 50rpx auto;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
background-color: var(--view-theme); background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
} }
.addAddress .wechatAddress { .addAddress .wechatAddress {
width: 690rpx; width: 690rpx;
height: 86rpx; height: 86rpx;

View File

@ -7,23 +7,31 @@
<radio-group class="radio-group" @change="radioChange" v-if="addressList.length"> <radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
<view class='item' v-for="(item,index) in addressList" :key="index"> <view class='item' v-for="(item,index) in addressList" :key="index">
<view class='address' @click='goOrder(item.address_id)'> <view class='address' @click='goOrder(item.address_id)'>
<view class='consignee'>收货人{{item.real_name}}<text class='phone'>{{item.phone}}</text></view> <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>
{{item.province || ''}}{{item.city || ''}}{{item.district || ''}}{{item.street || ''}}{{item.brigade|| ''}}{{item.detail || ''}}
</view>
</view> </view>
<view class='operation acea-row row-between-wrapper'> <view class='operation acea-row row-between-wrapper'>
<!-- #ifndef MP --> <!-- #ifndef MP -->
<radio class="radio" :value="index.toString()" :checked="item.is_default ? true : false"> <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> </radio>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<radio class="radio" :value="index" :checked="item.is_default ? true : false"> <radio class="radio" :value="index" :checked="item.is_default ? true : false">
<text>为默认</text> <text>为默认</text>
</radio> </radio>
<!-- #endif --> <!-- #endif -->
<view class='acea-row row-middle'> <view class='acea-row row-middle'>
<view @click='editAddress(item.address_id)'><text class='iconfont icon-bianji'></text>编辑</view> <view @click='editAddress(item.address_id)'>编辑
<view @click='delAddress(index)'><text class='iconfont icon-shanchu'></text>删除</view> </view>
<view class="row-middle-solid">
</view>
<view @click='delAddress(index)'>删除</view>
</view> </view>
</view> </view>
</view> </view>
@ -38,7 +46,7 @@
<view>暂无地址</view> <view>暂无地址</view>
</view> </view>
<view class='footer acea-row row-between-wrapper'> <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>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
@ -59,7 +67,9 @@
const jweixin = require('@/plugin/jweixin-module/index.js') const jweixin = require('@/plugin/jweixin-module/index.js')
// #endif // #endif
import {getWechatConfig} from '@/api/public.js' import {
getWechatConfig
} from '@/api/public.js'
import { import {
getAddressList, getAddressList,
setAddressDefault, setAddressDefault,
@ -67,9 +77,13 @@
editAddress, editAddress,
postAddress postAddress
} from '@/api/user.js'; } from '@/api/user.js';
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
components: { components: {
authorize authorize
@ -165,7 +179,8 @@
}); });
}, },
fail: function(res) { fail: function(res) {
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({ if (res.errMsg == 'chooseAddress:cancel') return that.$util
.Tips({
title: '取消选择' title: '取消选择'
}); });
}, },
@ -294,7 +309,8 @@
this.pinkId = ''; this.pinkId = '';
this.couponId = ''; this.couponId = '';
uni.navigateTo({ 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.pinkId = '';
this.couponId = ''; this.couponId = '';
uni.redirectTo({ 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 pinkId + '&couponId=' + couponId
}) })
} }
@ -362,62 +379,108 @@
<style> <style>
/deep/radio .wx-radio-input.wx-radio-input-checked, /deep/radio .wx-radio-input.wx-radio-input-checked,
/deep/uni-radio .uni-radio-input.uni-radio-input-checked { /deep/uni-radio .uni-radio-input.uni-radio-input-checked {
border: 1px solid var(--view-theme)!important; /* border: 1px solid var(--view-theme) !important; */
background-color: var(--view-theme)!important; /* background-color: var(--view-theme) !important; */
} }
.address-management.fff { .address-management.fff {
background-color: #fff; background-color: #fff;
height: 100vh; height: 100vh;
} }
.address-management .line { .address-management .line {
width: 100%; width: 100%;
height: 3rpx; height: 3rpx;
} }
.address-management .line image { .address-management .line image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
.address-management .item { .address-management .item {
background-color: #fff; width: 694rpx;
padding: 0 30rpx;
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-bottom: 12rpx;
margin-top: 30rpx;
} }
.address-management .item .address { .address-management .item .address {
padding: 30rpx 0; padding: 30rpx 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
font-size: 28rpx; font-size: 23rpx;
color: #282828; font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;
} }
.is_default {
color: #3274F9;
}
.address-management .item .address .consignee { .address-management .item .address .consignee {
font-size: 28rpx; font-size: 30rpx;
font-weight: bold; font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #333333;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.address-management .item .address .consignee .phone { .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 { .address-management .item .operation {
height: 83rpx; height: 60rpx;
font-size: 28rpx; font-size: 23rpx;
color: #282828; font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;
} }
.b-color { .b-color {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
.address-management .item .operation .radio text { .address-management .item .operation .radio text {
margin-left: 13rpx; margin-left: 13rpx;
} }
.address-management .item .operation .iconfont { .address-management .item .operation .iconfont {
color: #2c2c2c; color: #2c2c2c;
font-size: 35rpx; font-size: 35rpx;
vertical-align: -2rpx; vertical-align: -2rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.address-management .item .operation .iconfont.icon-shanchu { .address-management .item .operation .iconfont.icon-shanchu {
margin-left: 40rpx; margin-left: 40rpx;
font-size: 38rpx; font-size: 38rpx;
} }
.row-middle-solid {
width: 1px;
height: 24rpx;
background: #3274F9;
margin-left: 16rpx;
margin-right: 16rpx;
margin-top: 3rpx;
}
.address-management .footer { .address-management .footer {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -429,6 +492,7 @@
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.address-management .footer .addressBnt { .address-management .footer .addressBnt {
width: 330rpx; width: 330rpx;
height: 76rpx; height: 76rpx;
@ -437,27 +501,34 @@
line-height: 76rpx; line-height: 76rpx;
font-size: 30rpx; font-size: 30rpx;
color: #fff; color: #fff;
background: linear-gradient(270deg, #6DD5FA 0%, #3274F9 100%);
} }
.address-management .footer .addressBnt.on { .address-management .footer .addressBnt.on {
width: 690rpx; width: 690rpx;
margin: 0 auto; margin: 0 auto;
} }
.address-management .footer .addressBnt .iconfont { .address-management .footer .addressBnt .iconfont {
font-size: 35rpx; font-size: 35rpx;
margin-right: 8rpx; margin-right: 8rpx;
vertical-align: -1rpx; vertical-align: -1rpx;
} }
.address-management .footer .addressBnt.wxbnt { .address-management .footer .addressBnt.wxbnt {
background-color: #fe960f; background-color: #fe960f;
} }
.noCommodity { .noCommodity {
text-align: center; text-align: center;
border-top: none; border-top: none;
margin-top: 15vh; margin-top: 15vh;
} }
.noCommodity .pictrue { .noCommodity .pictrue {
height: 305rpx; height: 305rpx;
} }
.noCommodity view { .noCommodity view {
color: #999; color: #999;
} }

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,14 @@
import { getUserInfo } from "../../api/user.js"; import {
import { LOGIN_STATUS, UID } from '../../config/cache'; getUserInfo
} from "../../api/user.js";
import {
LOGIN_STATUS,
UID
} from '../../config/cache';
import Cache from '../../utils/cache'; import Cache from '../../utils/cache';
import { USER_INFO } from '../../config/cache'; import {
USER_INFO
} from '../../config/cache';
const state = { const state = {
location: Cache.get('LOCATION_DATA', true) || {}, location: Cache.get('LOCATION_DATA', true) || {},

View File

@ -13,8 +13,8 @@
*/ */
@import '@/uni_modules/uview-ui/theme.scss'; @import '@/uni_modules/uview-ui/theme.scss';
/* 颜色变量 */ /* 颜色变量 */
$uni-theme-color: #F45846; $uni-theme-color: #f45846;
$uni-theme-bg-color: linear-gradient(180deg, #F98649 0%, #F34E45 100%); $uni-theme-bg-color: linear-gradient(180deg, #f98649 0%, #f34e45 100%);
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;
@ -24,8 +24,8 @@ $uni-color-error: #dd524d;
$uni-nothing-text: #999; //空白页文字 $uni-nothing-text: #999; //空白页文字
$theme-color:#E93323; $theme-color: #e93323;
$theme-color-opacity:rgba(233,51,35,.6); $theme-color-opacity: rgba(233, 51, 35, 0.6);
$bg-star: #f62c2c; $bg-star: #f62c2c;
$bg-end: #f96e29; $bg-end: #f96e29;
@ -70,9 +70,9 @@ $uni-spacing-col-lg: 24upx;
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */ /* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色 $uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title: 40upx; $uni-font-size-title: 40upx;
$uni-color-subtitle: #555555; // 二级标题颜色 $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle: 36upx; $uni-font-size-subtitle: 36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 30upx; $uni-font-size-paragraph: 30upx;