Commit ce352710 authored by 罗超's avatar 罗超

1

parent 6be248dc
<template> <template>
<view class="addressStyle" v-if="!isloading" :style="{ height: contentHeight + 'px'}"> <view
<view style="width: 100%;height: 50px;background: #FFF;padding: 9px 15px;" @click='show=true'> class="addressStyle"
<u-search placeholder="根据相关内容搜索" v-model="val" :show-action="false" :disabled='true' ></u-search> v-if="!isloading"
</view> :style="{ height: contentHeight + 'px' }"
>
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" :style="{height:(contentHeight-50)+'px'} "> <view
<view v-for="(item, index) in list" :key="index" class="addresbox" @click="chosenHandler(item)"> style="width: 100%; height: 50px; background: #fff; padding: 9px 15px"
<view class="addresclo"> @click="show = true"
<Text>收件人:{{ item.Name }}</Text> >
<Text>{{ item.Mobile }}</Text> <u-search
</view> placeholder="根据相关内容搜索"
<Text style="width: 100%;">收货地址:{{ item.DistrictAddress }}{{ item.Address }}</Text> v-model="msg.Name"
<view style="width: 100%;height: 2rpx;background: #f5f5f5;margin-top: 15rpx;"></view> :show-action="false"
<view class="addresclo"> @search="init"
<u-checkbox-group @change="isdefault(item)"> ></u-search>
<u-checkbox v-model="item.IsDefault == 1 ? true : false" shape="circle" :active-color="mainColor"> </view>
<Text :style="{ color: item.IsDefault == 1 ? mainColor : '#c8c9cc' }">{{ item.IsDefault == 1 ? '已设为默认' : '设为默认' }}</Text>
</u-checkbox> <scroll-view
</u-checkbox-group> :scroll-y="true"
<view style="display: flex;flex-direction: row;align-items: center;"> :enable-back-to-top="true"
<view style="display: flex;flex-direction: row;align-items: center;" @click.stop="btn_edit(item)"> :enable-flex="true"
<u-icon name="edit" color="#c8c9cc" size="40"></u-icon> :style="{ height: contentHeight - 50 + 'px' }"
<Text style="color:#c8c9cc;">编辑</Text> >
</view> <view
<view style="display: flex;flex-direction: row;align-items: center;margin: 0 30rpx" @click.stop="btn_delete(item)"> v-for="(item, index) in list"
<u-icon name="delete" color="#c8c9cc" size="40"></u-icon> :key="index"
<Text style="color:#c8c9cc;">删除</Text> class="addresbox"
</view> @click="chosenHandler(item)"
</view> >
</view> <view class="addresclo">
</view> <Text>收件人:{{ item.Name }}</Text>
<view class="bottom_btn"> <Text>{{ item.Mobile }}</Text>
<view class="bottom_btn_item" :style="{ background: mainColor }" @click="ManualAdd"> </view>
<u-icon name="add-o" color="#fff" size="30"></u-icon> <Text style="width: 100%">收货地址:{{ item.Address }}</Text>
<Text style="color:#fff;margin-left: 10rpx;">手动添加</Text> <view class="addresclo"> 备注:{{ item.Remarks }} </view>
</view> <view
<!-- TODO 自动获取 --> style="
<view class="bottom_btn_item" style="background: #5CBF39;" @click="automatic"> width: 100%;
<u-icon name="location" color="#fff" size="30"></u-icon> height: 2rpx;
<Text style="color:#fff;margin-left: 10rpx">自动获取</Text> background: #f5f5f5;
</view> margin-top: 15rpx;
</view> "
</scroll-view> ></view>
<u-popup v-model="show" <view class="addresclo">
mode="right" <view></view>
length="70%" <view style="display: flex; align-items: center">
height='100%' <view
> style="display: flex; flex-direction: row; align-items: center"
<view class="popupbox"> @click.stop="btn_edit(item)"
>
<text class="popupbox_text" style="margin-top: 15px;">收货人</text> <u-icon name="edit" color="#c8c9cc" size="40"></u-icon>
<view class="popup_item"> <Text style="color: #c8c9cc">编辑</Text>
<input class="uni-input inputM" v-model="msg.Name" /> </view>
</view> <view
<text class="popupbox_text" style="margin-top: 15px;">手机号码</text> style="
<view class="popup_item"> display: flex;
<input type="number" class="uni-input inputM" v-model="msg.Mobile" /> flex-direction: row;
</view> align-items: center;
<text class="popupbox_text" style="margin-top: 15px;">详细地址</text> margin: 0 30rpx;
<view class="popup_item"> "
<input class="uni-input inputM" v-model="msg.Address" /> @click.stop="delAddress(item.ID)"
</view> >
<u-icon name="delete" color="#c8c9cc" size="40"></u-icon>
<view class="popup_b" :style="{height:cHeight+'px'}"> <Text style="color: #c8c9cc">删除</Text>
<view class="popup_b_item" style="background: #FAF8F9;color: #000000;" @click="goreset()"> </view>
<text>重置</text> </view>
</view> </view>
<view class="popup_b_item" :style="{background:mainColor }" @click="determine()"> </view>
<text>确定</text> <view class="bottom_btn">
</view> <view
</view> class="bottom_btn_item"
</view> :style="{ background: mainColor }"
</u-popup> @click="ManualAdd"
<!-- 删除的弹框 --> >
<u-modal v-model="showModal" content="确实删除收货地址" :show-cancel-button="true" :show-title="false" @confirm="confirm"></u-modal> <u-icon name="add-o" color="#fff" size="30"></u-icon>
<u-toast ref="uToast" /> <Text style="color: #fff; margin-left: 10rpx">手动添加</Text>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> </view>
</view> </view>
</scroll-view>
<!-- 删除的弹框 -->
<u-modal
v-model="showModal"
content="确实删除收货地址"
:show-cancel-button="true"
:show-title="false"
@confirm="confirm"
></u-modal>
<u-toast ref="uToast" />
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view>
</template> </template>
<script> <script>
import auth from '../../components/auth/index.vue'; import auth from "../../components/auth/index.vue";
export default { export default {
data() { data() {
return { return {
pageTitle: '收货地址', pageTitle: "退货地址",
loading: true, loading: true,
list: [], list: [],
showAuth: false, showAuth: false,
mainColor: '', mainColor: "",
u: {}, u: {},
contentHeight: 0, contentHeight: 0,
showModal: false, showModal: false,
deleteID: 0, deleteID: 0,
val:'', show: false,
show:false, cHeight: 0,
cHeight:0, msg: {
msg: { pageIndex: 1,
Name: '', pageSize: 20,
IsDefault: 0, Name: "",
Mobile: '', },
Address:'', list: [],
}, };
source: '', },
defaultId: 0, components: {
currentAddress: {}, auth,
list: [], },
mc: '', created() {
addressmsg: { this.contentHeight = this.$utils.calcContentHeight(-40);
Id: 0, this.mainColor = this.$uiConfig.mainColor;
Name: '', this.cHeight = this.$uiConfig.is_bang ? 60 : 52;
Mobile: '', },
Province: '', mounted() {
City: '', let currentPages = getCurrentPages();
District: '', let u = "/" + currentPages[currentPages.length - 1].route;
Address: '' let pages = wx.getStorageSync("basedata")
} ? wx.getStorageSync("basedata").bar_title
}; : [];
}, pages.forEach((x) => {
components: { if (x.value == u) {
auth this.pageTitle = x.new_name ? x.new_name : x.name;
}, }
created() { });
this.contentHeight = this.$utils.calcContentHeight(-40) ; uni.setNavigationBarTitle({
this.mainColor = this.$uiConfig.mainColor; title: this.pageTitle,
this.cHeight = this.$uiConfig.is_bang ? 60 : 52; });
},
}, onLoad(option) {
mounted() { this.u = uni.getStorageSync("mall_UserInfo");
let currentPages = getCurrentPages(); if (!this.u) {
let u = '/' + currentPages[currentPages.length - 1].route; this.u = {
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : []; nickName: "未登录",
pages.forEach(x => { avatarUrl: "",
if (x.value == u) { };
this.pageTitle = x.new_name ? x.new_name : x.name; this.showAuth = true;
} } else {
}); this.init();
uni.setNavigationBarTitle({ }
title: this.pageTitle },
}); methods: {
}, chosenHandler(item) {
onLoad(option) { console.log("chosenHandler", item);
this.u = uni.getStorageSync('mall_UserInfo'); let pages = getCurrentPages();
if (!this.u) { let prevPage = pages[pages.length - 2];
this.u = { prevPage.$vm.formData.address_id = item.Id;
nickName: '未登录', prevPage.$vm.formdata.AddressId = item.Id;
avatarUrl: '' prevPage.$vm.adressInfo = item;
}; uni.navigateBack({
this.showAuth = true; delta: 1,
} else { });
this.init(); },
} reloadUserinfo() {
if (option && option.form) { this.u = uni.getStorageSync("mall_UserInfo");
(this.source = option.form), (this.defaultId = option.id); // this.showAuth = false;
} this.init();
}, },
methods: { //关闭登录窗口
chosenHandler(item) { gbAuth() {
console.log('chosenHandler', item); uni.navigateBack();
let pages = getCurrentPages(); },
let prevPage = pages[pages.length - 2]; // 修改地址
prevPage.$vm.formData.address_id = item.Id; btn_edit(item) {
prevPage.$vm.formdata.AddressId = item.Id; uni.navigateTo({
prevPage.$vm.adressInfo = item; url: "/pages/MallMange/returnModifyAddress?Id=" + item.ID,
uni.navigateBack({ });
delta: 1 },
}); // 删除地址
}, delAddress(id) {
init() { let that = this;
this.loading = false; uni.showModal({
uni.showNavigationBarLoading(); title: "提示",
content: "确认删除?",
this.request2( success: function (res) {
{ if (res.confirm) {
url: '/api/AppletUser/GetUserShippingAddressList', that.requestAdmin(
data: this.msg "/api/MallBase/DelDelivery",
}, {
res => { Id: id,
uni.hideNavigationBarLoading(); },
if (res.resultCode == 1) { (res) => {
this.isloading = false; uni.showToast({
this.list = res.data; title: "操作成功",
} duration: 2000,
} });
); that.init();
}, }
reloadUserinfo() { );
this.u = uni.getStorageSync('mall_UserInfo'); }
// this.showAuth = false; },
this.init(); });
}, },
//关闭登录窗口 ManualAdd() {
gbAuth() { //手动添加
uni.navigateBack(); uni.navigateTo({
}, url: "/pages/MallMange/returnModifyAddress",
isdefault(item) { });
//设置默认地址 },
uni.showNavigationBarLoading(); init() {
this.request2( uni.showNavigationBarLoading();
{ this.requestAdmin(
url: '/api/AppletUser/SetUserShippingAddressDefault', "/api/MallBase/GetLogisticsDeliveryPage",
data: { this.msg,
AddressId: item.Id (res) => {
} uni.hideNavigationBarLoading();
}, this.list = res.data.pageData;
}
res => { );
this.init(); },
uni.hideNavigationBarLoading(); },
}
);
},
btn_edit(item) {
uni.navigateTo({
url: '/pages/address/AddAddress?AddressId=' + item.Id
});
},
btn_delete(item) {
this.deleteID = item.Id;
this.showModal = true;
},
confirm() {
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/DelUserShippingAddress',
data: {
AddressId: this.deleteID
}
},
res => {
this.init();
uni.hideNavigationBarLoading();
}
);
},
automatic() {
// this.$refs.uToast.show({
// title: "正在开发,敬请期待!"
// });
let that = this;
if (wx.chooseAddress) {
wx.chooseAddress({
success: function(res) {
console.log(res);
let nameList = [res.provinceName, res.cityName, res.countyName];
that.addressmsg.Name = res.userName;
that.addressmsg.Mobile = res.telNumber;
that.addressmsg.Address = res.detailInfo;
that.getDestination(nameList);
},
fail: function(err) {
that.$refs.uToast.show({
title: '授权失败,请重新点击自动获取',
type: 'error'
});
}
});
} else {
that.$refs.uToast.show({
title: '当前微信版本不支持自动获取收货地址',
type: 'error'
});
}
},
getDestination(nameList) {
this.request2(
{
url: '/api/AppletUser/GetDestinationListByNames',
data: {
area: nameList
}
},
res => {
console.log('res', res);
this.addressmsg.Province = res.data[0].ID;
this.addressmsg.City = res.data[1].ID;
this.addressmsg.District = res.data[2].ID;
if (res.data.length > 0) {
this.request2(
{
url: '/api/AppletUser/SetUserShippingAddress',
data: this.addressmsg
},
res => {
uni.showToast({ title: '保存成功', icon: 'none' });
this.init();
}
);
}
}
);
},
ManualAdd() {
//手动添加
uni.navigateTo({
url: '/pages/address/AddAddress'
});
},
goreset(){//重置
this.show=false;
this.msg.Name='';
this.msg.Mobile='';
this.msg.Address='';
this.init()
},
determine(){//确认
this.show=false
this.init()
},
}
}; };
</script> </script>
<style> <style>
.addressStyle { .addressStyle {
background: #f3f4f6; background: #f3f4f6;
} }
.addressStyle .addresbox { .addressStyle .addresbox {
width: 94%; width: 94%;
margin-left: 3%; margin-left: 3%;
border-radius: 10rpx; border-radius: 10rpx;
background: #fff; background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
padding: 0 20rpx; padding: 0 20rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
.addressStyle .addresclo { .addressStyle .addresclo {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 100%; width: 100%;
padding: 20rpx 0; padding: 20rpx 0;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.addressStyle .bottom_btn { .addressStyle .bottom_btn {
width: 94%; width: 94%;
height: 90rpx; height: 90rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 30rpx 3%; margin: 30rpx 3%;
} }
.addressStyle .bottom_btn .bottom_btn_item { .addressStyle .bottom_btn .bottom_btn_item {
width: 48%; width: 48%;
height: 80rpx; height: 80rpx;
border-radius: 40rpx; border-radius: 40rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
}
.addressStyle .popupbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.addressStyle .popupbox_text {
font-size: 12px;
color: #111111;
margin-left: 5%;
}
.addressStyle .popup_item {
width: 90%;
height: 35px;
margin-left: 5%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 5px;
margin-top: 10px;
background: #f1f1f1;
}
.addressStyle .inputM {
width: 100%;
}
.addressStyle .popup_b {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
display: flex;
flex-direction: row;
align-items: center;
color: #ffffff;
}
.addressStyle .popup_b_item {
width: 50%;
height: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: center;
font-size: 14px;
padding-top: 15px;
} }
.addressStyle .popupbox{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.addressStyle .popupbox_text{
font-size: 12px;
color: #111111;
margin-left: 5%;
}
.addressStyle .popup_item{
width: 90%;
height: 35px;
margin-left: 5%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 5px;
margin-top: 10px;
background: #F1F1F1;
}
.addressStyle .inputM{
width: 100%;
}
.addressStyle .popup_b{
width: 100%;
position: absolute;
left: 0;
bottom: 0;
display: flex;
flex-direction: row;
align-items: center;
color: #FFFFFF;
}
.addressStyle .popup_b_item{
width: 50%;
height: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: center;
font-size: 14px;
padding-top: 15px;
}
</style> </style>
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
</scroll-view> </scroll-view>
</view> </view>
<!-- 加载中 --> <!-- 加载中 -->
<view class="flex-center" style="margin-top: 20rpx" v-if="loading"> <view class="flex-center loading" style="margin-top: 20rpx" v-if="loading">
<u-loading mode="flower" size="48"></u-loading> <u-loading mode="flower" size="48"></u-loading>
<text style="color: #999">加载中...</text> <text style="color: #999">加载中...</text>
</view> </view>
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
days.push(i); days.push(i);
} }
return { return {
orderType: 2, //1普通订单,2售后订单 orderType: 1, //1普通订单,2售后订单
loading: false, loading: false,
status: "loadmore", status: "loadmore",
loadText: { loadText: {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/> />
<view class="headImgBox"></view> <view class="headImgBox"></view>
<view class="nameBox" <view class="nameBox"
>饭粒汪 >{{ msg.MallName }}
<u-icon <u-icon
name="edit" name="edit"
style="margin-left: 10rpx" style="margin-left: 10rpx"
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
contentSlot contentSlot
@confirm="showBox1 = false" @confirm="showBox1 = false"
> >
<input type="text" v-model="username" class="nameInput" /> <input type="text" v-model="msg.MallName" class="nameInput" />
</u-modal> </u-modal>
</view> </view>
<view class="boxGroup"> <!-- <view class="boxGroup" style="display: none;">
<view class="boxItem"> <view class="boxItem">
<view class="leftBox flex-center"> <view class="leftBox flex-center">
<image <image
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="boxGroup"> <view class="boxGroup" style="display: none;">
<view class="boxItem"> <view class="boxItem">
<view class="leftBox flex-center"> <view class="leftBox flex-center">
<image <image
...@@ -118,7 +118,142 @@ ...@@ -118,7 +118,142 @@
<u-switch v-model="msg.business"></u-switch> <u-switch v-model="msg.business"></u-switch>
</view> </view>
</view> </view>
</view> -->
<!-- 基本设置 -->
<view class="boxGroup">
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">联系电话</view>
<input
type="number"
placeholder="联系电话"
style="text-align: right"
v-model="msg.ContactNumber"
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">外部客服链接</view>
<input
type="number"
placeholder="外部客服链接"
style="text-align: right"
v-model="msg.OuterServiceLink"
/>
</view>
</view>
<view class="colTitle">一键导航:</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">详细地址</view>
<input
type="number"
placeholder="详细地址"
style="text-align: right"
v-model="msg.Address"
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">经纬度</view>
<input
type="number"
placeholder="经纬度"
style="text-align: right"
v-model="msg.LongAndLat"
disabled
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">地图</view>
<button
size="mini"
type="primary"
style="float: right; margin: 0"
@click="map"
>
打开地图
</button>
</view>
</view>
<view class="colTitle">跳转小程序:</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">小程序APPID</view>
<input
type="number"
placeholder="小程序APPID"
style="text-align: right"
v-model="msg.MinAppId"
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox" style="border: none">
<view class="name">小程序路径</view>
<input
type="number"
placeholder="小程序路径"
style="text-align: right"
v-model="msg.MinUrl"
/>
</view>
</view>
</view> </view>
<!-- 交易设置 -->
<view class="boxGroup"> <view class="boxGroup">
<view class="boxItem"> <view class="boxItem">
<view class="leftBox flex-center"> <view class="leftBox flex-center">
...@@ -129,9 +264,9 @@ ...@@ -129,9 +264,9 @@
/> />
</view> </view>
<view class="rightBox" @click="showBox3 = true"> <view class="rightBox" @click="showBox3 = true">
<view class="name">删除未支付订单限时</view> <view class="name">未支付订单超时时间</view>
<view class="flex-center"> <view class="flex-center">
{{ msg.delOrderTime }} {{ msg.CancelTime }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon <u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view> ></view>
</view> </view>
...@@ -147,7 +282,7 @@ ...@@ -147,7 +282,7 @@
<view class="rightBox" @click="showBox4 = true"> <view class="rightBox" @click="showBox4 = true">
<view class="name">自动确认收货时间</view> <view class="name">自动确认收货时间</view>
<view class="flex-center"> <view class="flex-center">
{{ msg.incomeDay }} {{ msg.AutoReceiving }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon <u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view> ></view>
</view> </view>
...@@ -161,9 +296,9 @@ ...@@ -161,9 +296,9 @@
/> />
</view> </view>
<view class="rightBox" style="border: none" @click="showBox5 = true"> <view class="rightBox" style="border: none" @click="showBox5 = true">
<view class="name">可申请售后时间</view> <view class="name">售后时间</view>
<view class="flex-center"> <view class="flex-center">
{{ msg.afterSaleDay }} {{ msg.AfterTime }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon <u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view> ></view>
</view> </view>
...@@ -171,12 +306,12 @@ ...@@ -171,12 +306,12 @@
<u-modal <u-modal
v-model="showBox3" v-model="showBox3"
:show-cancel-button="true" :show-cancel-button="true"
title="删除未支付订单限时" title="未支付订单超时时间"
contentSlot contentSlot
@confirm="showBox3 = false" @confirm="showBox3 = false"
> >
<view class="modelBox3 flex-center"> <view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.delOrderTime" />分钟 <input type="number" class="input3" v-model="msg.CancelTime" />分钟
</view> </view>
</u-modal> </u-modal>
<u-modal <u-modal
...@@ -187,18 +322,18 @@ ...@@ -187,18 +322,18 @@
@confirm="showBox4 = false" @confirm="showBox4 = false"
> >
<view class="modelBox3 flex-center"> <view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.incomeDay" /> <input type="number" class="input3" v-model="msg.AutoReceiving" />
</view> </view>
</u-modal> </u-modal>
<u-modal <u-modal
v-model="showBox5" v-model="showBox5"
:show-cancel-button="true" :show-cancel-button="true"
title="可申请售后时间" title="售后时间"
contentSlot contentSlot
@confirm="showBox5 = false" @confirm="showBox5 = false"
> >
<view class="modelBox3 flex-center"> <view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.afterSaleDay" /> <input type="number" class="input3" v-model="msg.AfterTime" />
</view> </view>
</u-modal> </u-modal>
</view> </view>
...@@ -256,6 +391,93 @@ ...@@ -256,6 +391,93 @@
</view> </view>
</view> </view>
</u-modal> </u-modal>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/Payment.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox" style="border: none" @click="showBox10 = true">
<view class="name">商品面议联系方式</view>
<view class="flex-center">
<view class="weeek">{{ concatTypeStr }}</view>
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
</view>
<u-modal
v-model="showBox10"
:show-cancel-button="true"
title="商品面议联系方式"
contentSlot
@confirm="showBox10 = false"
>
<view class="modelBox6 flex-center">
<view
v-for="(item, index) in contactTypeArr"
:key="index"
class="flex-between modelBox6Item"
:class="item.choose ? 'modelBox6ItemActive' : ''"
@click="changeConcatType(item)"
>
<view class="flex-center">
<image
:src="item.img"
mode="aspectFit"
style="
width: 60rpx;
height: 60rpx;
border-radius: 6rpx;
margin-right: 20rpx;
"
/>
<view class="modelBox6ItemName">{{ item.name }}</view>
</view>
<u-icon
name="success"
color="#446dfc"
size="30"
v-if="item.choose"
></u-icon>
</view>
</view>
</u-modal>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shop.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">余额功能</view>
<u-switch
v-model="msg.BalanceFun"
active-value="1"
inactive-value="0"
></u-switch>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shop.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">储值卡功能</view>
<u-switch
v-model="msg.DepositFun"
active-value="1"
inactive-value="0"
></u-switch>
</view>
</view>
</view> </view>
<view class="boxGroup"> <view class="boxGroup">
<view class="boxItem"> <view class="boxItem">
...@@ -282,7 +504,11 @@ ...@@ -282,7 +504,11 @@
style="width: 100%" style="width: 100%"
/> />
</view> </view>
<view class="rightBox" style="border: none" @click=""> <view
class="rightBox"
style="border: none"
@click="jumpPage(`/pages/MallMange/address`)"
>
<view class="name">退货地址</view> <view class="name">退货地址</view>
<view class="flex-center"> <view class="flex-center">
<view class="weeek">{{ addrStr }}</view> <view class="weeek">{{ addrStr }}</view>
...@@ -411,14 +637,90 @@ export default { ...@@ -411,14 +637,90 @@ export default {
showBox7: false, showBox7: false,
showBox8: false, showBox8: false,
showBox9: false, showBox9: false,
showBox10: false,
// msg: {
// business: false,
// businessTime: 1,
// delOrderTime: 0,
// incomeDay: 1,
// afterSaleDay: 1,
// integral: 0, //积分抵扣
// IntegralRule: "", //积分使用规则
// },
msg: { msg: {
business: false, ID: "",
businessTime: 1, MallName: "饭粒汪", //商城名称
delOrderTime: 0, Indate: "", //有效期
incomeDay: 1, ContactNumber: "", //联系号码
afterSaleDay: 1, OuterServiceLink: "", //外链客服链接
integral: 0, //积分抵扣 Address: "", //详细地址
IntegralRule: "", //积分使用规则 LongAndLat: "", //经纬度
MinAppId: "", //小程序appId
MinUrl: "", //小程序路径
CancelTime: 0, //未支付订单超时时间
AutoReceiving: 0, //自动确认收货时间
AfterTime: 0, //售后时间
PayWay: "", //支付方式
DeliverWay: "", //发货方式
BalanceFun: 0, //余额功能
DepositFun: 0, //储值卡
ConsultWay: "", //商品面议联系方式
MinSwitch: 1, //添加到我的小程序开关
MinBackColor: "#000000", //背影颜色
MinBackClarity: 100, //背影透明度
MinBackCircularBead: 36, //背景框圆角
MinTips: "添加到我的小程序,购买更便捷", //提示文本内容
MinTipsColor: "#FFFFFF", //文本颜色
MinIcoColor: 1, //图标颜色
MinShareTitle: "", //转发标题
MinShareIco: "", //选择图标
BuySwitch: 0, //首页购买记录框开关
CarouselOrder: 0, //轮播订单数
ListShopCar: 0,
ListBuyCount: 1,
ListName: 1,
DetailsComment: 1,
DetailsLineationPrice: 1,
DetailsMemberPrice: 1,
DetailsVipMemberPrice: 1,
DeatilsExpress: 1,
DetailsBuyNum: 1,
DetailsSharePrice: 1,
DetailsVideo: 1,
OtherNoShare: 1,
OtherIndexMoblie: 0,
OtherManualMobile: 1,
OtherTencent: 0,
OtherMemerLevel: 0,
OtherMustAddress: 0,
OtherApplyShare: 0,
SuspendBtn: 0,
BackTopBtn: 1,
CarSuspendBtn: 0,
SellOutIcoSwitch: 1,
SellOutDefaultIco: 0,
GoodsNormalPic: "",
GoodsZoomPic: "",
SuspendStyle: 1,
UnfoldIco: 0,
PackUpIco: "",
OnlineService: 0,
OnlineServiceIco: "",
BackTopNavigation: 0,
BackTopNavigationIco: "",
OneCall: 0,
OneCallIco: "",
ServiceOutLink: 0,
ServiceOutLinkIco: "",
ShortcutNavigation: 0,
ShortcutNavigationIco: "",
TurnMini: 0,
TurnMiniIco: "",
Custom: 0,
TurnLink: "",
TurnIco: 0,
LookWeChatTimes: 0, //每月可查看微信次数
IsOpenGuide: 1, //是否开启引导页
}, },
businessTimeList: [ businessTimeList: [
{ {
...@@ -472,18 +774,21 @@ export default { ...@@ -472,18 +774,21 @@ export default {
timeArr: [], timeArr: [],
payTypeArr: [ payTypeArr: [
{ {
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "线上支付", name: "线上支付",
choose: true, choose: true,
}, },
{ {
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png", Id: 2,
name: "余额支付", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "货到付款",
choose: false, choose: false,
}, },
{ {
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png", Id: 3,
name: "货到付款", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "余额支付",
choose: false, choose: false,
}, },
], ],
...@@ -491,16 +796,19 @@ export default { ...@@ -491,16 +796,19 @@ export default {
deliveryTypeArr: [ deliveryTypeArr: [
//发货方式 //发货方式
{ {
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "快递配送", name: "快递配送",
choose: true, choose: true,
}, },
{ {
Id: 2,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "到店自提", name: "到店自提",
choose: false, choose: false,
}, },
{ {
Id: 3,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "同城配送", name: "同城配送",
choose: false, choose: false,
...@@ -508,6 +816,28 @@ export default { ...@@ -508,6 +816,28 @@ export default {
], ],
deliveryTypeStr: "快递配送", deliveryTypeStr: "快递配送",
addrStr: "退货地址", addrStr: "退货地址",
// 商品面议联系方式
contactTypeArr: [
{
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "在线客服",
choose: true,
},
{
Id: 2,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "联系电话",
choose: false,
},
{
Id: 3,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "外链客服",
choose: false,
},
],
concatTypeStr: "在线客服",
}; };
}, },
methods: { methods: {
...@@ -543,11 +873,33 @@ export default { ...@@ -543,11 +873,33 @@ export default {
}) })
.map((item) => item.name) .map((item) => item.name)
.join("、"); .join("、");
this.msg.PayWay = this.payTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.Id)
.join(",");
if (this.payTypeStr == "") { if (this.payTypeStr == "") {
this.payTypeArr[0].choose = true; this.payTypeArr[0].choose = true;
this.payTypeStr = "线上支付"; this.payTypeStr = "线上支付";
} }
}, },
//商品面议联系方式
changeConcatType(e) {
e.choose = !e.choose;
this.contactTypeStr = this.contactTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
this.msg.ConsultWay = this.contactTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.Id)
.join(",");
},
//切换发货方式 //切换发货方式
changeDeliveryType(e) { changeDeliveryType(e) {
e.choose = !e.choose; e.choose = !e.choose;
...@@ -562,11 +914,66 @@ export default { ...@@ -562,11 +914,66 @@ export default {
this.deliveryTypeStr = "快递配送"; this.deliveryTypeStr = "快递配送";
} }
}, },
save() {
this.requestAdmin(
"/api/MallBase/AddOrUpdateMallBase",
this.msg,
(res) => {
console.log(574, res);
}
);
},
map() {
let that = this;
uni.chooseLocation({
success: function (res) {
that.msg.Address = res.address;
that.msg.LongAndLat = res.latitude + "," + res.longitude;
},
});
},
//获取设置数据
getSetup() {
this.requestAdmin("/api/MallBase/GetMallBaseInfo", {}, (res) => {
this.msg = res.data;
//支付方式
this.payTypeArr.forEach((e) => {
e.choose = this.msg.PayWay.split(",").includes(e.Id.toString());
});
this.payTypeStr = this.payTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
// 商品面议联系方式
this.contactTypeArr.forEach((e) => {
e.choose = this.msg.ConsultWay.split(",").includes(e.Id.toString());
});
this.concatTypeStr = this.contactTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
//发货方式
this.deliveryTypeArr.forEach((e) => {
e.choose = this.msg.DeliverWay.split(",").includes(e.Id.toString());
});
this.deliveryTypeStr = this.deliveryTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
});
},
}, },
onLoad() { onLoad() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "商城设置", title: "商城设置",
}); });
this.getSetup();
}, },
}; };
</script> </script>
...@@ -667,9 +1074,10 @@ export default { ...@@ -667,9 +1074,10 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
} }
.weeek { .weeek {
max-width: 300rpx; max-width: 260rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow-x: auto;
overflow-y: hidden;
font-size: 28rpx; font-size: 28rpx;
color: #606266; color: #606266;
} }
...@@ -761,4 +1169,11 @@ export default { ...@@ -761,4 +1169,11 @@ export default {
padding: 20rpx; padding: 20rpx;
} }
} }
.colTitle {
line-height: 100rpx;
}
::-webkit-scrollbar {
/*隐藏滚轮*/
display: none;
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment