更新驳回审核和修改一些样式
@ -15,19 +15,18 @@ export default {
|
||||
getCurrentNo((res) => {
|
||||
this.version = res.version;
|
||||
});
|
||||
this.onAPPUpdate();
|
||||
|
||||
const hasAgreed = uni.getStorageSync("isNeedAgreementDialog");
|
||||
if (hasAgreed) {
|
||||
this.onAPPUpdate();
|
||||
}
|
||||
|
||||
// #endif
|
||||
setTimeout(() => {
|
||||
uni.hideTabBar();
|
||||
}, 500);
|
||||
},
|
||||
computed: {
|
||||
...mapState("user", ["uid", "userInfo", "socket"]),
|
||||
},
|
||||
onShow: function () {
|
||||
setTimeout(() => {
|
||||
uni.hideTabBar();
|
||||
}, 500);
|
||||
setTimeout(() => {
|
||||
if (this.userInfo && Object.keys(this.userInfo).length > 0) {
|
||||
this.connectSocket(this.userInfo);
|
||||
@ -49,6 +48,16 @@ export default {
|
||||
// @import "./uni_modules/uview-ui/index.scss";
|
||||
// @import "./uni_modules/uview-ui/theme.scss";
|
||||
/*每个页面公共css */
|
||||
@import "@/static/reset.css";
|
||||
@import "@/styles/myui.scss";
|
||||
|
||||
@import "@/static/font/iconfont.css";
|
||||
|
||||
/deep/.uni-tabbar-bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/deep/.uni-navbar {
|
||||
min-height: 110rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import http from '../utils/http';
|
||||
import http from "../utils/http";
|
||||
import config from "../config/config";
|
||||
|
||||
/**
|
||||
* 获取省市区
|
||||
@ -10,8 +11,8 @@ import http from '../utils/http';
|
||||
|
||||
export function GetAppDistrict() {
|
||||
return http({
|
||||
url: '/shop/shop-base-district/getAppDistrict',
|
||||
method: 'get',
|
||||
url: "/shop/shop-base-district/getAppDistrict",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
@ -20,13 +21,13 @@ export function GetAppDistrict() {
|
||||
* @author Seven
|
||||
* @data 2025-3-5
|
||||
* @returns { list [] }
|
||||
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/listCategory
|
||||
* @see https://mall.gpxscs.cn/api/admin/shop/shop-base-store-category/categoryTree
|
||||
*/
|
||||
|
||||
export function GetMeritoCategory() {
|
||||
return http({
|
||||
url: '/shop/shop-base-product-category/listCategory',
|
||||
method: 'get',
|
||||
url: "/shop/shop-base-product-category/listCategory",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
@ -41,8 +42,8 @@ export function GetMeritoCategory() {
|
||||
|
||||
export function GetTreeCategory() {
|
||||
return http({
|
||||
url: '/shop/shop-base-product-category/treeCategory',
|
||||
method: 'get',
|
||||
url: "/shop/shop-base-product-category/treeCategory",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
@ -64,8 +65,8 @@ export function GetBaiduSuggestion(params = {}) {
|
||||
params.isFilter = true;
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url: '/shop/merch/baidu/place/v2/suggestion',
|
||||
method: 'get',
|
||||
url: "/shop/merch/baidu/place/v2/suggestion",
|
||||
method: "get",
|
||||
params,
|
||||
})
|
||||
.then((res) => {
|
||||
@ -90,13 +91,13 @@ export function GetBaiduSuggestion(params = {}) {
|
||||
export function GetAuditStatus(params = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url: '/shop/merch/fresh/approval/status',
|
||||
method: 'post',
|
||||
url: "/shop/merch/fresh/approval/status",
|
||||
method: "post",
|
||||
data: params,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.status == 200) {
|
||||
uni.setStorageSync('approvalStatus', res.data.approval_status);
|
||||
uni.setStorageSync("approvalStatus", res.data.approval_status);
|
||||
}
|
||||
resolve(res);
|
||||
})
|
||||
@ -116,13 +117,13 @@ export function GetAuditStatus(params = {}) {
|
||||
export function GetAuditInfo(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url: '/shop/merch/detail',
|
||||
method: 'post',
|
||||
url: "/shop/merch/detail",
|
||||
method: "post",
|
||||
data: params,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.data && res.status == 200) {
|
||||
uni.setStorageSync('approvalStatus', res.data.approval_status);
|
||||
uni.setStorageSync("approvalStatus", res.data.approval_status);
|
||||
}
|
||||
resolve(res);
|
||||
})
|
||||
@ -140,8 +141,8 @@ export function GetAuditInfo(params) {
|
||||
|
||||
export function GetBankList() {
|
||||
return http({
|
||||
url: '/shop/global/banks/list',
|
||||
method: 'post',
|
||||
url: "/shop/global/banks/list",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
|
||||
@ -202,8 +203,8 @@ export function GetBankList() {
|
||||
|
||||
export function GetMerchApply(params) {
|
||||
return http({
|
||||
url: '/shop/merch/apply',
|
||||
method: 'post',
|
||||
url: "/shop/merch/apply",
|
||||
method: "post",
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
@ -218,8 +219,8 @@ export function GetMerchApply(params) {
|
||||
|
||||
export function GetRestartMerchApply(params) {
|
||||
return http({
|
||||
url: '/shop/merch/re-apply',
|
||||
method: 'post',
|
||||
url: "/shop/merch/re-apply",
|
||||
method: "post",
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
@ -229,14 +230,15 @@ export function GetRestartMerchApply(params) {
|
||||
* @author Seven
|
||||
* @data 2025-3-4
|
||||
* @returns { }
|
||||
* @see https://mall.gpxscs.cn/mobile/shop/store/biz-category/list
|
||||
* @see https://mall.gpxscs.cn/api/mobile/shop/shop-base-store-category/list
|
||||
*/
|
||||
|
||||
export function GetBizCategoryList(params) {
|
||||
return http({
|
||||
url: '/shop/store/biz-category/list',
|
||||
method: 'post',
|
||||
url: "/shop/shop-base-store-category/list",
|
||||
method: "post",
|
||||
data: params,
|
||||
baseURL: config.apiMobile,
|
||||
});
|
||||
}
|
||||
|
||||
@ -250,8 +252,8 @@ export function GetBizCategoryList(params) {
|
||||
|
||||
export function branchBankSearchApi(params) {
|
||||
return http({
|
||||
url: '/shop/lakala/tk/bank/search',
|
||||
method: 'post',
|
||||
url: "/shop/lakala/tk/bank/search",
|
||||
method: "post",
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import http from '../utils/http';
|
||||
import config from '../config/config';
|
||||
import http from "../utils/http";
|
||||
import config from "../config/config";
|
||||
|
||||
/**
|
||||
* 获取订单列表
|
||||
@ -19,8 +19,8 @@ import config from '../config/config';
|
||||
|
||||
export function GetOrderList(params) {
|
||||
return http({
|
||||
url: '/shop/userOrder/mch/order/list',
|
||||
method: 'post',
|
||||
url: "/shop/userOrder/mch/order/list",
|
||||
method: "post",
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
@ -63,3 +63,20 @@ export function GetOrderList(params) {
|
||||
// }).catch(e => reject(console.warn(e)))
|
||||
// })
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取订单个推
|
||||
* @author Seven
|
||||
* @data 2025-3-28
|
||||
* @param channel
|
||||
* @returns { cid:f9da7081a7951cff6d7f1d4e2d2f270b }
|
||||
* @see https://mall.gpxscs.cn/api/mobile/account/login/push/testcase
|
||||
*/
|
||||
|
||||
export function GetOrderPush(params) {
|
||||
return http({
|
||||
url: "/account/login/push/testcase",
|
||||
method: "post",
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import http from '../utils/http';
|
||||
import config from '../config/config';
|
||||
import http from "../utils/http";
|
||||
import config from "../config/config";
|
||||
|
||||
/**
|
||||
* 获取隐私协议
|
||||
@ -12,8 +12,8 @@ import config from '../config/config';
|
||||
|
||||
export function GetProtoco(params) {
|
||||
return http({
|
||||
url: '/account/login/protocol',
|
||||
method: 'get',
|
||||
url: "/account/login/protocol",
|
||||
method: "get",
|
||||
params,
|
||||
baseURL: config.baseApi,
|
||||
});
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
@change="changeTabbar"
|
||||
:fixed="true"
|
||||
:placeholder="false"
|
||||
activeColor="#4b71ff"
|
||||
:border="true"
|
||||
activeColor="#fe4119"
|
||||
:safeAreaInsetBottom="true"
|
||||
>
|
||||
<u-tabbar-item text="工作台" name="order">
|
||||
@ -14,7 +15,7 @@
|
||||
custom-prefix="custom-icon-gongzuotai custom-icon"
|
||||
size="22"
|
||||
slot="active-icon"
|
||||
color="#4b71ff"
|
||||
color="#fe4119"
|
||||
></u-icon>
|
||||
<u-icon
|
||||
class="u-icon"
|
||||
@ -30,7 +31,7 @@
|
||||
custom-prefix="custom-icon-xiaoxi1 custom-icon"
|
||||
size="22"
|
||||
slot="active-icon"
|
||||
color="#4b71ff"
|
||||
color="#fe4119"
|
||||
></u-icon>
|
||||
<u-icon
|
||||
class="u-icon"
|
||||
@ -46,7 +47,7 @@
|
||||
custom-prefix="custom-icon-shituzhongxin custom-icon"
|
||||
size="20"
|
||||
slot="active-icon"
|
||||
color="#4b71ff"
|
||||
color="#fe4119"
|
||||
></u-icon>
|
||||
<u-icon
|
||||
class="u-icon"
|
||||
@ -62,7 +63,7 @@
|
||||
custom-prefix="custom-icon-wode custom-icon"
|
||||
size="24"
|
||||
slot="active-icon"
|
||||
color="#4b71ff"
|
||||
color="#fe4119"
|
||||
></u-icon>
|
||||
<u-icon
|
||||
class="u-icon"
|
||||
@ -93,6 +94,13 @@ export default {
|
||||
computed: {
|
||||
...mapState("user", ["imWeidu"]),
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
uni.hideTabBar();
|
||||
}, 1);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
imWeidu: {
|
||||
handler(newValue, oldValue) {
|
||||
@ -126,9 +134,6 @@ export default {
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
console.log("asdasdasd");
|
||||
},
|
||||
methods: {
|
||||
async changeTabbar(e) {
|
||||
switch (e) {
|
||||
@ -189,4 +194,8 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.uni-tabbar-bottom {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<!-- #ifdef APP-PLUS || H5 || MP-ALIPAY || MP-TOUTIAO || MP-LARK || MP-JD || MP-360 -->
|
||||
<radio-group :name="name">
|
||||
<slot></slot>
|
||||
</radio-group>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ -->
|
||||
<tui-form-field :name="name" v-model="val">
|
||||
<slot></slot>
|
||||
</tui-form-field>
|
||||
<!-- #endif -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "tui-radio-group",
|
||||
emits: ['change', 'input', 'update:modelValue'],
|
||||
// #ifdef MP-WEIXIN
|
||||
behaviors: ['wx://form-field-group'],
|
||||
// #endif
|
||||
// #ifdef MP-BAIDU
|
||||
behaviors: ['swan://form-field'],
|
||||
// #endif
|
||||
// #ifdef MP-QQ
|
||||
behaviors: ['qq://form-field'],
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
behaviors: ['uni://form-field'],
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
options: {
|
||||
virtualHost: true
|
||||
},
|
||||
// #endif
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// #ifdef VUE3
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// #endif
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// #ifdef VUE3
|
||||
modelValue(val) {
|
||||
this.modelChange(val)
|
||||
},
|
||||
// #endif
|
||||
value(val) {
|
||||
this.modelChange(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.childrens = []
|
||||
},
|
||||
methods: {
|
||||
radioChange(e) {
|
||||
this.$emit('change', e)
|
||||
this.$emit('input', e.detail.value)
|
||||
// #ifdef VUE3
|
||||
this.$emit("update:modelValue", e.detail.value);
|
||||
// #endif
|
||||
},
|
||||
changeValue(value, target) {
|
||||
if (this.val === value) return;
|
||||
this.val = value;
|
||||
this.childrens.forEach(item => {
|
||||
if (item !== target) {
|
||||
item.val = false;
|
||||
}
|
||||
})
|
||||
let e = {
|
||||
detail: {
|
||||
value: value
|
||||
}
|
||||
}
|
||||
this.radioChange(e)
|
||||
},
|
||||
modelChange(value) {
|
||||
this.childrens.forEach(item => {
|
||||
if (item.value === value) {
|
||||
item.val = true;
|
||||
} else {
|
||||
item.val = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
222
java-mall-app-shop-admin/components/tui-radio/tui-radio.vue
Normal file
@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<view class="tui-checkbox__input" :class="{'tui-checkbox__disabled':disabled}"
|
||||
:style="{backgroundColor:getBackgroundStyle(val,isCheckMark),border:getBorderStyle(val,isCheckMark),zoom:nvue?1:scaleRatio,transform:`scale(${nvue?scaleRatio:1})`}"
|
||||
@tap.stop="radioChange">
|
||||
<view class="tui-check__mark" :style="{borderBottomColor:checkMarkColor,borderRightColor:checkMarkColor}"
|
||||
v-if="val"></view>
|
||||
<radio class="tui-radio__hidden" style="position: absolute;opacity: 0;" hidden :color="getColor" :disabled="disabled" :value="value" :checked="val"></radio>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "tui-radio",
|
||||
emits: ['change'],
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
checked: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//radio选中背景颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//radio未选中时边框颜色
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: '#ccc'
|
||||
},
|
||||
//是否只展示对号,无边框背景
|
||||
isCheckMark: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//对号颜色
|
||||
checkMarkColor: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
scaleRatio: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
// #ifndef VUE3
|
||||
beforeDestroy() {
|
||||
this.unInstall()
|
||||
},
|
||||
// #endif
|
||||
// #ifdef VUE3
|
||||
beforeUnmount() {
|
||||
this.unInstall()
|
||||
},
|
||||
// #endif
|
||||
computed:{
|
||||
getColor(){
|
||||
return this.color || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.val = this.checked;
|
||||
this.group = this.getParent()
|
||||
if (this.group) {
|
||||
this.group.childrens.push(this);
|
||||
if (this.group.value) {
|
||||
this.val = this.value === this.group.value
|
||||
}
|
||||
// #ifdef VUE3
|
||||
if (this.group.modelValue) {
|
||||
this.val = this.value === this.group.modelValue
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
this.label = this.getParent('tui-label')
|
||||
if (this.label) {
|
||||
this.label.childrens.push(this);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
checked(newVal) {
|
||||
this.val = newVal;
|
||||
},
|
||||
val(newVal) {
|
||||
if (newVal && this.group) {
|
||||
this.group.changeValue(this.value, this);
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
let nvue = false;
|
||||
// #ifdef APP-NVUE
|
||||
nvue = true;
|
||||
// #endif
|
||||
return {
|
||||
val: false,
|
||||
nvue: nvue
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getBackgroundStyle(val, isCheckMark) {
|
||||
let color = val ? this.getColor : '#fff'
|
||||
if (isCheckMark) {
|
||||
color = 'transparent'
|
||||
}
|
||||
return color;
|
||||
},
|
||||
getBorderStyle(val, isCheckMark) {
|
||||
let color = val ? this.getColor : this.borderColor;
|
||||
if (isCheckMark) {
|
||||
color = 'transparent'
|
||||
}
|
||||
return `1px solid ${color}`;
|
||||
},
|
||||
radioChange(e) {
|
||||
if (this.disabled || this.val) return;
|
||||
this.val = true;
|
||||
this.$emit('change', {
|
||||
checked: this.val,
|
||||
value: this.value
|
||||
})
|
||||
},
|
||||
getParent(name = 'tui-radio-group') {
|
||||
let parent = this.$parent;
|
||||
let parentName = parent.$options.name;
|
||||
while (parentName !== name) {
|
||||
parent = parent.$parent;
|
||||
if (!parent) return false;
|
||||
parentName = parent.$options.name;
|
||||
}
|
||||
return parent;
|
||||
},
|
||||
labelClick() {
|
||||
this.radioChange()
|
||||
},
|
||||
unInstall() {
|
||||
if (this.group) {
|
||||
this.group.childrens.forEach((item, index) => {
|
||||
if (item === this) {
|
||||
this.group.childrens.splice(index, 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tui-checkbox__input {
|
||||
position: relative;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
/* #ifdef APP-NVUE */
|
||||
border-radius: 40rpx;
|
||||
/* #endif */
|
||||
/* #ifndef APP-NVUE */
|
||||
border-radius: 50%;
|
||||
display: inline-flex;
|
||||
box-sizing: border-box;
|
||||
vertical-align: top;
|
||||
flex-shrink: 0;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
font-size: 0;
|
||||
color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.tui-check__mark {
|
||||
width: 20rpx;
|
||||
height: 40rpx;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 3px;
|
||||
border-bottom-color: #FFFFFF;
|
||||
border-right-style: solid;
|
||||
border-right-width: 3px;
|
||||
border-right-color: #FFFFFF;
|
||||
transform: rotate(45deg) scale(0.5);
|
||||
transform-origin: 54% 48%;
|
||||
/* #ifndef APP-NVUE */
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.tui-radio__hidden {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0 none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
pointer-events: none;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
width: 100wx;
|
||||
height: 100wx;
|
||||
border-width: 0;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.tui-checkbox__disabled {
|
||||
opacity: 0.6;
|
||||
}
|
||||
</style>
|
||||
388
java-mall-app-shop-admin/components/uni-nav-bar/uni-nav-bar.vue
Normal file
@ -0,0 +1,388 @@
|
||||
<template>
|
||||
<view class="uni-navbar" :class="{ 'uni-dark': dark }">
|
||||
<view
|
||||
:class="{
|
||||
'uni-navbar--fixed': fixed,
|
||||
'uni-navbar--shadow': shadow,
|
||||
'uni-navbar--border': border,
|
||||
}"
|
||||
:style="{ 'background-color': themeBgColor }"
|
||||
class="uni-navbar__content"
|
||||
>
|
||||
<status-bar v-if="statusBar" />
|
||||
<view
|
||||
:style="{
|
||||
color: themeColor,
|
||||
backgroundColor: themeBgColor,
|
||||
height: navbarHeight,
|
||||
}"
|
||||
class="uni-navbar__header"
|
||||
>
|
||||
<view
|
||||
@tap="onClickLeft"
|
||||
class="uni-navbar__header-btns uni-navbar__header-btns-left"
|
||||
:style="{ minWidth: leftIconWidth }"
|
||||
>
|
||||
<slot name="left">
|
||||
<view class="uni-navbar__content_view" v-if="leftIcon.length > 0">
|
||||
<uni-icons :color="themeColor" :type="leftIcon" size="20" />
|
||||
</view>
|
||||
<view
|
||||
:class="{ 'uni-navbar-btn-icon-left': !leftIcon.length > 0 }"
|
||||
class="uni-navbar-btn-text"
|
||||
v-if="leftText.length"
|
||||
>
|
||||
<text :style="{ color: themeColor, fontSize: '12px' }">{{
|
||||
leftText
|
||||
}}</text>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
<view class="uni-navbar__header-container" @tap="onClickTitle">
|
||||
<slot>
|
||||
<view
|
||||
class="uni-navbar__header-container-inner"
|
||||
v-if="title.length > 0"
|
||||
>
|
||||
<text
|
||||
class="uni-nav-bar-text uni-ellipsis-1"
|
||||
:style="{ color: themeColor }"
|
||||
>{{ title }}</text
|
||||
>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
<view
|
||||
@click="onClickRight"
|
||||
class="uni-navbar__header-btns uni-navbar__header-btns-right"
|
||||
:style="{ width: rightIconWidth }"
|
||||
>
|
||||
<slot name="right">
|
||||
<view v-if="rightIcon.length">
|
||||
<uni-icons :color="themeColor" :type="rightIcon" size="22" />
|
||||
</view>
|
||||
<view
|
||||
class="uni-navbar-btn-text"
|
||||
v-if="rightText.length && !rightIcon.length"
|
||||
>
|
||||
<text
|
||||
class="uni-nav-bar-right-text"
|
||||
:style="{ color: themeColor }"
|
||||
>{{ rightText }}</text
|
||||
>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-navbar__placeholder" v-if="fixed">
|
||||
<status-bar v-if="statusBar" />
|
||||
<view
|
||||
class="uni-navbar__placeholder-view"
|
||||
:style="{ height: navbarHeight }"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import statusBar from "./uni-status-bar.vue";
|
||||
const getVal = (val) => (typeof val === "number" ? val + "px" : val);
|
||||
|
||||
/**
|
||||
* NavBar 自定义导航栏
|
||||
* @description 导航栏组件,主要用于头部导航
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=52
|
||||
* @property {Boolean} dark 开启黑暗模式
|
||||
* @property {String} title 标题文字
|
||||
* @property {String} leftText 左侧按钮文本
|
||||
* @property {String} rightText 右侧按钮文本
|
||||
* @property {String} leftIcon 左侧按钮图标(图标类型参考 [Icon 图标](http://ext.dcloud.net.cn/plugin?id=28) type 属性)
|
||||
* @property {String} rightIcon 右侧按钮图标(图标类型参考 [Icon 图标](http://ext.dcloud.net.cn/plugin?id=28) type 属性)
|
||||
* @property {String} color 图标和文字颜色
|
||||
* @property {String} backgroundColor 导航栏背景颜色
|
||||
* @property {Boolean} fixed = [true|false] 是否固定顶部
|
||||
* @property {Boolean} statusBar = [true|false] 是否包含状态栏
|
||||
* @property {Boolean} shadow = [true|false] 导航栏下是否有阴影
|
||||
* @property {Boolean} stat 是否开启统计标题上报
|
||||
* @event {Function} clickLeft 左侧按钮点击时触发
|
||||
* @event {Function} clickRight 右侧按钮点击时触发
|
||||
* @event {Function} clickTitle 中间标题点击时触发
|
||||
*/
|
||||
export default {
|
||||
name: "UniNavBar",
|
||||
components: {
|
||||
statusBar,
|
||||
},
|
||||
emits: ["clickLeft", "clickRight", "clickTitle"],
|
||||
props: {
|
||||
dark: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
leftText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
rightText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
leftIcon: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
rightIcon: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
fixed: {
|
||||
type: [Boolean, String],
|
||||
default: false,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
statusBar: {
|
||||
type: [Boolean, String],
|
||||
default: false,
|
||||
},
|
||||
shadow: {
|
||||
type: [Boolean, String],
|
||||
default: false,
|
||||
},
|
||||
border: {
|
||||
type: [Boolean, String],
|
||||
default: true,
|
||||
},
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 44,
|
||||
},
|
||||
leftWidth: {
|
||||
type: [Number, String],
|
||||
default: 60,
|
||||
},
|
||||
rightWidth: {
|
||||
type: [Number, String],
|
||||
default: 60,
|
||||
},
|
||||
stat: {
|
||||
type: [Boolean, String],
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
themeBgColor() {
|
||||
if (this.dark) {
|
||||
// 默认值
|
||||
if (this.backgroundColor) {
|
||||
return this.backgroundColor;
|
||||
} else {
|
||||
return this.dark ? "#333" : "#FFF";
|
||||
}
|
||||
}
|
||||
return this.backgroundColor || "#FFF";
|
||||
},
|
||||
themeColor() {
|
||||
if (this.dark) {
|
||||
// 默认值
|
||||
if (this.color) {
|
||||
return this.color;
|
||||
} else {
|
||||
return this.dark ? "#fff" : "#333";
|
||||
}
|
||||
}
|
||||
return this.color || "#333";
|
||||
},
|
||||
navbarHeight() {
|
||||
return getVal(this.height);
|
||||
},
|
||||
leftIconWidth() {
|
||||
return getVal(this.leftWidth);
|
||||
},
|
||||
rightIconWidth() {
|
||||
return getVal(this.rightWidth);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (uni.report && this.stat && this.title !== "") {
|
||||
uni.report("title", this.title);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClickLeft() {
|
||||
this.$emit("clickLeft");
|
||||
},
|
||||
onClickRight() {
|
||||
this.$emit("clickRight");
|
||||
},
|
||||
onClickTitle() {
|
||||
this.$emit("clickTitle");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$nav-height: 44px;
|
||||
|
||||
.uni-navbar {
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-nav-bar-text {
|
||||
/* #ifdef APP-PLUS */
|
||||
font-size: 34rpx;
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
font-size: 14px;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-nav-bar-right-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uni-navbar__content {
|
||||
position: relative;
|
||||
// background-color: #fff;
|
||||
// box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.uni-navbar__content_view {
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-navbar-btn-text {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.uni-navbar__header {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
padding: 5px 10px;
|
||||
flex-direction: row;
|
||||
height: $nav-height;
|
||||
font-size: 12px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-navbar__header-btns {
|
||||
/* #ifndef APP-NVUE */
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
// width: 120rpx;
|
||||
// padding: 0 6px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-navbar__header-btns-left {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
min-width: 120rpx;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-navbar__header-btns-right {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
// width: 150rpx;
|
||||
// padding-right: 30rpx;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-navbar__header-container {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex: 1;
|
||||
padding: 0 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.uni-navbar__header-container-inner {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-navbar__placeholder-view {
|
||||
height: $nav-height;
|
||||
}
|
||||
|
||||
.uni-navbar--fixed {
|
||||
position: fixed;
|
||||
z-index: 998;
|
||||
/* #ifdef H5 */
|
||||
left: var(--window-left);
|
||||
right: var(--window-right);
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-navbar--shadow {
|
||||
box-shadow: 0 1px 6px #ccc;
|
||||
}
|
||||
|
||||
.uni-navbar--border {
|
||||
border-bottom-width: 1rpx;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
|
||||
.uni-ellipsis-1 {
|
||||
overflow: hidden;
|
||||
/* #ifndef APP-NVUE */
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
lines: 1;
|
||||
text-overflow: ellipsis;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
// 暗主题配置
|
||||
.uni-dark {
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<view :style="{ height: statusBarHeight }" class="uni-status-bar">
|
||||
<slot />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'UniStatusBar',
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 20
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let h = uni.getSystemInfoSync().statusBarHeight;
|
||||
|
||||
if (h >= 7) {
|
||||
this.statusBarHeight = (h-2) + 'px'
|
||||
} else {
|
||||
this.statusBarHeight = h + 'px'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
.uni-status-bar {
|
||||
// width: 750rpx;
|
||||
height: 20px;
|
||||
// height: var(--status-bar-height);
|
||||
}
|
||||
</style>
|
||||
@ -1,14 +1,14 @@
|
||||
// #ifdef APP-PLUS
|
||||
import componentConfig from '@/config/componentConfig';
|
||||
import componentConfig from "@/config/componentConfig";
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
// 主颜色
|
||||
const $mainColor = componentConfig.appUpdateColor
|
||||
? componentConfig.appUpdateColor
|
||||
: 'FF5B78';
|
||||
: "FF5B78";
|
||||
// 弹窗图标url
|
||||
const $iconUrl = componentConfig.appUpdateIcon
|
||||
? componentConfig.appUpdateIcon
|
||||
: '@/static/ic_ar.png';
|
||||
: "@/static/ic_ar.png";
|
||||
|
||||
// 获取当前应用的版本号
|
||||
export const getCurrentNo = function (callback) {
|
||||
@ -25,12 +25,12 @@ export const getCurrentNo = function (callback) {
|
||||
const getDownload = function (data) {
|
||||
console.log(data.downloadUrl);
|
||||
let dtask;
|
||||
if (data.updateType == 'forcibly' || data.updateType == 'solicit') {
|
||||
if (data.updateType == "forcibly" || data.updateType == "solicit") {
|
||||
let popupData = {
|
||||
progress: true,
|
||||
buttonNum: 2,
|
||||
};
|
||||
if (data.updateType == 'forcibly') {
|
||||
if (data.updateType == "forcibly") {
|
||||
popupData.buttonNum = 0;
|
||||
}
|
||||
let lastProgressValue = 0;
|
||||
@ -38,34 +38,36 @@ const getDownload = function (data) {
|
||||
dtask = plus.downloader.createDownload(
|
||||
data.downloadUrl,
|
||||
{
|
||||
filename: '_doc/update/',
|
||||
filename: "_doc/update/",
|
||||
},
|
||||
function (download, status) {
|
||||
if (status == 200) {
|
||||
popupObj.change({
|
||||
progressValue: 100,
|
||||
progressTip: '正在安装文件...',
|
||||
progressTip: "正在安装文件...",
|
||||
progress: true,
|
||||
buttonNum: 0,
|
||||
});
|
||||
plus.runtime.install(
|
||||
download.filename,
|
||||
{},
|
||||
{
|
||||
force: true,
|
||||
},
|
||||
function () {
|
||||
popupObj.change({
|
||||
contentText: '应用资源更新完成!',
|
||||
contentText: "应用资源更新完成!",
|
||||
buttonNum: 1,
|
||||
progress: false,
|
||||
});
|
||||
},
|
||||
function (e) {
|
||||
popupObj.cancel();
|
||||
plus.nativeUI.alert('安装文件失败[' + e.code + ']:' + e.message);
|
||||
plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
popupObj.change({
|
||||
contentText: '文件下载失败...',
|
||||
contentText: "文件下载失败...",
|
||||
buttonNum: 1,
|
||||
progress: false,
|
||||
});
|
||||
@ -73,19 +75,19 @@ const getDownload = function (data) {
|
||||
}
|
||||
);
|
||||
dtask.start();
|
||||
dtask.addEventListener('statechanged', function (task, status) {
|
||||
dtask.addEventListener("statechanged", function (task, status) {
|
||||
switch (task.state) {
|
||||
case 1: // 开始
|
||||
popupObj.change({
|
||||
progressValue: 0,
|
||||
progressTip: '准备下载...',
|
||||
progressTip: "准备下载...",
|
||||
progress: true,
|
||||
});
|
||||
break;
|
||||
case 2: // 已连接到服务器
|
||||
popupObj.change({
|
||||
progressValue: 0,
|
||||
progressTip: '开始下载...',
|
||||
progressTip: "开始下载...",
|
||||
progress: true,
|
||||
});
|
||||
break;
|
||||
@ -97,7 +99,7 @@ const getDownload = function (data) {
|
||||
lastProgressValue = progress;
|
||||
popupObj.change({
|
||||
progressValue: progress,
|
||||
progressTip: '已下载' + progress + '%',
|
||||
progressTip: "已下载" + progress + "%",
|
||||
progress: true,
|
||||
});
|
||||
}
|
||||
@ -108,34 +110,36 @@ const getDownload = function (data) {
|
||||
popupObj.cancelDownload = function () {
|
||||
dtask && dtask.abort();
|
||||
uni.showToast({
|
||||
title: '已取消下载',
|
||||
icon: 'none',
|
||||
title: "已取消下载",
|
||||
icon: "none",
|
||||
});
|
||||
};
|
||||
// 重启APP
|
||||
popupObj.reboot = function () {
|
||||
plus.runtime.restart();
|
||||
};
|
||||
} else if (data.updateType == 'silent') {
|
||||
} else if (data.updateType == "silent") {
|
||||
dtask = plus.downloader.createDownload(
|
||||
data.downloadUrl,
|
||||
{
|
||||
filename: '_doc/update/',
|
||||
filename: "_doc/update/",
|
||||
},
|
||||
function (download, status) {
|
||||
if (status == 200) {
|
||||
plus.runtime.install(
|
||||
download.filename,
|
||||
{},
|
||||
{
|
||||
force: true,
|
||||
},
|
||||
function () {
|
||||
console.log('应用资源更新完成');
|
||||
console.log("应用资源更新完成");
|
||||
},
|
||||
function (e) {
|
||||
plus.nativeUI.alert('安装文件失败[' + e.code + ']:' + e.message);
|
||||
plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
plus.nativeUI.alert('文件下载失败...');
|
||||
plus.nativeUI.alert("文件下载失败...");
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -144,7 +148,7 @@ const getDownload = function (data) {
|
||||
};
|
||||
// 文字换行
|
||||
function drawtext(text, maxWidth) {
|
||||
let textArr = text.split('');
|
||||
let textArr = text.split("");
|
||||
let len = textArr.length;
|
||||
// 上个节点
|
||||
let previousNode = 0;
|
||||
@ -163,7 +167,7 @@ function drawtext(text, maxWidth) {
|
||||
if (letterWidth > 0) {
|
||||
if (nodeWidth + chineseWidth + letterWidth * otherWidth > maxWidth) {
|
||||
rowText.push({
|
||||
type: 'text',
|
||||
type: "text",
|
||||
content: text.substring(previousNode, i),
|
||||
});
|
||||
previousNode = i;
|
||||
@ -176,7 +180,7 @@ function drawtext(text, maxWidth) {
|
||||
} else {
|
||||
if (nodeWidth + chineseWidth > maxWidth) {
|
||||
rowText.push({
|
||||
type: 'text',
|
||||
type: "text",
|
||||
content: text.substring(previousNode, i),
|
||||
});
|
||||
previousNode = i;
|
||||
@ -188,15 +192,15 @@ function drawtext(text, maxWidth) {
|
||||
} else {
|
||||
if (/\n/g.test(textArr[i])) {
|
||||
rowText.push({
|
||||
type: 'break',
|
||||
type: "break",
|
||||
content: text.substring(previousNode, i),
|
||||
});
|
||||
previousNode = i + 1;
|
||||
nodeWidth = 0;
|
||||
letterWidth = 0;
|
||||
} else if (textArr[i] == '\\' && textArr[i + 1] == 'n') {
|
||||
} else if (textArr[i] == "\\" && textArr[i + 1] == "n") {
|
||||
rowText.push({
|
||||
type: 'break',
|
||||
type: "break",
|
||||
content: text.substring(previousNode, i),
|
||||
});
|
||||
previousNode = i + 2;
|
||||
@ -206,7 +210,7 @@ function drawtext(text, maxWidth) {
|
||||
letterWidth += 1;
|
||||
if (nodeWidth + letterWidth * otherWidth > maxWidth) {
|
||||
rowText.push({
|
||||
type: 'text',
|
||||
type: "text",
|
||||
content: text.substring(previousNode, i + 1 - letterWidth),
|
||||
});
|
||||
previousNode = i + 1 - letterWidth;
|
||||
@ -216,7 +220,7 @@ function drawtext(text, maxWidth) {
|
||||
} else {
|
||||
if (nodeWidth + otherWidth > maxWidth) {
|
||||
rowText.push({
|
||||
type: 'text',
|
||||
type: "text",
|
||||
content: text.substring(previousNode, i),
|
||||
});
|
||||
previousNode = i;
|
||||
@ -229,7 +233,7 @@ function drawtext(text, maxWidth) {
|
||||
}
|
||||
if (previousNode < len) {
|
||||
rowText.push({
|
||||
type: 'text',
|
||||
type: "text",
|
||||
content: text.substring(previousNode, len),
|
||||
});
|
||||
}
|
||||
@ -238,13 +242,13 @@ function drawtext(text, maxWidth) {
|
||||
// 是否更新弹窗
|
||||
function updatePopup(data, callback) {
|
||||
// 弹窗遮罩层
|
||||
let maskLayer = new plus.nativeObj.View('maskLayer', {
|
||||
let maskLayer = new plus.nativeObj.View("maskLayer", {
|
||||
//先创建遮罩层
|
||||
top: '0px',
|
||||
left: '0px',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
backgroundColor: 'rgba(0,0,0,0.5)',
|
||||
top: "0px",
|
||||
left: "0px",
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
backgroundColor: "rgba(0,0,0,0.5)",
|
||||
});
|
||||
|
||||
// 以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
|
||||
@ -264,30 +268,30 @@ function updatePopup(data, callback) {
|
||||
let popupViewContentList = [
|
||||
{
|
||||
src: $iconUrl,
|
||||
id: 'logo',
|
||||
tag: 'img',
|
||||
id: "logo",
|
||||
tag: "img",
|
||||
position: {
|
||||
top: '0px',
|
||||
left: (popupViewWidth - 124) / 2 + 'px',
|
||||
width: '124px',
|
||||
height: '80px',
|
||||
top: "0px",
|
||||
left: (popupViewWidth - 124) / 2 + "px",
|
||||
width: "124px",
|
||||
height: "80px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'title',
|
||||
text: '发现新版本' + data.versionName,
|
||||
tag: "font",
|
||||
id: "title",
|
||||
text: "发现新版本" + data.versionName,
|
||||
textStyles: {
|
||||
size: '18px',
|
||||
color: '#333',
|
||||
weight: 'bold',
|
||||
whiteSpace: 'normal',
|
||||
size: "18px",
|
||||
color: "#333",
|
||||
weight: "bold",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
top: '90px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: '30px',
|
||||
top: "90px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
];
|
||||
@ -299,158 +303,158 @@ function updatePopup(data, callback) {
|
||||
contentTop += textHeight;
|
||||
}
|
||||
popupViewContentList.push({
|
||||
tag: 'font',
|
||||
id: 'content' + index + 1,
|
||||
tag: "font",
|
||||
id: "content" + index + 1,
|
||||
text: item.content,
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#666',
|
||||
lineSpacing: '50%',
|
||||
align: 'left',
|
||||
size: "14px",
|
||||
color: "#666",
|
||||
lineSpacing: "50%",
|
||||
align: "left",
|
||||
},
|
||||
position: {
|
||||
top: contentTop + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: textHeight + 'px',
|
||||
top: contentTop + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: textHeight + "px",
|
||||
},
|
||||
});
|
||||
if (item.type == 'break') {
|
||||
if (item.type == "break") {
|
||||
contentTop += 10;
|
||||
popupViewHeight += 10;
|
||||
}
|
||||
});
|
||||
|
||||
if (data.updateType == 'forcibly') {
|
||||
if (data.updateType == "forcibly") {
|
||||
popupViewContentList.push({
|
||||
tag: 'rect', //绘制底边按钮
|
||||
tag: "rect", //绘制底边按钮
|
||||
rectStyles: {
|
||||
radius: '6px',
|
||||
radius: "6px",
|
||||
color: $mainColor,
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: '30px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
popupViewContentList.push({
|
||||
tag: 'font',
|
||||
id: 'confirmText',
|
||||
text: '立即升级',
|
||||
tag: "font",
|
||||
id: "confirmText",
|
||||
text: "立即升级",
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#FFF',
|
||||
lineSpacing: '0%',
|
||||
size: "14px",
|
||||
color: "#FFF",
|
||||
lineSpacing: "0%",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: '30px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
} else {
|
||||
// 绘制底边按钮
|
||||
popupViewContentList.push({
|
||||
tag: 'rect',
|
||||
id: 'cancelBox',
|
||||
tag: "rect",
|
||||
id: "cancelBox",
|
||||
rectStyles: {
|
||||
radius: '3px',
|
||||
borderColor: '#f1f1f1',
|
||||
borderWidth: '1px',
|
||||
radius: "3px",
|
||||
borderColor: "#f1f1f1",
|
||||
borderWidth: "1px",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
popupViewContentList.push({
|
||||
tag: 'rect',
|
||||
id: 'confirmBox',
|
||||
tag: "rect",
|
||||
id: "confirmBox",
|
||||
rectStyles: {
|
||||
radius: '3px',
|
||||
radius: "3px",
|
||||
color: $mainColor,
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left:
|
||||
(viewContentWidth - viewContentPadding) / 2 +
|
||||
viewContentPadding * 2 +
|
||||
'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
"px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
popupViewContentList.push({
|
||||
tag: 'font',
|
||||
id: 'cancelText',
|
||||
text: '暂不升级',
|
||||
tag: "font",
|
||||
id: "cancelText",
|
||||
text: "暂不升级",
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#666',
|
||||
lineSpacing: '0%',
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
color: "#666",
|
||||
lineSpacing: "0%",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
popupViewContentList.push({
|
||||
tag: 'font',
|
||||
id: 'confirmText',
|
||||
text: '立即升级',
|
||||
tag: "font",
|
||||
id: "confirmText",
|
||||
text: "立即升级",
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#FFF',
|
||||
lineSpacing: '0%',
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
color: "#FFF",
|
||||
lineSpacing: "0%",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left:
|
||||
(viewContentWidth - viewContentPadding) / 2 +
|
||||
viewContentPadding * 2 +
|
||||
'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
"px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
}
|
||||
// 弹窗内容
|
||||
let popupView = new plus.nativeObj.View('popupView', {
|
||||
let popupView = new plus.nativeObj.View("popupView", {
|
||||
//创建底部图标菜单
|
||||
tag: 'rect',
|
||||
top: (screenHeight - popupViewHeight) / 2 + 'px',
|
||||
left: '15%',
|
||||
height: popupViewHeight + 'px',
|
||||
width: '70%',
|
||||
tag: "rect",
|
||||
top: (screenHeight - popupViewHeight) / 2 + "px",
|
||||
left: "15%",
|
||||
height: popupViewHeight + "px",
|
||||
width: "70%",
|
||||
});
|
||||
// 绘制白色背景
|
||||
popupView.drawRect(
|
||||
{
|
||||
color: '#FFFFFF',
|
||||
radius: '8px',
|
||||
color: "#FFFFFF",
|
||||
radius: "8px",
|
||||
},
|
||||
{
|
||||
top: '40px',
|
||||
height: popupViewHeight - 40 + 'px',
|
||||
top: "40px",
|
||||
height: popupViewHeight - 40 + "px",
|
||||
}
|
||||
);
|
||||
|
||||
popupView.draw(popupViewContentList);
|
||||
popupView.addEventListener('click', function (e) {
|
||||
popupView.addEventListener("click", function (e) {
|
||||
let maxTop = popupViewHeight - viewContentPadding;
|
||||
let maxLeft = popupViewWidth - viewContentPadding;
|
||||
let buttonWidth = (viewContentWidth - viewContentPadding) / 2;
|
||||
if (e.clientY > maxTop - 30 && e.clientY < maxTop) {
|
||||
if (data.updateType == 'forcibly') {
|
||||
if (data.updateType == "forcibly") {
|
||||
if (e.clientX > viewContentPadding && e.clientX < maxLeft) {
|
||||
// 立即升级
|
||||
maskLayer.hide();
|
||||
@ -474,9 +478,9 @@ function updatePopup(data, callback) {
|
||||
}
|
||||
}
|
||||
});
|
||||
if (data.updateType == 'solicit') {
|
||||
if (data.updateType == "solicit") {
|
||||
// 点击遮罩层
|
||||
maskLayer.addEventListener('click', function () {
|
||||
maskLayer.addEventListener("click", function () {
|
||||
//处理遮罩层点击
|
||||
maskLayer.hide();
|
||||
popupView.hide();
|
||||
@ -499,45 +503,45 @@ function downloadPopupDrawing(data) {
|
||||
const viewContentWidth = popupViewWidth - viewContentPadding * 2;
|
||||
// 弹窗容器高度
|
||||
let popupViewHeight = viewContentPadding * 3 + 60;
|
||||
let progressTip = data.progressTip || '准备下载...';
|
||||
let contentText = data.contentText || '正在为您更新,请耐心等待';
|
||||
let progressTip = data.progressTip || "准备下载...";
|
||||
let contentText = data.contentText || "正在为您更新,请耐心等待";
|
||||
let elementList = [
|
||||
{
|
||||
tag: 'rect', //背景色
|
||||
color: '#FFFFFF',
|
||||
tag: "rect", //背景色
|
||||
color: "#FFFFFF",
|
||||
rectStyles: {
|
||||
radius: '8px',
|
||||
radius: "8px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'title',
|
||||
text: '升级APP',
|
||||
tag: "font",
|
||||
id: "title",
|
||||
text: "升级APP",
|
||||
textStyles: {
|
||||
size: '16px',
|
||||
color: '#333',
|
||||
weight: 'bold',
|
||||
verticalAlign: 'middle',
|
||||
whiteSpace: 'normal',
|
||||
size: "16px",
|
||||
color: "#333",
|
||||
weight: "bold",
|
||||
verticalAlign: "middle",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
top: viewContentPadding + 'px',
|
||||
height: '30px',
|
||||
top: viewContentPadding + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'content',
|
||||
tag: "font",
|
||||
id: "content",
|
||||
text: contentText,
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#333',
|
||||
verticalAlign: 'middle',
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
color: "#333",
|
||||
verticalAlign: "middle",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
top: viewContentPadding * 2 + 30 + 'px',
|
||||
height: '20px',
|
||||
top: viewContentPadding * 2 + 30 + "px",
|
||||
height: "20px",
|
||||
},
|
||||
},
|
||||
];
|
||||
@ -546,32 +550,32 @@ function downloadPopupDrawing(data) {
|
||||
popupViewHeight += viewContentPadding + 40;
|
||||
elementList = elementList.concat([
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'progressValue',
|
||||
tag: "font",
|
||||
id: "progressValue",
|
||||
text: progressTip,
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
size: "14px",
|
||||
color: $mainColor,
|
||||
whiteSpace: 'normal',
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
top: viewContentPadding * 4 + 20 + 'px',
|
||||
height: '30px',
|
||||
top: viewContentPadding * 4 + 20 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'rect', //绘制进度条背景
|
||||
id: 'progressBg',
|
||||
tag: "rect", //绘制进度条背景
|
||||
id: "progressBg",
|
||||
rectStyles: {
|
||||
radius: '4px',
|
||||
borderColor: '#f1f1f1',
|
||||
borderWidth: '1px',
|
||||
radius: "4px",
|
||||
borderColor: "#f1f1f1",
|
||||
borderWidth: "1px",
|
||||
},
|
||||
position: {
|
||||
top: viewContentPadding * 4 + 60 + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: '8px',
|
||||
top: viewContentPadding * 4 + 60 + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: "8px",
|
||||
},
|
||||
},
|
||||
]);
|
||||
@ -580,70 +584,70 @@ function downloadPopupDrawing(data) {
|
||||
popupViewHeight += viewContentPadding + 30;
|
||||
elementList = elementList.concat([
|
||||
{
|
||||
tag: 'rect', //绘制底边按钮
|
||||
tag: "rect", //绘制底边按钮
|
||||
rectStyles: {
|
||||
radius: '3px',
|
||||
borderColor: '#f1f1f1',
|
||||
borderWidth: '1px',
|
||||
radius: "3px",
|
||||
borderColor: "#f1f1f1",
|
||||
borderWidth: "1px",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'rect', //绘制底边按钮
|
||||
tag: "rect", //绘制底边按钮
|
||||
rectStyles: {
|
||||
radius: '3px',
|
||||
radius: "3px",
|
||||
color: $mainColor,
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left:
|
||||
(viewContentWidth - viewContentPadding) / 2 +
|
||||
viewContentPadding * 2 +
|
||||
'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
"px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'cancelText',
|
||||
text: '取消下载',
|
||||
tag: "font",
|
||||
id: "cancelText",
|
||||
text: "取消下载",
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#666',
|
||||
lineSpacing: '0%',
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
color: "#666",
|
||||
lineSpacing: "0%",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'confirmText',
|
||||
text: '后台下载',
|
||||
tag: "font",
|
||||
id: "confirmText",
|
||||
text: "后台下载",
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#FFF',
|
||||
lineSpacing: '0%',
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
color: "#FFF",
|
||||
lineSpacing: "0%",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left:
|
||||
(viewContentWidth - viewContentPadding) / 2 +
|
||||
viewContentPadding * 2 +
|
||||
'px',
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + 'px',
|
||||
height: '30px',
|
||||
"px",
|
||||
width: (viewContentWidth - viewContentPadding) / 2 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
},
|
||||
]);
|
||||
@ -652,32 +656,32 @@ function downloadPopupDrawing(data) {
|
||||
popupViewHeight += viewContentPadding + 40;
|
||||
elementList = elementList.concat([
|
||||
{
|
||||
tag: 'rect', //绘制底边按钮
|
||||
tag: "rect", //绘制底边按钮
|
||||
rectStyles: {
|
||||
radius: '6px',
|
||||
radius: "6px",
|
||||
color: $mainColor,
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: '40px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: "40px",
|
||||
},
|
||||
},
|
||||
{
|
||||
tag: 'font',
|
||||
id: 'confirmText',
|
||||
text: '关闭',
|
||||
tag: "font",
|
||||
id: "confirmText",
|
||||
text: "关闭",
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
color: '#FFF',
|
||||
lineSpacing: '0%',
|
||||
size: "14px",
|
||||
color: "#FFF",
|
||||
lineSpacing: "0%",
|
||||
},
|
||||
position: {
|
||||
bottom: viewContentPadding + 'px',
|
||||
left: viewContentPadding + 'px',
|
||||
width: viewContentWidth + 'px',
|
||||
height: '40px',
|
||||
bottom: viewContentPadding + "px",
|
||||
left: viewContentPadding + "px",
|
||||
width: viewContentWidth + "px",
|
||||
height: "40px",
|
||||
},
|
||||
},
|
||||
]);
|
||||
@ -694,24 +698,24 @@ function downloadPopupDrawing(data) {
|
||||
// 文件下载的弹窗
|
||||
function downloadPopup(data) {
|
||||
// 弹窗遮罩层
|
||||
let maskLayer = new plus.nativeObj.View('maskLayer', {
|
||||
let maskLayer = new plus.nativeObj.View("maskLayer", {
|
||||
//先创建遮罩层
|
||||
top: '0px',
|
||||
left: '0px',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
backgroundColor: 'rgba(0,0,0,0.5)',
|
||||
top: "0px",
|
||||
left: "0px",
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
backgroundColor: "rgba(0,0,0,0.5)",
|
||||
});
|
||||
let popupViewData = downloadPopupDrawing(data);
|
||||
// 弹窗内容
|
||||
let popupView = new plus.nativeObj.View('popupView', {
|
||||
let popupView = new plus.nativeObj.View("popupView", {
|
||||
//创建底部图标菜单
|
||||
tag: 'rect',
|
||||
tag: "rect",
|
||||
top:
|
||||
(popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 + 'px',
|
||||
left: '15%',
|
||||
height: popupViewData.popupViewHeight + 'px',
|
||||
width: '70%',
|
||||
(popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 + "px",
|
||||
left: "15%",
|
||||
height: popupViewData.popupViewHeight + "px",
|
||||
width: "70%",
|
||||
});
|
||||
let progressValue = 0;
|
||||
let progressTip = 0;
|
||||
@ -728,52 +732,52 @@ function downloadPopup(data) {
|
||||
progressValue = res.progressValue;
|
||||
// 绘制进度条
|
||||
progressElement.push({
|
||||
tag: 'rect', //绘制进度条背景
|
||||
id: 'progressValueBg',
|
||||
tag: "rect", //绘制进度条背景
|
||||
id: "progressValueBg",
|
||||
rectStyles: {
|
||||
radius: '4px',
|
||||
radius: "4px",
|
||||
color: $mainColor,
|
||||
},
|
||||
position: {
|
||||
top: popupViewData.viewContentPadding * 4 + 60 + 'px',
|
||||
left: popupViewData.viewContentPadding + 'px',
|
||||
top: popupViewData.viewContentPadding * 4 + 60 + "px",
|
||||
left: popupViewData.viewContentPadding + "px",
|
||||
width:
|
||||
popupViewData.viewContentWidth * (res.progressValue / 100) + 'px',
|
||||
height: '8px',
|
||||
popupViewData.viewContentWidth * (res.progressValue / 100) + "px",
|
||||
height: "8px",
|
||||
},
|
||||
});
|
||||
}
|
||||
if (res.progressTip) {
|
||||
progressTip = res.progressTip;
|
||||
progressElement.push({
|
||||
tag: 'font',
|
||||
id: 'progressValue',
|
||||
tag: "font",
|
||||
id: "progressValue",
|
||||
text: res.progressTip,
|
||||
textStyles: {
|
||||
size: '14px',
|
||||
size: "14px",
|
||||
color: $mainColor,
|
||||
whiteSpace: 'normal',
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
top: popupViewData.viewContentPadding * 4 + 20 + 'px',
|
||||
height: '30px',
|
||||
top: popupViewData.viewContentPadding * 4 + 20 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
}
|
||||
if (res.contentText) {
|
||||
contentText = res.contentText;
|
||||
progressElement.push({
|
||||
tag: 'font',
|
||||
id: 'content',
|
||||
tag: "font",
|
||||
id: "content",
|
||||
text: res.contentText,
|
||||
textStyles: {
|
||||
size: '16px',
|
||||
color: '#333',
|
||||
whiteSpace: 'normal',
|
||||
size: "16px",
|
||||
color: "#333",
|
||||
whiteSpace: "normal",
|
||||
},
|
||||
position: {
|
||||
top: popupViewData.viewContentPadding * 2 + 30 + 'px',
|
||||
height: '30px',
|
||||
top: popupViewData.viewContentPadding * 2 + 30 + "px",
|
||||
height: "30px",
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -804,13 +808,13 @@ function downloadPopup(data) {
|
||||
});
|
||||
progressElement = newElement.concat(progressElement);
|
||||
popupView.setStyle({
|
||||
tag: 'rect',
|
||||
tag: "rect",
|
||||
top:
|
||||
(popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 +
|
||||
'px',
|
||||
left: '15%',
|
||||
height: popupViewData.popupViewHeight + 'px',
|
||||
width: '70%',
|
||||
"px",
|
||||
left: "15%",
|
||||
height: popupViewData.popupViewHeight + "px",
|
||||
width: "70%",
|
||||
});
|
||||
popupView.draw(progressElement);
|
||||
} else {
|
||||
@ -822,7 +826,7 @@ function downloadPopup(data) {
|
||||
popupView.hide();
|
||||
},
|
||||
};
|
||||
popupView.addEventListener('click', function (e) {
|
||||
popupView.addEventListener("click", function (e) {
|
||||
let maxTop =
|
||||
popupViewData.popupViewHeight - popupViewData.viewContentPadding;
|
||||
let maxLeft =
|
||||
@ -868,25 +872,30 @@ export default function (isPrompt = false) {
|
||||
componentConfig.getServerNo(versionInfo, isPrompt, (res) => {
|
||||
if (res) {
|
||||
res.versionInfo = res.description;
|
||||
|
||||
if (res.version_name > versionInfo.versionName) {
|
||||
res.versionName = res.version_name;
|
||||
res.downloadUrl = res.download_apk_url;
|
||||
|
||||
if (res.updateType == "forcibly" || res.updateType == "silent") {
|
||||
getDownload(res);
|
||||
} else if (res.updateType == "solicit") {
|
||||
updatePopup(res, function () {
|
||||
getDownload(res);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (res.version_key > versionInfo.versionCode) {
|
||||
res.versionName = res.version_key;
|
||||
res.downloadUrl = res.download_wgt_url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (res) {
|
||||
if (res.updateType == 'forcibly' || res.updateType == 'silent') {
|
||||
getDownload(res);
|
||||
} else if (res.updateType == 'solicit') {
|
||||
updatePopup(res, function () {
|
||||
getDownload(res);
|
||||
});
|
||||
if (res.updateType == "forcibly" || res.updateType == "silent") {
|
||||
getDownload(res);
|
||||
} else if (res.updateType == "solicit") {
|
||||
updatePopup(res, function () {
|
||||
getDownload(res);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,29 +1,24 @@
|
||||
import App from './App'
|
||||
import Vue from 'vue'
|
||||
import store from './store'
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
import './uni.promisify.adaptor'
|
||||
import tui from './utils/httpRequest'
|
||||
import Socket from './utils/socket.js'
|
||||
import "@/static/reset.css"
|
||||
import "@/styles/myui.scss"
|
||||
import App from "./App";
|
||||
import Vue from "vue";
|
||||
import store from "./store";
|
||||
import uView from "@/uni_modules/uview-ui";
|
||||
import "./uni.promisify.adaptor";
|
||||
import tui from "./utils/httpRequest";
|
||||
import Socket from "./utils/socket.js";
|
||||
// import Utils from './utils/http'
|
||||
// import "@/static/font/iconfont.css"
|
||||
|
||||
Vue.use(uView)
|
||||
Vue.use(uView);
|
||||
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.config.productionTip = false;
|
||||
// Vue.prototype.$utils = Utils
|
||||
Vue.prototype.tui = tui
|
||||
Vue.prototype.$Socket = Socket;
|
||||
Vue.prototype.tui = tui;
|
||||
Vue.prototype.$Socket = Socket;
|
||||
|
||||
|
||||
App.mpType = 'app'
|
||||
App.mpType = "app";
|
||||
const app = new Vue({
|
||||
store,
|
||||
...App
|
||||
})
|
||||
|
||||
app.$mount()
|
||||
...App,
|
||||
});
|
||||
|
||||
app.$mount();
|
||||
|
||||
@ -1,150 +1,152 @@
|
||||
{
|
||||
"name": "小发同城商家版",
|
||||
"appid": "__UNI__95F809F",
|
||||
"package": "com.xiaofa.shopAdmin",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": 100,
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"Maps": {},
|
||||
"Camera": {},
|
||||
"Record": {},
|
||||
"VideoPlayer": {},
|
||||
"UIWebview": {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"privacyDescription": {
|
||||
"NSPhotoLibraryAddUsageDescription": "此App会在上传头像图片服务中访问您的相机权限",
|
||||
"NSPhotoLibraryUsageDescription": "此App会在上传头像图片服务中访问您的相机权限",
|
||||
"NSCameraUsageDescription": "此App会在上传头像图片服务中访问您的相机权限",
|
||||
"NSMicrophoneUsageDescription": "此APP会在使用声音识别服务中使用您的麦克风权限",
|
||||
"NSLocationWhenInUseUsageDescription": "此App会在使用导航服务中使用您的定位权限",
|
||||
"NSLocationAlwaysUsageDescription": "此App会在使用导航服务中使用您的定位权限",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription": "此App会在使用导航服务中使用您的定位权限"
|
||||
"name" : "小发同城商家版",
|
||||
"appid" : "__UNI__95F809F",
|
||||
"package" : "com.xiaofa.shopAdmin",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 102,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"maps": {}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Maps" : {},
|
||||
"Camera" : {},
|
||||
"Record" : {},
|
||||
"VideoPlayer" : {},
|
||||
"UIWebview" : {}
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryAddUsageDescription" : "此App会在上传头像图片服务中访问您的相机权限",
|
||||
"NSPhotoLibraryUsageDescription" : "此App会在上传头像图片服务中访问您的相机权限",
|
||||
"NSCameraUsageDescription" : "此App会在上传头像图片服务中访问您的相机权限",
|
||||
"NSMicrophoneUsageDescription" : "此APP会在使用声音识别服务中使用您的麦克风权限",
|
||||
"NSLocationWhenInUseUsageDescription" : "此App会在使用导航服务中使用您的定位权限",
|
||||
"NSLocationAlwaysUsageDescription" : "此App会在使用导航服务中使用您的定位权限",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription" : "此App会在使用导航服务中使用您的定位权限"
|
||||
},
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"maps" : {},
|
||||
"push" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"usingComponents": true
|
||||
},
|
||||
"h5": {
|
||||
// "devServer" : {
|
||||
// "https" : true,
|
||||
// "host" : "127.0.0.1",
|
||||
// "port" : 8080,
|
||||
// "disableHostCheck" : true,
|
||||
// "proxy" : {
|
||||
// "/place/v2/suggestion" : {
|
||||
// "target" : "https://api.map.baidu.com",
|
||||
// "changeOrigin" : true,
|
||||
// "secure" : false
|
||||
// },
|
||||
// "/admin/shop/shop-base-product-category/list" : {
|
||||
// "target" : "https://mall.gpxscs.cn",
|
||||
// "changeOrigin" : true
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
"title": "小发商城商家中心",
|
||||
"template": "index.html",
|
||||
"router": {
|
||||
"mode": "history",
|
||||
"base": "/mchapp/"
|
||||
}
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion": "2"
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"h5" : {
|
||||
// "devServer" : {
|
||||
// "https" : true,
|
||||
// "host" : "127.0.0.1",
|
||||
// "port" : 8080,
|
||||
// "disableHostCheck" : true,
|
||||
// "proxy" : {
|
||||
// "/place/v2/suggestion" : {
|
||||
// "target" : "https://api.map.baidu.com",
|
||||
// "changeOrigin" : true,
|
||||
// "secure" : false
|
||||
// },
|
||||
// "/admin/shop/shop-base-product-category/list" : {
|
||||
// "target" : "https://mall.gpxscs.cn",
|
||||
// "changeOrigin" : true
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
"title" : "小发商城商家中心",
|
||||
"template" : "index.html",
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : "/mchapp/"
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
}
|
||||
/* 5+App特有相关 */
|
||||
|
||||
|
||||
@ -23,7 +23,10 @@
|
||||
{
|
||||
"path": "pages/audit/shop1",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"titleNView": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -194,7 +197,7 @@
|
||||
"tabBar": {
|
||||
"custom": true,
|
||||
"color": "#000",
|
||||
"selectedColor": "#4b71ff",
|
||||
"selectedColor": "#fe4119",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"iconfontSrc": "/static/font/iconfont.ttf",
|
||||
@ -205,7 +208,7 @@
|
||||
"iconfont": {
|
||||
"text": "\ue607",
|
||||
"selectedText": "\ue607",
|
||||
"selectedColor": "#4b71ff",
|
||||
"selectedColor": "#fe4119",
|
||||
"color": "#000",
|
||||
"fontSize": "20px"
|
||||
},
|
||||
@ -216,7 +219,7 @@
|
||||
"iconfont": {
|
||||
"text": "\ue66c",
|
||||
"selectedText": "\ue66c",
|
||||
"selectedColor": "#4b71ff",
|
||||
"selectedColor": "#fe4119",
|
||||
"color": "#000",
|
||||
"fontSize": "22px"
|
||||
},
|
||||
@ -227,7 +230,7 @@
|
||||
"iconfont": {
|
||||
"text": "\ue6bc",
|
||||
"selectedText": "\ue6bc",
|
||||
"selectedColor": "#4b71ff",
|
||||
"selectedColor": "#fe4119",
|
||||
"color": "#000",
|
||||
"fontSize": "20px"
|
||||
},
|
||||
@ -238,7 +241,7 @@
|
||||
"iconfont": {
|
||||
"text": "\ue64c",
|
||||
"selectedText": "\ue64c",
|
||||
"selectedColor": "#4b71ff",
|
||||
"selectedColor": "#fe4119",
|
||||
"color": "#000",
|
||||
"fontSize": "24px"
|
||||
},
|
||||
|
||||
@ -24,6 +24,13 @@
|
||||
></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<favorite-loading
|
||||
class="IM-loading"
|
||||
v-show="loading"
|
||||
:color="'#fe4119'"
|
||||
text=""
|
||||
animation="spinner15"
|
||||
></favorite-loading>
|
||||
<view class="tabs-block">
|
||||
<!-- <tui-tabs
|
||||
:tabs="tabs"
|
||||
@ -42,6 +49,10 @@
|
||||
@change="handleTab"
|
||||
></tui-tabs> -->
|
||||
<view class="IM-msg-content">
|
||||
<view class="IM-msg-node" v-if="msgList.length <= 0 && !loading">
|
||||
<view class="IM-msg-node-bg"></view>
|
||||
<view class="IM-msg-node-tips">暂无消息</view>
|
||||
</view>
|
||||
<view class="IM-msg-block">
|
||||
<scroll-view
|
||||
class="uni-swiper-list"
|
||||
@ -93,11 +104,13 @@ import { GetImConfig } from "../../api/im";
|
||||
import statusBar from "../../components/status-bar.vue";
|
||||
import { mapState } from "vuex";
|
||||
import tabbar from "@/components/tabbar/tabbar.vue";
|
||||
import favoriteLoading from "@/components/favorite-loading/favorite-loading.vue";
|
||||
export default {
|
||||
components: {
|
||||
tuiTabs,
|
||||
statusBar,
|
||||
tabbar,
|
||||
favoriteLoading,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -120,6 +133,7 @@ export default {
|
||||
},
|
||||
},
|
||||
msgList: [],
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@ -173,6 +187,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getImConfig() {
|
||||
this.loading = true;
|
||||
let res = await GetImConfig({ type: "json", uid: this.uid });
|
||||
|
||||
if (res && res.status == 200) {
|
||||
@ -195,6 +210,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
handleTab(e) {
|
||||
this.currentTab = e.index;
|
||||
@ -316,6 +332,25 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.IM-msg-node {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
margin-top: 20%;
|
||||
background: #fff;
|
||||
|
||||
.IM-msg-node-bg {
|
||||
width: 400rpx;
|
||||
height: 400rpx;
|
||||
background-image: url("../../static/no-im-msg.png");
|
||||
background-size: 100% 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.IM-msg-node-tips {
|
||||
color: #aaaaaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
.u-icon {
|
||||
flex-direction: column-reverse;
|
||||
@ -324,5 +359,10 @@ export default {
|
||||
.icon-kefu {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.IM-loading {
|
||||
margin: 60% auto;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -6,7 +6,11 @@
|
||||
{ 'disable-scroll': showVoiceMask },
|
||||
]"
|
||||
>
|
||||
<u-navbar :title="ImItemInfo.username" :autoBack="true"></u-navbar>
|
||||
<u-navbar
|
||||
:title="ImItemInfo.username"
|
||||
:autoBack="true"
|
||||
:placeholder="true"
|
||||
></u-navbar>
|
||||
<view class="tui-chat-content" id="tui-chat-content">
|
||||
<!-- <tui-loadmore
|
||||
v-if="loadding"
|
||||
@ -313,7 +317,7 @@ export default {
|
||||
});
|
||||
|
||||
// this.$apiconfig.cacheMessage(val, val.sendmethod, cacheid, tempmy);
|
||||
|
||||
this.$store.commit("user/REMOVE_IM_KEY", this.ImItemInfo.id.toString());
|
||||
// //新消息数归零
|
||||
// this.$store.commit("resetWeidu", {
|
||||
// type: this.chattype,
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
></u-subsection> -->
|
||||
<view class="title">
|
||||
<view class="">主营品类</view>
|
||||
<view class="">分割比例</view>
|
||||
</view>
|
||||
|
||||
<scroll-view
|
||||
@ -26,7 +27,7 @@
|
||||
:data-current="index"
|
||||
@tap.stop="swichNav"
|
||||
>
|
||||
<text>{{ item.category_name }}</text>
|
||||
<text>{{ item.store_category_name }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view
|
||||
@ -46,8 +47,8 @@
|
||||
:key="index"
|
||||
@click="handerTypeItem(item)"
|
||||
>
|
||||
<view class="category-name">{{ item.category_name }}</view>
|
||||
<view class="commission">分割比率({{ item.split_ratio }}%)</view>
|
||||
<view class="category-name">{{ item.store_category_name }}</view>
|
||||
<view class="commission">{{ item.split_ratio }}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="" v-if="active == 1">
|
||||
@ -137,6 +138,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
this.getBizCategoryList();
|
||||
// this.getMeritoCategory();
|
||||
},
|
||||
methods: {
|
||||
async getBizCategoryList() {
|
||||
@ -159,17 +161,17 @@ export default {
|
||||
this.active = e;
|
||||
},
|
||||
handerTypeItem(item) {
|
||||
// bizCategory 一级分类 biz_second_category 二级分类
|
||||
let group = {
|
||||
bizCategory: {
|
||||
id: this.tabbar[this.currentTab].id,
|
||||
name: this.tabbar[this.currentTab].category_name,
|
||||
id: this.tabbar[this.currentTab].store_category_id,
|
||||
name: this.tabbar[this.currentTab].store_category_name,
|
||||
},
|
||||
bizSecondCategory: {
|
||||
id: item.id,
|
||||
name: item.category_name,
|
||||
id: item.store_category_id,
|
||||
name: item.store_category_name,
|
||||
},
|
||||
};
|
||||
|
||||
uni.setStorageSync("typeItem", group);
|
||||
|
||||
uni.navigateBack();
|
||||
@ -257,8 +259,8 @@ page {
|
||||
|
||||
.tab3-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
margin-right: 20rpx;
|
||||
height: 110rpx;
|
||||
line-height: 110rpx;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
@ -310,6 +312,7 @@ page {
|
||||
font-size: 26rpx;
|
||||
color: #444;
|
||||
font-weight: 400;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
@ -386,6 +389,8 @@ page {
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
font-weight: bold;
|
||||
background: #f7f7f7;
|
||||
@ -397,7 +402,12 @@ page {
|
||||
}
|
||||
|
||||
.category-name {
|
||||
flex: 1;
|
||||
min-width: 138rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,191 +1,272 @@
|
||||
const formConfig = [
|
||||
const formConfig = [
|
||||
{
|
||||
key:'contact_name',
|
||||
label:'联系人',
|
||||
placeholder:'请输入联系人',
|
||||
key: "contact_name",
|
||||
label: "联系人",
|
||||
placeholder: "请输入联系人",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:"select",
|
||||
key:'biz_category',
|
||||
label:'经营品类',
|
||||
isReadonly:true,
|
||||
style:"pointer-events: none",
|
||||
placeholder:'请选择经营品类',
|
||||
type: "select",
|
||||
key: "biz_category",
|
||||
label: "经营品类",
|
||||
isReadonly: true,
|
||||
style: "pointer-events: none",
|
||||
placeholder: "请选择经营品类",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
key:'store_name',
|
||||
label:'门店名称',
|
||||
placeholder:'请输入门店名称',
|
||||
key: "store_name",
|
||||
label: "门店名称",
|
||||
placeholder: "请输入门店名称",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:"select",
|
||||
key:'mapAddress',
|
||||
label:'地图地址',
|
||||
isReadonly:true,
|
||||
style:"pointer-events: none",
|
||||
placeholder:'请在地图上选择门店地址',
|
||||
type: "select",
|
||||
key: "mapAddress",
|
||||
label: "地图地址",
|
||||
isReadonly: true,
|
||||
style: "pointer-events: none",
|
||||
placeholder: "请在地图上选择门店地址",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
key:'store_address',
|
||||
label:'详细地址',
|
||||
placeholder:'详细地址:如:人民大道205号2楼213',
|
||||
key: "store_address",
|
||||
label: "详细地址",
|
||||
placeholder: "详细地址:如:人民大道205号2楼213",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'storefrontImg',
|
||||
label:'门脸图',
|
||||
class:"upload-1",
|
||||
placeholder:'',
|
||||
imgUrlArr:[],
|
||||
imgWidth:270,
|
||||
imgHeight:150
|
||||
type: "upload",
|
||||
key: "front_facade_image",
|
||||
label: "门脸图",
|
||||
class: "upload-1",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 270,
|
||||
imgHeight: 150,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'surroundingsImg',
|
||||
class:"upload-2",
|
||||
label:'环境图',
|
||||
placeholder:'',
|
||||
imgUrlArr:[],
|
||||
imgWidth:270,
|
||||
imgHeight:150
|
||||
type: "upload",
|
||||
key: "environment_image",
|
||||
class: "upload-2",
|
||||
label: "环境图",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 270,
|
||||
imgHeight: 150,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
key:'license_number',
|
||||
label:'许可证编号',
|
||||
placeholder:'请输入许可证编号',
|
||||
type: "upload",
|
||||
key: "biz_license_image",
|
||||
class: "upload-3",
|
||||
label: "营业执照",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 125,
|
||||
imgHeight: 88,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
key:'biz_license_number',
|
||||
label:'营业执照编号',
|
||||
placeholder:'请输入营业执照编号',
|
||||
key: "biz_license_company",
|
||||
label: "公司名称",
|
||||
placeholder: "请输入营业执照公司名或真实的公司名",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'biz_license_company',
|
||||
label:'营业执照公司名或真实的公司名',
|
||||
placeholder:'请输入营业执照公司名或真实的公司名',
|
||||
key: "legal_person_name",
|
||||
label: "法人姓名",
|
||||
placeholder: "请输入法人姓名",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'legal_person_name',
|
||||
label:'法人姓名',
|
||||
placeholder:'请输入法人姓名',
|
||||
key: "biz_license_number",
|
||||
label: "注册号",
|
||||
placeholder: "请输入营业执照编号",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'legal_person_mobile',
|
||||
label:'法人手机号',
|
||||
placeholder:'请输入法人手机号',
|
||||
key: "legal_person_mobile",
|
||||
label: "法人手机号",
|
||||
placeholder: "请输入法人手机号",
|
||||
show: false,
|
||||
maxLength: 11,
|
||||
},
|
||||
{
|
||||
key:'legal_person_id_number',
|
||||
label:'法人身份证号码',
|
||||
placeholder:'请输入法人身份证号',
|
||||
key: "biz_license_content",
|
||||
label: "经营范围",
|
||||
placeholder: "请输入经营范围",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'biz_license_image',
|
||||
class:"upload-3",
|
||||
label:'营业执照图片',
|
||||
placeholder:'',
|
||||
imgUrlArr:[],
|
||||
imgWidth:125,
|
||||
imgHeight:88
|
||||
type: "select",
|
||||
key: "license_type",
|
||||
label: "所属行业",
|
||||
isReadonly: true,
|
||||
style: "pointer-events: none",
|
||||
placeholder: "请选择所属行业",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:"select",
|
||||
key:'license_type',
|
||||
label:'许可证类型',
|
||||
isReadonly:true,
|
||||
style:"pointer-events: none",
|
||||
placeholder:'请选择许可证类型',
|
||||
type: "upload",
|
||||
key: "license_image",
|
||||
label: "许可证图片",
|
||||
class: "upload-4",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 125,
|
||||
imgHeight: 88,
|
||||
imgUpMaxCount: 5,
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'license_number',
|
||||
label:'许可证编号',
|
||||
placeholder:'',
|
||||
key: "license_number",
|
||||
label: "许可证编号",
|
||||
placeholder: "请输入许可证编号",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'license_image',
|
||||
label:'许可证图片',
|
||||
class:"upload-4",
|
||||
placeholder:'',
|
||||
imgUrlArr:[],
|
||||
imgWidth:125,
|
||||
imgHeight:88,
|
||||
imgUpMaxCount:5
|
||||
type: "upload",
|
||||
key: "legal_person_id_images",
|
||||
label: "法人身份证正面图片",
|
||||
class: "upload-5",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 180,
|
||||
imgHeight: 110,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'legal_person_id_images',
|
||||
label:'法人身份证正面图片',
|
||||
class:"upload-5",
|
||||
placeholder:'',
|
||||
imgUrlArr:[],
|
||||
imgWidth:180,
|
||||
imgHeight:110
|
||||
type: "upload",
|
||||
key: "legal_person_id_images2",
|
||||
label: "法人身份证反面图片",
|
||||
class: "upload-6",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 180,
|
||||
imgHeight: 110,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'legal_person_id_images2',
|
||||
label:'法人身份证反面图片',
|
||||
class:"upload-6",
|
||||
placeholder:'',
|
||||
imgUrlArr:[],
|
||||
imgWidth:180,
|
||||
imgHeight:110
|
||||
key: "legal_person_id_number",
|
||||
label: "法人身份证号码",
|
||||
placeholder: "请输入法人身份证号",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type:"select",
|
||||
key:'bank_name',
|
||||
label:'开户银行',
|
||||
isReadonly:true,
|
||||
style:"pointer-events: none",
|
||||
placeholder:'请选择开户银行',
|
||||
key: "legal_person_id_addr",
|
||||
label: "法人身份证地址",
|
||||
placeholder: "请输入法人身份证地址",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'bank_branch_name',
|
||||
label:'开户银行的支行名称',
|
||||
placeholder:'请输入开户银行的支行名称',
|
||||
type: "select",
|
||||
key: "legal_person_id_period_begin",
|
||||
label: "身份证开始有效日期",
|
||||
placeholder: "请选择身份证开始有效日期",
|
||||
style: "pointer-events: none",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'account_number',
|
||||
label:'收款账户号码',
|
||||
placeholder:'请输入收款账户号码',
|
||||
type: "select",
|
||||
key: "legal_person_id_period_end",
|
||||
label: "身份证截止有效日期",
|
||||
placeholder: "请选择身份证截止有效日期",
|
||||
style: "pointer-events: none",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key:'account_holder_name',
|
||||
label:'收款账户姓名',
|
||||
placeholder:'请输入收款账户姓名',
|
||||
type: "upload",
|
||||
key: "individual_id_images",
|
||||
label: "身份证正面图片",
|
||||
class: "upload-5",
|
||||
placeholder: "请上传身份证正面图片",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 180,
|
||||
imgHeight: 110,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
key:'account_holder_name',
|
||||
label:'收款账户姓名',
|
||||
placeholder:'请输入收款账户姓名',
|
||||
type: "upload",
|
||||
key: "individual_id_images2",
|
||||
label: "身份证反面图片",
|
||||
class: "upload-5",
|
||||
placeholder: "",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 180,
|
||||
imgHeight: 110,
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
key:'individual_id_number',
|
||||
label:'身份证号码',
|
||||
placeholder:'请输入身份证号码',
|
||||
key: "individual_id_number",
|
||||
label: "身份证号码",
|
||||
placeholder: "请输入身份证号码",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'individual_id_images',
|
||||
label:'身份证正面图片',
|
||||
class:"upload-5",
|
||||
placeholder:'',
|
||||
imgUrlArr:[]
|
||||
key: "individual_id_name",
|
||||
label: "身份证姓名",
|
||||
placeholder: "请输入身份证姓名",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type:'upload',
|
||||
key:'individual_id_images2',
|
||||
label:'身份证反面图片',
|
||||
class:"upload-5",
|
||||
placeholder:'',
|
||||
imgUrlArr:[]
|
||||
key: "individual_id_addr",
|
||||
label: "身份证地址",
|
||||
placeholder: "请输入身份证地址",
|
||||
show: false,
|
||||
},
|
||||
]
|
||||
|
||||
{
|
||||
type: "select",
|
||||
key: "individual_id_period_begin",
|
||||
label: "身份证开始有效日期",
|
||||
placeholder: "请选择身份证有效日期",
|
||||
style: "pointer-events: none",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
key: "individual_id_period_end",
|
||||
label: "身份证截止有效日期",
|
||||
placeholder: "请选择身份证截止有效日期",
|
||||
style: "pointer-events: none",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
key: "bankcard_item",
|
||||
label: "银行卡正面",
|
||||
class: "bankcard_upload",
|
||||
placeholder: "请选择银行卡正面",
|
||||
imgUrlArr: [],
|
||||
imgWidth: 268,
|
||||
imgHeight: 125,
|
||||
show: true,
|
||||
uploadIconColor: "#fe4119",
|
||||
uploadText: "点击上传银行卡正面",
|
||||
},
|
||||
{
|
||||
key: "account_holder_name",
|
||||
label: "开户名称",
|
||||
placeholder: "请输入开户名称",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
key: "account_number",
|
||||
label: "银行卡号",
|
||||
placeholder: "请输入银行卡号",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
key: "bank_name",
|
||||
label: "开户银行",
|
||||
placeholder: "请选择开户银行",
|
||||
style: "pointer-events: none",
|
||||
show: false,
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
formConfig,
|
||||
}
|
||||
formConfig,
|
||||
};
|
||||
|
||||
@ -51,18 +51,18 @@
|
||||
@click="handerSetAddress(item)"
|
||||
>
|
||||
<view class="item-left-name" v-html="item.searchName"></view>
|
||||
<view class="item-left-address">{{
|
||||
item.detailedInformation
|
||||
}}</view>
|
||||
<view class="item-left-address">
|
||||
{{ item.detailedInformation }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loading-icon mode="circle" v-else-if="isLoading"
|
||||
>加载中...</u-loading-icon
|
||||
>
|
||||
<view v-if="searchAddressList.length == 0 && !isLoading"
|
||||
>暂无该地址,换取个地址</view
|
||||
>
|
||||
<u-loading-icon mode="circle" v-else-if="isLoading">
|
||||
加载中...
|
||||
</u-loading-icon>
|
||||
<view v-if="searchAddressList.length == 0 && !isLoading">
|
||||
暂无该地址,换取个地址
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="btn-content">
|
||||
<u-button class="btn-confirm" @click="handleConfirm">确定</u-button>
|
||||
@ -220,6 +220,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.mapAddress-container {
|
||||
padding: 0 36rpx;
|
||||
overflow: hidden;
|
||||
@ -299,7 +300,7 @@ export default {
|
||||
|
||||
.btn-confirm {
|
||||
border-radius: 16rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
@ -1,16 +1,34 @@
|
||||
<template>
|
||||
<view class="shop-1-container">
|
||||
<!-- <u-loading-page
|
||||
:loading="showLodingPage"
|
||||
font-size="18"
|
||||
icon-size="30"
|
||||
loading-text="加载中,请稍等..."
|
||||
></u-loading-page> -->
|
||||
<u-navbar :autoBack="true" :safeAreaInsetTop="true" title="填写店铺信息">
|
||||
<!-- <u-navbar
|
||||
:autoBack="true"
|
||||
:safeAreaInsetTop="true"
|
||||
:placeholder="true"
|
||||
title="填写店铺信息"
|
||||
>
|
||||
<template slot="right">
|
||||
<view class="btn-login-out" @click="loginOut">退出登录</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
</u-navbar> -->
|
||||
<navBar
|
||||
title="填写店铺信息"
|
||||
:statusBar="true"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:height="'44px'"
|
||||
>
|
||||
<!-- <block slot="left">
|
||||
<u-icon
|
||||
name="arrow-left"
|
||||
color="#303133"
|
||||
size="20"
|
||||
@click="pageBack()"
|
||||
></u-icon>
|
||||
</block> -->
|
||||
<block slot="right">
|
||||
<view class="btn-login-out" @click="loginOut">退出登录</view>
|
||||
</block>
|
||||
</navBar>
|
||||
<u-form :model="form" class="form" ref="uForm" label-width="70">
|
||||
<u-form-item label="联系人" prop="contact_name" required>
|
||||
<u-input
|
||||
@ -74,7 +92,7 @@
|
||||
placeholder="详细地址:如:人民大道205号2楼213"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item label="门脸图" prop="storefrontImg">
|
||||
<u-form-item label="门脸图" prop="front_facade_image">
|
||||
<u-upload
|
||||
:class="fileList.length == 0 ? 'shop1-upload' : 'shop1-upload-item'"
|
||||
@afterRead="afterRead1"
|
||||
@ -84,11 +102,10 @@
|
||||
:max-count="1"
|
||||
:width="'100%'"
|
||||
:height="154"
|
||||
:upload-text="'点击上传'"
|
||||
>
|
||||
</u-upload>
|
||||
:upload-text="''"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="环境图" prop="surroundingsImg">
|
||||
<u-form-item label="环境图" prop="environment_image">
|
||||
<u-upload
|
||||
:class="fileList2.length == 0 ? 'shop2-upload' : 'shop2-upload-item'"
|
||||
@afterRead="afterRead2"
|
||||
@ -98,15 +115,14 @@
|
||||
:max-count="1"
|
||||
:width="'100%'"
|
||||
:height="154"
|
||||
:upload-text="'点击上传'"
|
||||
>
|
||||
</u-upload>
|
||||
:upload-text="''"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
|
||||
<view class="btn-content">
|
||||
<view class="myui_check_text">检查并确认店铺信息无误</view>
|
||||
<u-button text="下一步" color="#4b71ff" @click="handleNext"></u-button>
|
||||
<u-button text="下一步" color="#fe4119" @click="handleNext"></u-button>
|
||||
</view>
|
||||
|
||||
<u-toast ref="uToast" />
|
||||
@ -114,7 +130,11 @@
|
||||
</template>
|
||||
<script>
|
||||
import { UploadFilePromise } from "../../api/upload";
|
||||
import navBar from "@/components/uni-nav-bar/uni-nav-bar";
|
||||
export default {
|
||||
components: {
|
||||
navBar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showLodingPage: true,
|
||||
@ -124,8 +144,6 @@ export default {
|
||||
shopAddress: "",
|
||||
mapAddress: "",
|
||||
store_address: "",
|
||||
storefrontImg: "",
|
||||
surroundingsImg: "",
|
||||
},
|
||||
fileList: [],
|
||||
fileList2: [],
|
||||
@ -170,6 +188,15 @@ export default {
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
let auditItem = uni.getStorageSync("auditItem");
|
||||
|
||||
if (auditItem && this.form.biz_category == "") {
|
||||
this.form = auditItem;
|
||||
|
||||
this.fileList.push({ url: auditItem.environment_image });
|
||||
this.fileList2.push({ url: auditItem.front_facade_image });
|
||||
}
|
||||
|
||||
let typeItem = uni.getStorageSync("typeItem");
|
||||
|
||||
if (typeItem) {
|
||||
@ -192,6 +219,9 @@ export default {
|
||||
this.$refs["uForm"].setRules(this.rules);
|
||||
},
|
||||
methods: {
|
||||
pageBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
async afterRead1(e) {
|
||||
const item = e.file;
|
||||
const imgUrl = item.url;
|
||||
@ -203,7 +233,7 @@ export default {
|
||||
|
||||
let res = await UploadFilePromise(imgUrl);
|
||||
if (res && res.status == 200) {
|
||||
this.form.storefrontImg = res.data.url;
|
||||
this.form.front_facade_image = res.data.url;
|
||||
}
|
||||
},
|
||||
async afterRead2(e) {
|
||||
@ -216,7 +246,7 @@ export default {
|
||||
|
||||
let res = await UploadFilePromise(imgUrl);
|
||||
if (res && res.status == 200) {
|
||||
this.form.surroundingsImg = res.data.url;
|
||||
this.form.environment_image = res.data.url;
|
||||
}
|
||||
},
|
||||
deletePic1() {
|
||||
@ -248,7 +278,7 @@ export default {
|
||||
handleNext() {
|
||||
this.$refs.uForm.validate().then((valid) => {
|
||||
if (valid) {
|
||||
if (!this.form.storefrontImg) {
|
||||
if (!this.form.front_facade_image) {
|
||||
this.$refs.uToast.show({
|
||||
message: "请上传门脸图",
|
||||
type: "error",
|
||||
@ -257,7 +287,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.form.surroundingsImg) {
|
||||
if (!this.form.environment_image) {
|
||||
this.$refs.uToast.show({
|
||||
message: "请上传环境图",
|
||||
type: "error",
|
||||
@ -281,7 +311,7 @@ export default {
|
||||
params.mobile = userInfo.user_mobile;
|
||||
}
|
||||
|
||||
const store_area =
|
||||
const storeArea =
|
||||
locationItem.administrativeRegion.label[0] +
|
||||
locationItem.administrativeRegion.label[1] +
|
||||
locationItem.administrativeRegion.label[2];
|
||||
@ -297,10 +327,11 @@ export default {
|
||||
province_id: locationItem.administrativeRegion.value[0],
|
||||
city_id: locationItem.administrativeRegion.value[1],
|
||||
county_id: locationItem.administrativeRegion.value[2],
|
||||
store_area,
|
||||
store_address: store_area + this.form.store_address,
|
||||
front_facade_image: this.form.storefrontImg,
|
||||
environment_image: this.form.surroundingsImg,
|
||||
store_area: locationItem.administrativeRegion.label.join("/"),
|
||||
store_district: locationItem.administrativeRegion.value.join("/"),
|
||||
store_address: storeArea + this.form.store_address,
|
||||
front_facade_image: this.form.front_facade_image,
|
||||
environment_image: this.form.environment_image,
|
||||
};
|
||||
|
||||
console.log(auditItem);
|
||||
@ -321,6 +352,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.shop-1-container {
|
||||
// background: #f2f2f2;
|
||||
// height: 100vh;
|
||||
@ -379,7 +411,7 @@ export default {
|
||||
|
||||
.btn-login-out {
|
||||
font-size: 28rpx;
|
||||
color: #4b71ff;
|
||||
color: $base-color;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,10 +1,34 @@
|
||||
<template>
|
||||
<view class="shop-2-container">
|
||||
<u-navbar :autoBack="true" :safeAreaInsetTop="true" title="营业信息">
|
||||
<!-- <u-navbar
|
||||
:autoBack="true"
|
||||
:safeAreaInsetTop="true"
|
||||
:placeholder="true"
|
||||
title="营业信息"
|
||||
>
|
||||
<template slot="right">
|
||||
<view class="btn-login-out" @click="loginOut">退出登录</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
</u-navbar> -->
|
||||
<navBar
|
||||
title="营业信息"
|
||||
:statusBar="true"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:height="44"
|
||||
>
|
||||
<block slot="left">
|
||||
<u-icon
|
||||
name="arrow-left"
|
||||
color="#303133"
|
||||
size="20"
|
||||
@click="pageBack()"
|
||||
></u-icon>
|
||||
</block>
|
||||
<block slot="right">
|
||||
<view class="btn-login-out" @click="loginOut">退出登录</view>
|
||||
</block>
|
||||
</navBar>
|
||||
<view class="shop-2-content">
|
||||
<u-subsection
|
||||
class="subsection"
|
||||
@ -14,11 +38,13 @@
|
||||
></u-subsection>
|
||||
|
||||
<view class="up-block" v-show="active == 0">
|
||||
<view class="up-title"> 营业执照信息 </view>
|
||||
<view class="up-title">营业执照信息</view>
|
||||
<u-form :model="form" class="form" ref="uForm" label-width="120">
|
||||
<u-form-item label="营业执照" prop="businessLicenseFiles">
|
||||
<u-upload
|
||||
:class="form.businessLicenseFiles.length == 0 ? 'shop2-2-upload' : ''"
|
||||
:class="
|
||||
form.businessLicenseFiles.length == 0 ? 'shop2-2-upload' : ''
|
||||
"
|
||||
class="shop2-2-upload"
|
||||
@afterRead="afterRead($event, 'businessLicense')"
|
||||
@delete="deletePic($event, 'businessLicense')"
|
||||
@ -30,7 +56,9 @@
|
||||
uploadText="点击上传营业执照"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
<template v-if="form.businessLicenseFiles.length && form.biz_license_company">
|
||||
<template
|
||||
v-if="form.businessLicenseFiles.length && form.biz_license_company"
|
||||
>
|
||||
<u-form-item label="公司名称" prop="biz_license_company" required>
|
||||
<u-input
|
||||
class="form-input"
|
||||
@ -52,7 +80,27 @@
|
||||
placeholder="请输入注册号"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item label="所属行业" prop="license_type" @click="showPicker = true">
|
||||
<u-form-item label="法人手机号" prop="legal_person_mobile" required>
|
||||
<u-input
|
||||
maxlength="11"
|
||||
class="form-input"
|
||||
v-model="form.legal_person_mobile"
|
||||
placeholder="请输入法人手机号"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item label="经营范围" prop="biz_license_content" required>
|
||||
<u-input
|
||||
maxlength="11"
|
||||
class="form-input"
|
||||
v-model="form.biz_license_content"
|
||||
placeholder="请输入经营范围"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
label="所属行业"
|
||||
prop="license_type"
|
||||
@click="showPicker = true"
|
||||
>
|
||||
<u-input
|
||||
style="pointer-events: none"
|
||||
class="form-input"
|
||||
@ -69,11 +117,15 @@
|
||||
</u-form-item>
|
||||
<u-form-item label="许可证" v-if="form.license_type != 1">
|
||||
<u-upload
|
||||
:class="form.specialLicenseFiles.length == 0 ? 'shop2-3-upload' : ''"
|
||||
:class="
|
||||
form.specialLicenseFiles.length == 0 ? 'shop2-3-upload' : ''
|
||||
"
|
||||
@afterRead="afterRead($event, 'licenseNumber')"
|
||||
@delete="deletePic($event, 'licenseNumber')"
|
||||
accept="image"
|
||||
:uploadIcon="form.specialLicenseFiles.length == 0 ? '' : 'camera-fill'"
|
||||
:uploadIcon="
|
||||
form.specialLicenseFiles.length == 0 ? '' : 'camera-fill'
|
||||
"
|
||||
:fileList="form.specialLicenseFiles"
|
||||
:max-count="5"
|
||||
width="125"
|
||||
@ -96,7 +148,7 @@
|
||||
</view>
|
||||
|
||||
<view class="up-block up-block-3" v-show="active == 0">
|
||||
<view class="up-title"> 法人信息 </view>
|
||||
<view class="up-title">法人信息</view>
|
||||
<view class="up-block-3-content">
|
||||
<u-upload
|
||||
:class="fileList3.length == 0 ? 'shop2-4-upload' : ''"
|
||||
@ -122,13 +174,17 @@
|
||||
></u-upload>
|
||||
</view>
|
||||
<u-form
|
||||
v-if="fileList3.length && form.legal_person_id_number"
|
||||
v-show="fileList3.length && form.legal_person_id_number"
|
||||
:model="form"
|
||||
class="form"
|
||||
ref="uForm3"
|
||||
label-width="120"
|
||||
label-width="100"
|
||||
>
|
||||
<u-form-item label="身份证号码" prop="legal_person_id_number" required>
|
||||
<u-form-item
|
||||
label="身份证号码"
|
||||
prop="legal_person_id_number"
|
||||
required
|
||||
>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
@ -136,12 +192,74 @@
|
||||
placeholder="请输入身份证号码"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item label="身份证地址" prop="legal_person_id_addr" required>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
v-model="form.legal_person_id_addr"
|
||||
placeholder="请输入身份证地址"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
v-show="fileList4.length && form.legal_person_id_period_begin"
|
||||
label="生效日期"
|
||||
prop="legal_person_id_number"
|
||||
@click="showStartTime = true"
|
||||
required
|
||||
>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
v-model="form.legal_person_id_period_begin"
|
||||
placeholder="请选择身份证有效生日"
|
||||
/>
|
||||
<u-icon
|
||||
style="display: inline-block; margin-left: 8rpx"
|
||||
name="arrow-down"
|
||||
size="12"
|
||||
color="#aaaaaa"
|
||||
></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
v-show="fileList4.length && form.legal_person_id_period_end"
|
||||
label="截止日期"
|
||||
prop="legal_person_id_period_end"
|
||||
required
|
||||
@click="handelShowEndTime()"
|
||||
>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
v-model="form.legal_person_id_period_end"
|
||||
placeholder="请选择身份证截止日期"
|
||||
/>
|
||||
<tui-radio-group class="id-radio-group" @change="handelRaddio">
|
||||
<view v-for="(item, index) in radioItems">
|
||||
<tui-radio
|
||||
class="id-radio"
|
||||
:key="index"
|
||||
:checked="item.checked"
|
||||
:value="item.value"
|
||||
color="#07c160"
|
||||
borderColor="#999"
|
||||
></tui-radio>
|
||||
<text class="id-radio-text">{{ item.name }}</text>
|
||||
</view>
|
||||
</tui-radio-group>
|
||||
<u-icon
|
||||
v-if="form.legal_person_id_period_end != '长期'"
|
||||
style="display: inline-block; margin-left: 8rpx"
|
||||
name="arrow-down"
|
||||
size="12"
|
||||
color="#aaaaaa"
|
||||
></u-icon>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
|
||||
<!--个人-->
|
||||
<view class="up-block up-block-3" v-show="active == 1">
|
||||
<view class="up-title"> 个人信息 </view>
|
||||
<view class="up-title">个人信息</view>
|
||||
<view class="up-block-3-content">
|
||||
<u-upload
|
||||
:class="fileList5.length == 0 ? 'shop2-4-upload' : ''"
|
||||
@ -169,11 +287,11 @@
|
||||
></u-upload>
|
||||
</view>
|
||||
<u-form
|
||||
v-if="fileList5.length"
|
||||
:model="form2"
|
||||
class="form"
|
||||
ref="uForm2"
|
||||
label-width="100"
|
||||
v-show="fileList5.length && form2.individual_id_number"
|
||||
>
|
||||
<u-form-item label="身份证号码" prop="individual_id_number" required>
|
||||
<u-input
|
||||
@ -183,14 +301,80 @@
|
||||
placeholder="请输入身份证号码"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item label="姓名" prop="individual_id_name" required>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
v-model="form2.individual_id_name"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
v-show="fileList6.length && form2.individual_id_period_begin"
|
||||
label="生效日期"
|
||||
prop="individual_id_period_begin"
|
||||
@click="showStartTime = true"
|
||||
required
|
||||
>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
v-model="form2.individual_id_period_begin"
|
||||
placeholder="请选择身份证有效生日"
|
||||
/>
|
||||
<u-icon
|
||||
style="display: inline-block; margin-left: 8rpx"
|
||||
name="arrow-down"
|
||||
size="12"
|
||||
color="#aaaaaa"
|
||||
></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
v-show="fileList6.length && form2.individual_id_period_end"
|
||||
label="截止日期"
|
||||
prop="individual_id_period_end"
|
||||
required
|
||||
@click="handelShowEndTime()"
|
||||
>
|
||||
<u-input
|
||||
class="form-input"
|
||||
maxlength="18"
|
||||
v-model="form2.individual_id_period_end"
|
||||
placeholder="请选择身份证截止日期"
|
||||
/>
|
||||
<tui-radio-group class="id-radio-group" @change="handelRaddio">
|
||||
<view v-for="(item, index) in radioItems">
|
||||
<tui-radio
|
||||
class="id-radio"
|
||||
:key="index"
|
||||
:checked="item.checked"
|
||||
:value="item.value"
|
||||
color="#07c160"
|
||||
borderColor="#999"
|
||||
></tui-radio>
|
||||
<text class="id-radio-text">{{ item.name }}</text>
|
||||
</view>
|
||||
</tui-radio-group>
|
||||
<u-icon
|
||||
v-if="form.individual_id_period_end != '长期'"
|
||||
style="display: inline-block; margin-left: 8rpx"
|
||||
name="arrow-down"
|
||||
size="12"
|
||||
color="#aaaaaa"
|
||||
></u-icon>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn-content">
|
||||
<view class="myui_check_text">检查并确认营业证件信息无误</view>
|
||||
<u-button text="下一步" color="#4b71ff" @click="handleNext"></u-button>
|
||||
<u-button text="上一步" class="myui_btn_prev" @click="handlePrev"></u-button>
|
||||
<u-button text="下一步" color="#fe4119" @click="handleNext"></u-button>
|
||||
<u-button
|
||||
text="上一步"
|
||||
class="myui_btn_prev"
|
||||
@click="handlePrev"
|
||||
></u-button>
|
||||
</view>
|
||||
|
||||
<u-popup
|
||||
@ -205,9 +389,9 @@
|
||||
>
|
||||
<view class="popup-content">
|
||||
<view class="popup-title">可上传证件类型</view>
|
||||
<view class="popup-tips"
|
||||
>请根据您的主营品类上传真实有效的许可证,能够提高入驻通过的效率。目前支持的许可证如下:</view
|
||||
>
|
||||
<view class="popup-tips">
|
||||
请根据您的主营品类上传真实有效的许可证,能够提高入驻通过的效率。目前支持的许可证如下:
|
||||
</view>
|
||||
<view class="popuo-prove-item">
|
||||
<view class="item-title">许可证</view>
|
||||
<view class="item-content">
|
||||
@ -226,7 +410,9 @@
|
||||
支持各种小证,因各地监管规则不一,请联系客服获取其他小证支持情况的详细。
|
||||
</view>
|
||||
</view>
|
||||
<u-button class="btn-queren" @click="showPopup = false">我知道了</u-button>
|
||||
<u-button class="btn-queren" @click="showPopup = false">
|
||||
我知道了
|
||||
</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
@ -239,29 +425,64 @@
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="showStartTime"
|
||||
v-model="startTime"
|
||||
mode="date"
|
||||
:minDate="startMinDate"
|
||||
@cancel="showStartTime = false"
|
||||
@confirm="handelStartTime"
|
||||
></u-datetime-picker>
|
||||
<u-datetime-picker
|
||||
:show="showEndTime"
|
||||
v-model="endTime"
|
||||
:minDate="endMinDate"
|
||||
:maxDate="endMaxDate"
|
||||
mode="date"
|
||||
@confirm="handelEndTime"
|
||||
@cancel="showEndTime = false"
|
||||
></u-datetime-picker>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from "vuex";
|
||||
import { UploadFilePromise, batchNoApi, imgOcrResultApi } from "../../api/upload";
|
||||
|
||||
import {
|
||||
UploadFilePromise,
|
||||
batchNoApi,
|
||||
imgOcrResultApi,
|
||||
} from "../../api/upload";
|
||||
import navBar from "@/components/uni-nav-bar/uni-nav-bar";
|
||||
import tuiRadio from "@/components/tui-radio/tui-radio.vue";
|
||||
import tuiRadioGroup from "@/components/tui-radio-group/tui-radio-group.vue";
|
||||
const orcImgTypeConf = {
|
||||
FR_ID_CARD_FRONT: "FR_ID_CARD_FRONT",
|
||||
FR_ID_CARD_BEHIND: "FR_ID_CARD_BEHIND",
|
||||
ID_CARD_FRONT: "ID_CARD_FRONT",
|
||||
ID_CARD_BEHIND: "ID_CARD_BEHIND",
|
||||
BUSINESS_LICENCE: "BUSINESS_LICENCE",
|
||||
ID_CARD_FRONT: "ID_CARD_FRONT", // 个人身份证正面
|
||||
ID_CARD_BEHIND: "ID_CARD_BEHIND", // 个人身份证反面
|
||||
BUSINESS_LICENCE: "BUSINESS_LICENCE", // 营业执照
|
||||
BANK_CARD: "BANK_CARD",
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
navBar,
|
||||
tuiRadio,
|
||||
tuiRadioGroup,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
showPopup: false,
|
||||
showPicker: false,
|
||||
showStartTime: false,
|
||||
showEndTime: false,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
startMinDate: 0,
|
||||
endMinDate: 0,
|
||||
endMaxDate: 0,
|
||||
list: [
|
||||
{
|
||||
name: "企业类型",
|
||||
@ -270,6 +491,18 @@ export default {
|
||||
name: "个人类型",
|
||||
},
|
||||
],
|
||||
radioItems: [
|
||||
{
|
||||
name: "非长期",
|
||||
value: "1",
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
name: "长期",
|
||||
value: "2",
|
||||
checked: false,
|
||||
},
|
||||
],
|
||||
form: {
|
||||
license_type: 1, // 所属行业
|
||||
license_image: "", // 许可证路径
|
||||
@ -281,15 +514,23 @@ export default {
|
||||
legal_person_id_number: "", //法人身份证号
|
||||
legal_person_id_images: "", //身份证图片正面路径
|
||||
legal_person_id_images2: "", // 身份证图片反面路径
|
||||
legal_person_id_addr: "", // 身份证地址
|
||||
legal_person_id_period_begin: "", //身份证开始有效日期
|
||||
legal_person_id_period_end: "", // 身份证截止日期
|
||||
businessLicenseFiles: [],
|
||||
specialLicenseFiles: [],
|
||||
},
|
||||
form2: {
|
||||
individual_id_number: "",
|
||||
individual_id_images: "",
|
||||
individual_id_images2: "",
|
||||
individual_id_number: "", // 个人身份证号码
|
||||
individual_id_images: "", // 个人身份证图片正面路径
|
||||
individual_id_images2: "", //个人身份证图片反面路径
|
||||
individual_id_name: "", //个人身份证姓名
|
||||
individual_id_addr: "", //个人身份证地址
|
||||
individual_id_period_begin: "", // 个人身份证开始有效日期
|
||||
individual_id_period_end: "", // 个人身份证截止日期
|
||||
},
|
||||
license_type_name: "",
|
||||
orcTimeout: null,
|
||||
action: "",
|
||||
fileList: [],
|
||||
fileList2: [],
|
||||
@ -321,13 +562,13 @@ export default {
|
||||
},
|
||||
legal_person_name: {
|
||||
required: true,
|
||||
message: "请输入法人姓名",
|
||||
message: "请输入姓名",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
legal_person_mobile: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入法人手机号",
|
||||
message: "请输入手机号",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
{
|
||||
@ -341,10 +582,15 @@ export default {
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
legal_person_id_addr: {
|
||||
required: true,
|
||||
message: "请输入身份证的地址",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
legal_person_id_number: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入法人身份证号",
|
||||
message: "请输入身份证号",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
{
|
||||
@ -358,7 +604,27 @@ export default {
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
orcTimeout: null,
|
||||
legal_person_id_period_begin: [
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择身份证开始有效日期",
|
||||
trigger: ["change"],
|
||||
},
|
||||
],
|
||||
legal_person_id_period_end: [
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择身份证截止日期",
|
||||
trigger: ["change"],
|
||||
},
|
||||
],
|
||||
biz_license_content: {
|
||||
required: true,
|
||||
message: "请输入经营范围",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
},
|
||||
rules2: {
|
||||
individual_id_number: [
|
||||
@ -378,19 +644,56 @@ export default {
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
individual_id_name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入姓名",
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
],
|
||||
individual_id_period_begin: [
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择身份证开始有效日期",
|
||||
trigger: ["change"],
|
||||
},
|
||||
],
|
||||
individual_id_period_end: [
|
||||
{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择身份证截止日期",
|
||||
trigger: ["change"],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
this.$refs["uForm"]?.setRules(this.rules);
|
||||
this.$refs["uForm2"]?.setRules(this.rules2);
|
||||
this.$refs["uForm"].setRules(this.rules);
|
||||
// this.$refs["uForm2"]?.setRules(this.rules2);
|
||||
},
|
||||
mounted() {
|
||||
this.license_type_name = this.columns?.[0].filter(
|
||||
(item) => item.id == this.form.license_type
|
||||
)?.[0].name;
|
||||
|
||||
const date19300520 = new Date("1930-05-20T00:00:00Z");
|
||||
this.startMinDate = date19300520.getTime();
|
||||
|
||||
const date = new Date();
|
||||
date.setFullYear(date.getFullYear() + 20);
|
||||
this.endMaxDate = date.getTime();
|
||||
|
||||
const data2 = new Date();
|
||||
data2.setFullYear(data2.getFullYear() + 5);
|
||||
this.endMinDate = data2.getTime();
|
||||
},
|
||||
methods: {
|
||||
pageBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
getOcrText(filePath, file, type) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const batchNoRes = await batchNoApi(filePath, file, type);
|
||||
@ -408,11 +711,11 @@ export default {
|
||||
if (formDataStr !== "") {
|
||||
formDataStr += "&";
|
||||
}
|
||||
formDataStr += encodeURIComponent(key) + "=" + encodeURIComponent(value);
|
||||
formDataStr +=
|
||||
encodeURIComponent(key) + "=" + encodeURIComponent(value);
|
||||
});
|
||||
|
||||
const imgOcrRes = await imgOcrResultApi(formDataStr);
|
||||
|
||||
clearTimeout(this.orcTimeout);
|
||||
resolve(imgOcrRes?.data);
|
||||
}, 1000);
|
||||
@ -480,23 +783,73 @@ export default {
|
||||
|
||||
switch (type) {
|
||||
case "businessLicense":
|
||||
var ocr = await this.getOcrText(imgUrl, item, orcImgTypeConf.BUSINESS_LICENCE);
|
||||
var ocr = await this.getOcrText(
|
||||
imgUrl,
|
||||
item,
|
||||
orcImgTypeConf.BUSINESS_LICENCE
|
||||
);
|
||||
this.form.biz_license_company = ocr.bizLicenseCompanyName;
|
||||
this.form.legal_person_name = ocr.bizLicenseOwnerName;
|
||||
this.form.biz_license_number = ocr.bizLicenseCreditCode;
|
||||
this.form.biz_license_content = ocr.bizLicenseScope || "";
|
||||
console.log("BUSINESS_LICENCE", ocr);
|
||||
break;
|
||||
case "licenseNumber":
|
||||
break;
|
||||
case "idFront":
|
||||
var ocr = await this.getOcrText(imgUrl, item, orcImgTypeConf.ID_CARD_FRONT);
|
||||
var ocr = await this.getOcrText(
|
||||
imgUrl,
|
||||
item,
|
||||
orcImgTypeConf.ID_CARD_FRONT
|
||||
);
|
||||
this.form.legal_person_name = ocr.name;
|
||||
this.form.legal_person_id_number = ocr.idNumber;
|
||||
this.form.legal_person_id_addr = ocr.address;
|
||||
console.log("ID_CARD_FRONT", ocr);
|
||||
break;
|
||||
case "idReverse":
|
||||
var ocr = await this.getOcrText(
|
||||
imgUrl,
|
||||
item,
|
||||
orcImgTypeConf.FR_ID_CARD_BEHIND
|
||||
);
|
||||
|
||||
if (ocr && ocr.validity) {
|
||||
let validity = ocr.validity.split("-");
|
||||
this.startTime = validity[0];
|
||||
this.endTime = validity[1];
|
||||
|
||||
this.form.legal_person_id_period_begin = this.startTime;
|
||||
this.form.legal_person_id_period_end = this.endTime;
|
||||
}
|
||||
|
||||
break;
|
||||
case "personIdFront":
|
||||
var ocr = await this.getOcrText(imgUrl, item, orcImgTypeConf.ID_CARD_FRONT);
|
||||
var ocr = await this.getOcrText(
|
||||
imgUrl,
|
||||
item,
|
||||
orcImgTypeConf.ID_CARD_FRONT
|
||||
);
|
||||
|
||||
this.form2.individual_id_name = ocr.name;
|
||||
this.form2.individual_id_number = ocr.idNumber;
|
||||
this.form2.individual_id_addr = ocr.address;
|
||||
console.log("personIdFront", ocr);
|
||||
break;
|
||||
case "personIdReverse":
|
||||
var ocr = await this.getOcrText(
|
||||
imgUrl,
|
||||
item,
|
||||
orcImgTypeConf.ID_CARD_BEHIND
|
||||
);
|
||||
|
||||
if (ocr && ocr.validity) {
|
||||
let validity = ocr.validity.split("-");
|
||||
this.startTime = validity[0];
|
||||
this.endTime = validity[1];
|
||||
this.form2.individual_id_period_begin = this.startTime;
|
||||
this.form2.individual_id_period_end = this.endTime;
|
||||
}
|
||||
console.log("personIdFront", ocr);
|
||||
break;
|
||||
}
|
||||
@ -534,6 +887,15 @@ export default {
|
||||
// this.fileList4 = [];
|
||||
// this.fileList5 = [];
|
||||
// this.fileList6 = [];
|
||||
this.minDate = 0;
|
||||
if (e == 1) {
|
||||
this.$refs.uForm2.setRules(this.rules2);
|
||||
this.form.legal_person_id_period_begin = "";
|
||||
this.form.legal_person_id_period_end = "";
|
||||
} else {
|
||||
this.individual_id_period_begin = "";
|
||||
this.individual_id_period_end = "";
|
||||
}
|
||||
},
|
||||
handlePopup() {
|
||||
this.showPopup = true;
|
||||
@ -652,6 +1014,59 @@ export default {
|
||||
|
||||
this.showPicker = false;
|
||||
},
|
||||
handelShowEndTime() {
|
||||
if (
|
||||
this.form.legal_person_id_period_end == "长期" ||
|
||||
this.form2.individual_id_period_end == "长期"
|
||||
)
|
||||
return;
|
||||
this.showEndTime = true;
|
||||
},
|
||||
handelStartTime(e) {
|
||||
this.startTime = e.value;
|
||||
this.showStartTime = false;
|
||||
if (this.active == 0) {
|
||||
this.form.legal_person_id_period_begin = uni.$u.timeFormat(
|
||||
this.startTime,
|
||||
"yyyy-mm-dd"
|
||||
);
|
||||
} else {
|
||||
this.form2.individual_id_period_begin = uni.$u.timeFormat(
|
||||
this.startTime,
|
||||
"yyyy-mm-dd"
|
||||
);
|
||||
}
|
||||
},
|
||||
handelEndTime(e) {
|
||||
this.endTime = e.value;
|
||||
this.showEndTime = false;
|
||||
if (this.active == 0) {
|
||||
this.form.legal_person_id_period_end = uni.$u.timeFormat(
|
||||
this.endTime,
|
||||
"yyyy-mm-dd"
|
||||
);
|
||||
} else {
|
||||
this.form2.individual_id_period_end = uni.$u.timeFormat(
|
||||
this.endTime,
|
||||
"yyyy-mm-dd"
|
||||
);
|
||||
}
|
||||
},
|
||||
handelRaddio(e) {
|
||||
if (e && e.detail.value == 2) {
|
||||
if (this.active == 0) {
|
||||
this.form.legal_person_id_period_end = "长期";
|
||||
} else {
|
||||
this.form2.individual_id_period_end = "长期";
|
||||
}
|
||||
} else {
|
||||
if (this.active == 0) {
|
||||
this.form.legal_person_id_period_end = "";
|
||||
} else {
|
||||
this.form2.individual_id_period_end = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
loginOut() {
|
||||
this.$store.dispatch("user/LoginOut");
|
||||
},
|
||||
@ -660,6 +1075,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/styles/variables.scss";
|
||||
page {
|
||||
background: #f2f2f2;
|
||||
}
|
||||
@ -677,7 +1093,7 @@ page {
|
||||
|
||||
.up-block {
|
||||
background: #fff;
|
||||
padding: 24rpx 24rpx 0;
|
||||
padding: 24rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.up-title {
|
||||
@ -728,7 +1144,7 @@ page {
|
||||
}
|
||||
|
||||
.shop-2-content {
|
||||
z-index: 1;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.shop2-popup {
|
||||
@ -768,7 +1184,7 @@ page {
|
||||
}
|
||||
|
||||
.btn-queren {
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@ -779,11 +1195,18 @@ page {
|
||||
|
||||
.btn-login-out {
|
||||
font-size: 28rpx;
|
||||
color: #4b71ff;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.color_red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.id-radio-group {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-right: 20rpx;
|
||||
width: 240rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,10 +1,34 @@
|
||||
<template>
|
||||
<view class="shop-3-container">
|
||||
<u-navbar :autoBack="true" :safeAreaInsetTop="true" title="资金结算信息">
|
||||
<!-- <u-navbar
|
||||
:autoBack="true"
|
||||
:safeAreaInsetTop="true"
|
||||
:placeholder="true"
|
||||
title="资金结算信息"
|
||||
>
|
||||
<template slot="right">
|
||||
<view class="btn-login-out" @click="loginOut">退出登录</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
</u-navbar> -->
|
||||
<navBar
|
||||
title="资金结算信息"
|
||||
:statusBar="true"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:height="'44px'"
|
||||
>
|
||||
<block slot="left">
|
||||
<u-icon
|
||||
name="arrow-left"
|
||||
color="#303133"
|
||||
size="20"
|
||||
@click="pageBack()"
|
||||
></u-icon>
|
||||
</block>
|
||||
<block slot="right">
|
||||
<view class="btn-login-out" @click="loginOut">退出登录</view>
|
||||
</block>
|
||||
</navBar>
|
||||
|
||||
<view class="from1">
|
||||
<u-form :model="form" ref="uForm" label-width="90">
|
||||
@ -16,18 +40,20 @@
|
||||
accept="image"
|
||||
:fileList="bankCardFiles"
|
||||
:max-count="1"
|
||||
uploadIconColor="#4b71ff"
|
||||
uploadIconColor="#fe4119"
|
||||
width="268"
|
||||
height="125"
|
||||
uploadText="上传银行卡 免填卡号"
|
||||
>
|
||||
</u-upload>
|
||||
uploadText="点击上传银行卡正面"
|
||||
:maxSize="8 * 1024 * 1024"
|
||||
@oversize="overSize"
|
||||
></u-upload>
|
||||
<view
|
||||
v-if="bankCardFiles.length && !form.account_number"
|
||||
class="retry_ocr"
|
||||
@click="onBankOcrretryClick"
|
||||
>点击自动识别免填卡号</view
|
||||
>
|
||||
点击自动识别免填卡号
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<template
|
||||
@ -37,7 +63,6 @@
|
||||
<u-input
|
||||
v-model="form.account_holder_name"
|
||||
placeholder="请输入开户名称"
|
||||
readonly
|
||||
/>
|
||||
</u-form-item>
|
||||
|
||||
@ -46,7 +71,6 @@
|
||||
type="number"
|
||||
v-model="form.account_number"
|
||||
placeholder="请输入银行卡号"
|
||||
readonly
|
||||
/>
|
||||
</u-form-item>
|
||||
|
||||
@ -110,13 +134,13 @@
|
||||
</u-popup>
|
||||
|
||||
<view class="btn-content">
|
||||
<view class="myui_check_text" v-if="bankCardFiles.length"
|
||||
>检查并确认结算证件信息无误</view
|
||||
>
|
||||
<view class="myui_check_text" v-if="bankCardFiles.length">
|
||||
检查并确认结算证件信息无误
|
||||
</view>
|
||||
<u-button
|
||||
text="提交审核"
|
||||
color="#4b71ff"
|
||||
:disabled="!bankCardFiles.length"
|
||||
color="#fe4119"
|
||||
:disabled="!form.account_number"
|
||||
@click="handleSubmit"
|
||||
></u-button>
|
||||
<u-button
|
||||
@ -147,6 +171,7 @@ import {
|
||||
import { batchNoApi, imgOcrResultApi } from "../../api/upload";
|
||||
import { mapState } from "vuex";
|
||||
import { throttle, debounce } from "lodash";
|
||||
import navBar from "@/components/uni-nav-bar/uni-nav-bar";
|
||||
|
||||
const orcImgTypeConf = {
|
||||
FR_ID_CARD_FRONT: "FR_ID_CARD_FRONT",
|
||||
@ -158,7 +183,9 @@ const orcImgTypeConf = {
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
components: {
|
||||
navBar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
@ -217,12 +244,18 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
let auditItem = uni.getStorageSync("auditItem");
|
||||
|
||||
this.form.account_holder_name = auditItem.biz_license_company;
|
||||
this.form.account_holder_name =
|
||||
auditItem.biz_license_company || auditItem.contact_name;
|
||||
this.entity_type = auditItem.entity_type || 1;
|
||||
this.branchBankDebounceFn = debounce(this.getBranchBankList, 500);
|
||||
},
|
||||
methods: {
|
||||
pageBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
overSize(e) {
|
||||
uni.$u.toast("上传图片大小不能超过8MB!");
|
||||
},
|
||||
getOcrText(filePath, file, type) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
this.loading = true;
|
||||
@ -407,6 +440,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/styles/variables.scss";
|
||||
/deep/ .u-form-item__body {
|
||||
padding: 0 0 20rpx;
|
||||
}
|
||||
@ -483,7 +517,7 @@ export default {
|
||||
padding: 10rpx 20rpx;
|
||||
color: #fff;
|
||||
border-radius: 100rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -502,13 +536,13 @@ export default {
|
||||
|
||||
.btn-submit {
|
||||
border-radius: 16rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-login-out {
|
||||
font-size: 28rpx;
|
||||
color: #4b71ff;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.bankcard_upload {
|
||||
|
||||
@ -75,8 +75,9 @@
|
||||
:hair-line="false"
|
||||
size="mini"
|
||||
@click="getSmsCode"
|
||||
>{{ verifyText }}</u-button
|
||||
>
|
||||
{{ verifyText }}
|
||||
</u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
@ -89,8 +90,9 @@
|
||||
:ripple-bg-color="'rgba(0, 0, 0, 0.15)'"
|
||||
:loading="isLoading"
|
||||
@click="handleRegister"
|
||||
>重置密码</u-button
|
||||
>
|
||||
重置密码
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="agreement-content">
|
||||
若你忘记了密码,可在此重置新密码。
|
||||
@ -262,6 +264,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.forget-pwd-container {
|
||||
overflow: hidden;
|
||||
|
||||
@ -326,8 +329,8 @@ export default {
|
||||
margin: 68rpx 44rpx;
|
||||
|
||||
.input-block {
|
||||
padding: 16rpx !important;
|
||||
margin-bottom: 60rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 32rpx !important;
|
||||
height: 80rpx;
|
||||
color: #999999;
|
||||
border-bottom: 1px solid #000;
|
||||
@ -340,7 +343,6 @@ export default {
|
||||
}
|
||||
|
||||
.u-input {
|
||||
padding: 0 20rpx !important;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
@ -362,7 +364,7 @@ export default {
|
||||
border: none;
|
||||
letter-spacing: 10px;
|
||||
font-size: 16px;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@ -406,9 +408,10 @@ export default {
|
||||
}
|
||||
|
||||
.verify-btn {
|
||||
background-color: #ffd161;
|
||||
color: #fff;
|
||||
height: 60rpx;
|
||||
border: none;
|
||||
background-color: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,4 +426,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<view class="login-select-index-container">
|
||||
<view class="logo-content"> </view>
|
||||
<view class="logo-content"></view>
|
||||
<view class="app-name">小发同城</view>
|
||||
<view class="app-title">商家中心</view>
|
||||
<view class="btn-content">
|
||||
<view class="btn-block">
|
||||
<u-button class="btn" :hairline="false" @click="skipuLogin()"
|
||||
>登录</u-button
|
||||
>
|
||||
<view class="btn-tips"> 已有门店 直接登录 </view>
|
||||
<u-button class="btn" :hairline="false" @click="skipuLogin()">
|
||||
登录
|
||||
</u-button>
|
||||
<view class="btn-tips">已有门店 直接登录</view>
|
||||
</view>
|
||||
<view class="btn-block">
|
||||
<u-button class="btn btn-register" @click="skipuRegister()"
|
||||
>注册开店</u-button
|
||||
>
|
||||
<view class="btn-tips"> 新开门店 前去注册</view>
|
||||
<u-button class="btn btn-register" @click="skipuRegister()">
|
||||
注册开店
|
||||
</u-button>
|
||||
<view class="btn-tips">新开门店 前去注册</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -33,15 +33,12 @@ export default {
|
||||
if (this.userInfo && Object.keys(this.userInfo).length > 0) {
|
||||
var _userinfo = JSON.parse(JSON.stringify(this.userInfo));
|
||||
var mobile = "";
|
||||
|
||||
let isContain = _userinfo.user_mobile.indexOf("86");
|
||||
|
||||
if (isContain != -1 && _userinfo.user_mobile.length > 11) {
|
||||
mobile = _userinfo.user_mobile.slice(2);
|
||||
} else {
|
||||
mobile = _userinfo.user_mobile;
|
||||
}
|
||||
|
||||
this.checkAccountIsPass({ userInfo: _userinfo, mobile: mobile });
|
||||
}
|
||||
},
|
||||
@ -62,6 +59,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.login-select-index-container {
|
||||
overflow: hidden;
|
||||
|
||||
@ -70,8 +68,8 @@ export default {
|
||||
.logo-content {
|
||||
background-image: url("../../static/logo-2.png");
|
||||
background-size: 100% 100%;
|
||||
width: 228rpx;
|
||||
height: 228rpx;
|
||||
width: 260rpx;
|
||||
height: 240rpx;
|
||||
margin: 50% auto;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
@ -79,6 +77,8 @@ export default {
|
||||
.app-name {
|
||||
font-size: 72rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.app-title {
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
bottom: 14%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
justify-content: space-around;
|
||||
|
||||
.btn-block {
|
||||
.btn {
|
||||
@ -102,7 +102,8 @@ export default {
|
||||
}
|
||||
|
||||
.btn-register {
|
||||
background: #ffd161;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
@ -118,4 +119,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -3,21 +3,31 @@
|
||||
<u-popup :show="show" @close="close" @open="open" mode="center">
|
||||
<view class="popup">
|
||||
<view class="popup_header">欢迎使用小发同城</view>
|
||||
<view class="popup_body">
|
||||
<iframe
|
||||
width="100%"
|
||||
src="http://www2.gpxscs.cn/businessAgreementPrivacy"
|
||||
class="webview"
|
||||
/>
|
||||
</view>
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@scrolltolower="handerScrolltolower"
|
||||
class="popup_body"
|
||||
>
|
||||
<u-parse :content="content" class="webview"></u-parse>
|
||||
</scroll-view>
|
||||
<view class="tool">
|
||||
点击"同意",即表示您已阅读并同意小发同城<text>《小发同城商家入驻协议》</text>和<text
|
||||
>《个人信息保护政策》</text
|
||||
>
|
||||
点击"同意",即表示您已阅读并同意小发同城
|
||||
<text>《小发同城商家入驻协议》</text>
|
||||
和
|
||||
<text>《个人信息保护政策》</text>
|
||||
</view>
|
||||
<view class="popup_foot">
|
||||
<view class="btn btn_disagree" @click="disagreeHandle">不同意</view>
|
||||
<view class="btn btn_ok" @click="okHandle">同意</view>
|
||||
<u-button
|
||||
class="btn btn_disagree"
|
||||
:hairline="false"
|
||||
:plain="true"
|
||||
@click="disagreeHandle"
|
||||
>
|
||||
不同意
|
||||
</u-button>
|
||||
<u-button class="btn btn_ok" :disabled="isDisabled" @click="okHandle">
|
||||
同意
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
@ -25,26 +35,52 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GetProtoco } from "@/api/protocol";
|
||||
import APPUpdate, { getCurrentNo } from "@/config/appUpdate";
|
||||
export default {
|
||||
name: "LaunchPage",
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
content: "",
|
||||
isDisabled: false,
|
||||
version: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getProtoco();
|
||||
try {
|
||||
const val = uni.getStorageSync("isNeedAgreementDialog");
|
||||
if(val==='' || val===false){
|
||||
if (val === "" || val === false) {
|
||||
this.show = true;
|
||||
} else {
|
||||
this.checkAppUpdate();
|
||||
uni.redirectTo({
|
||||
url: "/pages/index/index",
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
methods: {
|
||||
async getProtoco() {
|
||||
let params = { protocols_key: "joininPrivacyAgreement" };
|
||||
let res = await GetProtoco(params);
|
||||
if (res && res.status == 200) {
|
||||
this.content = res.data.document;
|
||||
}
|
||||
},
|
||||
checkAppUpdate(callback) {
|
||||
// #ifdef APP-PLUS
|
||||
getCurrentNo((res) => {
|
||||
this.version = res.version;
|
||||
APPUpdate(this.version); // 触发更新弹窗
|
||||
callback && callback();
|
||||
});
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
callback && callback();
|
||||
// #endif
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
@ -64,27 +100,33 @@ export default {
|
||||
uni.setStorage({
|
||||
key: "isNeedAgreementDialog",
|
||||
data: true,
|
||||
success: function () {
|
||||
uni.redirectTo({
|
||||
url: "/pages/index/index",
|
||||
success: () => {
|
||||
this.checkAppUpdate(() => {
|
||||
uni.redirectTo({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
handerScrolltolower(e) {
|
||||
this.isDisabled = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
background: url("/static/xiaofa-bg.png") no-repeat;
|
||||
background-size: cover;
|
||||
background: url("@/static/xiaofa-bg.png") no-repeat;
|
||||
background-size: contain;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/deep/ .u-popup__content {
|
||||
border-radius: 24rpx;
|
||||
margin: 40rpx;
|
||||
width: 86%;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
|
||||
.popup {
|
||||
@ -92,6 +134,7 @@ export default {
|
||||
font-size: 30rpx;
|
||||
|
||||
.popup_header {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #222;
|
||||
@ -99,12 +142,12 @@ export default {
|
||||
|
||||
.popup_body {
|
||||
margin: 30rpx auto;
|
||||
height: 400rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.webview {
|
||||
border: none;
|
||||
overflow-x: hidden;
|
||||
height: 400rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,14 +163,17 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.btn {
|
||||
width: 150rpx;
|
||||
padding: 15rpx 36rpx;
|
||||
width: 234rpx;
|
||||
height: 80rpx;
|
||||
border: 1rpx solid #999;
|
||||
border-radius: 100rpx;
|
||||
text-align: center;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.btn_ok {
|
||||
margin-left: 24rpx;
|
||||
color: #fff;
|
||||
background: #03ad7a;
|
||||
border-color: #03ad7a;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="login-container">
|
||||
<u-navbar :autoBack="true" :safeAreaInsetTop="true">
|
||||
<u-navbar :autoBack="true" :safeAreaInsetTop="true" :placeholder="true">
|
||||
<template slot="right">
|
||||
<view class="btn-register" @click="skipuRegister">开店</view>
|
||||
</template>
|
||||
@ -11,14 +11,16 @@
|
||||
<view
|
||||
:class="['login-type-item', { active: loginType == 0 }]"
|
||||
@click="handleActiveLoginType(0)"
|
||||
>账号登录</view
|
||||
>
|
||||
账号登录
|
||||
</view>
|
||||
<view class="login-type-line"></view>
|
||||
<view
|
||||
:class="['login-type-item', { active: loginType == 1 }]"
|
||||
@click="handleActiveLoginType(1)"
|
||||
>验证码登录</view
|
||||
>
|
||||
验证码登录
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-content">
|
||||
<view class="account-login">
|
||||
@ -36,7 +38,9 @@
|
||||
:placeholder-style="'color:#999999;'"
|
||||
>
|
||||
<template slot="prefix">
|
||||
<text class="input-label">账号/手机号</text>
|
||||
<text class="input-label">
|
||||
{{ isPHone ? "手机号" : "账号/手机号" }}
|
||||
</text>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
@ -50,12 +54,11 @@
|
||||
:height="60"
|
||||
:auto-height="true"
|
||||
:placeholder-style="'color: #999999;'"
|
||||
style="margin-bottom: 20rpx"
|
||||
>
|
||||
<template slot="prefix">
|
||||
<text class="input-label">{{
|
||||
loginType == 0 ? "密码" : "验证码"
|
||||
}}</text>
|
||||
<text class="input-label">
|
||||
{{ loginType == 0 ? "密码" : "验证码" }}
|
||||
</text>
|
||||
</template>
|
||||
<template slot="suffix">
|
||||
<u-button
|
||||
@ -64,8 +67,9 @@
|
||||
:hair-line="false"
|
||||
size="mini"
|
||||
@click="getSmsCode"
|
||||
>{{ verifyText }}</u-button
|
||||
>
|
||||
{{ verifyText }}
|
||||
</u-button>
|
||||
<u-icon
|
||||
name="eye"
|
||||
v-if="[0, 2, 3].includes(loginType) && !showPwd"
|
||||
@ -84,7 +88,7 @@
|
||||
</u-input>
|
||||
<u-input
|
||||
v-if="loginType == 0"
|
||||
class="input-block"
|
||||
class="yan-zheng-ma-input-block"
|
||||
v-model="accountCode"
|
||||
:color="'#555555'"
|
||||
:border="'false'"
|
||||
@ -122,15 +126,15 @@
|
||||
:ripple-bg-color="'rgba(0, 0, 0, 0.15)'"
|
||||
:loading="isLoading"
|
||||
@click="handleLogin"
|
||||
>登录</u-button
|
||||
>
|
||||
<view class="forget-pwd" @click="skipuForgetPwd">忘记密码</view>
|
||||
</view>
|
||||
<view class="agreement-content">
|
||||
登录代表你已经同意<text @click="handerSkip()" class="agreement-item"
|
||||
>《用户协议》</text
|
||||
>
|
||||
登录
|
||||
</u-button>
|
||||
<view class="forget-pwd" @click="skipuForgetPwd">忘记密码?</view>
|
||||
</view>
|
||||
<!-- <view class="agreement-content">
|
||||
登录代表你已经同意
|
||||
<text @click="handerSkip()" class="agreement-item">《用户协议》</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
@ -177,6 +181,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
if (this.userInfo && Object.keys(this.userInfo).length > 0) {
|
||||
console.log(this.userInfo);
|
||||
var _userinfo = JSON.parse(JSON.stringify(this.userInfo));
|
||||
var mobile = "";
|
||||
|
||||
@ -397,12 +402,13 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
.login-container {
|
||||
@import "@/styles/variables.scss";
|
||||
.btn-register {
|
||||
color: #f59a23;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.login-content {
|
||||
padding: 34% 40rpx 0 40rpx;
|
||||
padding: 18% 40rpx 0 40rpx;
|
||||
|
||||
.logo-block {
|
||||
width: 200rpx;
|
||||
@ -445,7 +451,7 @@ export default {
|
||||
|
||||
.active {
|
||||
background: #fff;
|
||||
color: #555555;
|
||||
color: $base-color;
|
||||
|
||||
&::before {
|
||||
// position: absolute;
|
||||
@ -466,8 +472,8 @@ export default {
|
||||
padding: 40rpx 0;
|
||||
|
||||
.u-input {
|
||||
padding: 16rpx !important;
|
||||
margin-bottom: 60rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 32rpx !important;
|
||||
height: 80rpx;
|
||||
color: #999999;
|
||||
border-bottom: 1px solid #000;
|
||||
@ -475,6 +481,10 @@ export default {
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.yan-zheng-ma-input-block {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.input-label {
|
||||
min-width: 100rpx;
|
||||
margin-right: 20px;
|
||||
@ -490,7 +500,7 @@ export default {
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
margin: 40rpx 56rpx;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.btn-login {
|
||||
width: 300px;
|
||||
@ -498,7 +508,7 @@ export default {
|
||||
border: none;
|
||||
letter-spacing: 10px;
|
||||
font-size: 16px;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -519,7 +529,7 @@ export default {
|
||||
color: #ccc;
|
||||
|
||||
.agreement-item {
|
||||
color: #4b71ff;
|
||||
color: $base-color;
|
||||
}
|
||||
}
|
||||
|
||||
@ -556,7 +566,7 @@ export default {
|
||||
font-size: 24rpx;
|
||||
border: none;
|
||||
color: #fff;
|
||||
background-color: rgba(245, 154, 35, 1);
|
||||
background-color: $base-color;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
@ -575,4 +585,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
<view class="company-info">
|
||||
<view class="company-info-content">
|
||||
<view class="company-name">小发同城商家版APP</view>
|
||||
<view class="company-tips">{{
|
||||
companyInfo.site_meta_description
|
||||
}}</view>
|
||||
<view class="company-tips">
|
||||
{{ companyInfo.site_meta_description }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="company-logo"></view>
|
||||
</view>
|
||||
@ -100,7 +100,7 @@ export default {
|
||||
|
||||
.company-logo {
|
||||
margin-left: 20rpx;
|
||||
width: 160rpx;
|
||||
width: 200rpx;
|
||||
height: 160rpx;
|
||||
background-image: url("../../../static/logo-2.png");
|
||||
background-size: 100% 100%;
|
||||
@ -132,4 +132,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -12,8 +12,9 @@
|
||||
v-if="tableData.length > 0"
|
||||
class="btn-addPrinter"
|
||||
@click="showPopup = true"
|
||||
>新增打印机</view
|
||||
>
|
||||
新增打印机
|
||||
</view>
|
||||
</template>
|
||||
</u-navbar>
|
||||
<u-search
|
||||
@ -48,9 +49,9 @@
|
||||
v-for="(item, index) of tableData"
|
||||
:key="index + item.num"
|
||||
>
|
||||
<view class="table-td-item table-td-name">{{
|
||||
item.printer_name
|
||||
}}</view>
|
||||
<view class="table-td-item table-td-name">
|
||||
{{ item.printer_name }}
|
||||
</view>
|
||||
<view class="table-td-item table-td-num">{{ item.printer_sn }}</view>
|
||||
<view class="table-td-item">
|
||||
<u-switch
|
||||
@ -174,15 +175,14 @@
|
||||
></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<view class="tips"
|
||||
>*
|
||||
80mm宽度仅支持“飞蛾打印机(新接口)”“芯烨云打印机”两种品牌。</view
|
||||
>
|
||||
<view class="tips">
|
||||
* 80mm宽度仅支持“飞蛾打印机(新接口)”“芯烨云打印机”两种品牌。
|
||||
</view>
|
||||
</u--form>
|
||||
<view class="btn-content">
|
||||
<u-button class="btn-next" @click="submit">{{
|
||||
isAdd ? "添加" : "修改"
|
||||
}}</u-button>
|
||||
<u-button class="btn-next" @click="submit">
|
||||
{{ isAdd ? "添加" : "修改" }}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
@ -202,8 +202,7 @@
|
||||
:keyName="'model_name'"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
>
|
||||
</u-picker>
|
||||
></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -467,11 +466,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.printerList-container {
|
||||
overflow: hidden;
|
||||
|
||||
.btn-addPrinter {
|
||||
color: #f59a23;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.search {
|
||||
@ -570,7 +570,7 @@ export default {
|
||||
|
||||
.btn-next {
|
||||
border-radius: 16rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ export default {
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
border-radius: 64rpx;
|
||||
color: #fff;
|
||||
}
|
||||
@ -615,4 +615,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -116,9 +116,9 @@
|
||||
</u-form-item>
|
||||
<u-form-item label="" prop="store_name" v-if="form.company">
|
||||
<view class="shop-description">
|
||||
<view class="title"
|
||||
>店铺介绍(只支持简单的文字,具体请去PC端修改)</view
|
||||
>
|
||||
<view class="title">
|
||||
店铺介绍(只支持简单的文字,具体请去PC端修改)
|
||||
</view>
|
||||
<u--textarea
|
||||
class="textarea"
|
||||
border="surround"
|
||||
@ -226,7 +226,7 @@ export default {
|
||||
sizeType: ["compressed"],
|
||||
success: async (res) => {
|
||||
var imgUrl = res.tempFilePaths[0];
|
||||
|
||||
|
||||
let result = await UploadFilePromise(imgUrl);
|
||||
if (result && result.status == 200) {
|
||||
that.form.store_logo = result.data.url;
|
||||
@ -264,6 +264,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.shopInfo-container {
|
||||
height: calc(100vh - 88rpx);
|
||||
background: #f6f6f6;
|
||||
@ -330,8 +331,8 @@ export default {
|
||||
.btn-submit {
|
||||
height: 88rpx;
|
||||
border-radius: 48rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -70,6 +70,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.shopQRcode-container {
|
||||
.img-contetn {
|
||||
display: flex;
|
||||
@ -85,8 +86,8 @@ export default {
|
||||
padding: 32rpx;
|
||||
text-align: center;
|
||||
border-radius: 12rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<view class="versions-container">
|
||||
<view class="logo-content"></view>
|
||||
<view class="versions-content">版本号:{{ versionNumber }}</view>
|
||||
<view class="versions-content">appVersionCode:{{ appVersionCode }}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -10,24 +11,14 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
versionNumber: "",
|
||||
appVersionCode: "", //热更新
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
// 获取当前app的版本
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
// 应用程序版本号
|
||||
// 条件编译,只在H5渲染
|
||||
// #ifdef H5
|
||||
this.versionNumber = systemInfo.appVersion;
|
||||
console.log(systemInfo.appVersion, "版本号");
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
this.versionNumber = res.appVersion;
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
this.appVersionCode = systemInfo.appVersionCode;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -46,4 +37,4 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
backgroundColor="#fff"
|
||||
:height="88"
|
||||
color="#888"
|
||||
selectedColor="#4b71ff"
|
||||
sliderBgColor="#4b71ff"
|
||||
selectedColor="#fe4119"
|
||||
sliderBgColor="#fe4119"
|
||||
:bold="true"
|
||||
:width="width"
|
||||
unlined
|
||||
@ -39,7 +39,7 @@
|
||||
color="#888"
|
||||
selectedColor="#fff"
|
||||
:bold="true"
|
||||
sliderBgColor="#4b71ff"
|
||||
sliderBgColor="#fe4119"
|
||||
></tui-tabs>
|
||||
</view>
|
||||
<view
|
||||
@ -84,7 +84,7 @@
|
||||
<favorite-loading
|
||||
class="order-loading"
|
||||
v-show="showOrderLoading"
|
||||
:color="'#4b71ff'"
|
||||
:color="'#fe4119'"
|
||||
text=""
|
||||
animation="spinner15"
|
||||
></favorite-loading>
|
||||
@ -333,7 +333,7 @@
|
||||
<favorite-loading
|
||||
class="order-loading"
|
||||
v-show="showOrderLoading"
|
||||
:color="'#4b71ff'"
|
||||
:color="'#fe4119'"
|
||||
text=""
|
||||
animation="spinner15"
|
||||
></favorite-loading>
|
||||
@ -583,7 +583,7 @@
|
||||
<favorite-loading
|
||||
class="order-loading"
|
||||
v-show="showOrderLoading"
|
||||
:color="'#4b71ff'"
|
||||
:color="'#fe4119'"
|
||||
text=""
|
||||
animation="spinner15"
|
||||
></favorite-loading>
|
||||
@ -1021,17 +1021,18 @@ export default {
|
||||
this.orderInfo = res.data;
|
||||
}
|
||||
|
||||
this.tabs[0].num = this.orderInfo.order_count.same_city_order_count; // 同城订单总数
|
||||
// this.tabs[2].num = this.orderInfo.order_count.logistics_order_count; // 物流订单总数
|
||||
// this.tabs[3].num = this.orderInfo.order_count.all_order_count; //所有订单总数
|
||||
|
||||
this.tabs2[0].num =
|
||||
this.orderInfo.order_count.same_city_order.progress_count; // 同城进行中订单数量
|
||||
this.tabs2[1].num =
|
||||
this.orderInfo.order_count.same_city_order.overtime_count; // 同城超时异常订单数量
|
||||
this.tabs2[2].num =
|
||||
this.orderInfo.order_count.same_city_order.refund_count; // 同城退款订单数量
|
||||
if (this.orderInfo.order_count) {
|
||||
this.tabs[0].num = this.orderInfo.order_count.same_city_order_count; // 同城订单总数
|
||||
// this.tabs[2].num = this.orderInfo.order_count.logistics_order_count; // 物流订单总数
|
||||
// this.tabs[3].num = this.orderInfo.order_count.all_order_count; //所有订单总数
|
||||
|
||||
this.tabs2[0].num =
|
||||
this.orderInfo.order_count.same_city_order.progress_count; // 同城进行中订单数量
|
||||
this.tabs2[1].num =
|
||||
this.orderInfo.order_count.same_city_order.overtime_count; // 同城超时异常订单数量
|
||||
this.tabs2[2].num =
|
||||
this.orderInfo.order_count.same_city_order.refund_count; // 同城退款订单数量
|
||||
}
|
||||
if (res.data.order_page_list.records.length <= 0) {
|
||||
this.showOrderLoading = false;
|
||||
this.isNoOrderData = true;
|
||||
@ -1149,6 +1150,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.index-container {
|
||||
// overflow: hidden;
|
||||
background: #f5f5f5;
|
||||
@ -1287,7 +1289,7 @@ export default {
|
||||
.delivery-status {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #4b71ff;
|
||||
color: $base-color;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1331,7 +1333,7 @@ export default {
|
||||
height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 32rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
@ -1359,7 +1361,7 @@ export default {
|
||||
.order-remark {
|
||||
margin: 12rpx;
|
||||
padding: 12rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -1454,7 +1456,7 @@ export default {
|
||||
height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 32rpx;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
@ -45,8 +45,9 @@
|
||||
:hair-line="false"
|
||||
size="mini"
|
||||
@click="getSmsCode"
|
||||
>{{ parseInt(verifyText) > 0 ? `${verifyText}S` : verifyText }}</u-button
|
||||
>
|
||||
{{ parseInt(verifyText) > 0 ? `${verifyText}S` : verifyText }}
|
||||
</u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
@ -59,14 +60,15 @@
|
||||
:ripple-bg-color="'rgba(0, 0, 0, 0.15)'"
|
||||
:loading="isLoading"
|
||||
@click="handleRegister"
|
||||
>注册</u-button
|
||||
>
|
||||
注册
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="agreement-content">
|
||||
<!-- <view class="agreement-content">
|
||||
注册代表你已经同意<text @click="handerSkip()" class="agreement-item"
|
||||
>《用户协议》</text
|
||||
>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
@ -237,6 +239,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.register-container {
|
||||
overflow: hidden;
|
||||
.title {
|
||||
@ -247,7 +250,7 @@ export default {
|
||||
}
|
||||
|
||||
.register-content {
|
||||
padding: 14% 40rpx 0 40rpx;
|
||||
padding: 12% 40rpx 0 40rpx;
|
||||
|
||||
.register-block {
|
||||
width: 200rpx;
|
||||
@ -300,8 +303,8 @@ export default {
|
||||
margin: 68rpx 44rpx;
|
||||
|
||||
.u-input {
|
||||
padding: 16rpx !important;
|
||||
margin-bottom: 60rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 32rpx !important;
|
||||
height: 80rpx;
|
||||
color: #999999;
|
||||
border-bottom: 1px solid #000;
|
||||
@ -328,7 +331,7 @@ export default {
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
margin: 120rpx 56rpx;
|
||||
margin: 120rpx 0;
|
||||
|
||||
.btn-register {
|
||||
width: 300px;
|
||||
@ -336,7 +339,7 @@ export default {
|
||||
border: none;
|
||||
letter-spacing: 10px;
|
||||
font-size: 16px;
|
||||
background: #4b71ff;
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@ -350,7 +353,7 @@ export default {
|
||||
color: #ccc;
|
||||
|
||||
.agreement-item {
|
||||
color: #4b71ff;
|
||||
color: $base-color;
|
||||
}
|
||||
}
|
||||
|
||||
@ -387,7 +390,7 @@ export default {
|
||||
font-size: 24rpx;
|
||||
border: none;
|
||||
color: #fff;
|
||||
background-color: rgba(245, 154, 35, 1);
|
||||
background-color: #fe4119;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
@ -406,4 +409,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 52 KiB |
BIN
java-mall-app-shop-admin/static/no-im-msg.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 52 KiB |
30
java-mall-app-shop-admin/store/modules/order.js
Normal file
@ -0,0 +1,30 @@
|
||||
import { GetOrderPush } from "../../api/user";
|
||||
|
||||
const defaultState = () => {
|
||||
return {
|
||||
pushOrderInfo: {},
|
||||
};
|
||||
};
|
||||
|
||||
const state = defaultState();
|
||||
|
||||
const getters = {};
|
||||
|
||||
const mutations = {};
|
||||
|
||||
const actions = {
|
||||
async getOrderPush() {
|
||||
let res = await GetOrderPush();
|
||||
if (res && res.status) {
|
||||
debugger;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
mutations,
|
||||
actions,
|
||||
};
|
||||
@ -33,7 +33,7 @@ const mutations = {
|
||||
state.auditStatusInfo = auditStatusInfo;
|
||||
},
|
||||
LOGIN_OUT(state) {
|
||||
state.userInfo = "";
|
||||
state.userInfo = {};
|
||||
state.uid = "";
|
||||
state.ukey = "";
|
||||
state.auditStatusInfo = {
|
||||
@ -132,27 +132,27 @@ const actions = {
|
||||
},
|
||||
async LoginOut({ commit }, isTokenExpires) {
|
||||
if (isTokenExpires) {
|
||||
let result = await OutLogin();
|
||||
await OutLogin();
|
||||
|
||||
if (result && result.status == 200) {
|
||||
uni.removeStorageSync("ukey");
|
||||
uni.removeStorageSync("uid");
|
||||
uni.removeStorageSync("accountDashboard");
|
||||
uni.removeStorageSync("approvalStatus");
|
||||
uni.removeStorageSync("auditInfo");
|
||||
uni.removeStorageSync("auditId");
|
||||
uni.removeStorageSync("contractDownloadUrl");
|
||||
uni.removeStorageSync("pdfjs.history");
|
||||
uni.removeStorageSync("userInfo");
|
||||
uni.removeStorageSync("ukey");
|
||||
uni.removeStorageSync("uid");
|
||||
uni.removeStorageSync("accountDashboard");
|
||||
uni.removeStorageSync("approvalStatus");
|
||||
uni.removeStorageSync("auditInfo");
|
||||
uni.removeStorageSync("auditId");
|
||||
uni.removeStorageSync("contractDownloadUrl");
|
||||
uni.removeStorageSync("pdfjs.history");
|
||||
uni.removeStorageSync("userInfo");
|
||||
uni.removeStorageSync("typeItem");
|
||||
uni.removeStorageSync("locationItem");
|
||||
uni.removeStorageSync("district_data");
|
||||
uni.removeStorageSync("auditItem");
|
||||
|
||||
commit("LOGIN_OUT");
|
||||
commit("LOGIN_OUT");
|
||||
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login",
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -161,26 +161,22 @@ const actions = {
|
||||
content: `您是否要退出登录?`,
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
let res = await OutLogin();
|
||||
if (res && res.status == 200) {
|
||||
uni.removeStorageSync("ukey");
|
||||
uni.removeStorageSync("uid");
|
||||
uni.removeStorageSync("accountDashboard");
|
||||
uni.removeStorageSync("approvalStatus");
|
||||
uni.removeStorageSync("auditInfo");
|
||||
uni.removeStorageSync("auditId");
|
||||
uni.removeStorageSync("contractDownloadUrl");
|
||||
uni.removeStorageSync("pdfjs.history");
|
||||
uni.removeStorageSync("userInfo");
|
||||
await OutLogin();
|
||||
uni.removeStorageSync("ukey");
|
||||
uni.removeStorageSync("uid");
|
||||
uni.removeStorageSync("accountDashboard");
|
||||
uni.removeStorageSync("approvalStatus");
|
||||
uni.removeStorageSync("auditInfo");
|
||||
uni.removeStorageSync("auditId");
|
||||
uni.removeStorageSync("contractDownloadUrl");
|
||||
uni.removeStorageSync("pdfjs.history");
|
||||
uni.removeStorageSync("userInfo");
|
||||
|
||||
commit("LOGIN_OUT");
|
||||
commit("LOGIN_OUT");
|
||||
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login",
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login",
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
},
|
||||
@ -201,13 +197,20 @@ const actions = {
|
||||
let { approval_status, signed_status, store_status } = res.data;
|
||||
|
||||
//2-未通过;3-待审核;4-未申请过;5-已提交审核;'
|
||||
if ([2, 3, 4, 5].includes(approval_status)) {
|
||||
if ([2, 3, 5].includes(approval_status)) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/audit/checkAudit",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (approval_status == 4) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/audit/shop1",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 合同签署状态:
|
||||
// -1:预备数据阶段;0-等待签署;1-已部分签署;
|
||||
// 2 - 已完成(所有签署方完成签署)3 - 已撤销(发起方撤销签署任务)
|
||||
|
||||
2
java-mall-app-shop-admin/styles/variables.scss
Normal file
@ -0,0 +1,2 @@
|
||||
/*主颜色*/
|
||||
$base-color: #fe4119; // 蓝色 #4b71ff
|
||||
@ -1,13 +1,13 @@
|
||||
import axios from 'axios';
|
||||
import config from '../config/config';
|
||||
import axiosAdapterUniapp from 'axios-adapter-uniapp';
|
||||
import $store from '../store/index';
|
||||
import axios from "axios";
|
||||
import config from "../config/config";
|
||||
import axiosAdapterUniapp from "axios-adapter-uniapp";
|
||||
import $store from "../store/index";
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: config.baseApi, // url = base url + request url
|
||||
headers: {
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Content-Type': 'application/json-patch+json',
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"Content-Type": "application/json-patch+json",
|
||||
},
|
||||
adapter: axiosAdapterUniapp,
|
||||
timeout: 5000, // request timeout
|
||||
@ -16,8 +16,8 @@ const service = axios.create({
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
(config) => {
|
||||
if (uni.getStorageSync('ukey')) {
|
||||
config.headers['Authorization'] = 'Bearer ' + uni.getStorageSync('ukey');
|
||||
if (uni.getStorageSync("ukey")) {
|
||||
config.headers["Authorization"] = "Bearer " + uni.getStorageSync("ukey");
|
||||
}
|
||||
|
||||
return config;
|
||||
@ -37,7 +37,7 @@ service.interceptors.response.use(
|
||||
if (res.status == 250) {
|
||||
uni.showToast({
|
||||
title: `提示${res.msg}`,
|
||||
icon: 'error',
|
||||
icon: "error",
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
@ -45,11 +45,11 @@ service.interceptors.response.use(
|
||||
if (res.code == 30) {
|
||||
uni.showToast({
|
||||
title: `token已经过期需要重新登录`,
|
||||
icon: 'error',
|
||||
icon: "error",
|
||||
duration: 1000,
|
||||
});
|
||||
|
||||
$store.dispatch('user/LoginOut', true);
|
||||
$store.dispatch("user/LoginOut", true);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -57,7 +57,7 @@ service.interceptors.response.use(
|
||||
return res;
|
||||
},
|
||||
(error) => {
|
||||
console.log('err' + error); // for debug
|
||||
console.log("err" + error); // for debug
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
@ -2,29 +2,29 @@ module.exports = {
|
||||
devServer: {
|
||||
port: 8080,
|
||||
proxy: {
|
||||
'/mobile': {
|
||||
"/mobile": {
|
||||
// 匹配所有以 /mobile 开头的请求路径
|
||||
target: 'https://mall.gpxscs.cn', // 目标服务器
|
||||
target: "https://mall.gpxscs.cn", // 目标服务器
|
||||
changeOrigin: true, // 是否改变请求源
|
||||
pathRewrite: {
|
||||
'^/mobile': '/mobile',
|
||||
"^/mobile": "/mobile",
|
||||
},
|
||||
},
|
||||
'/api/admin': {
|
||||
"/api/admin": {
|
||||
// 匹配所有以 /api 开头的请求路径
|
||||
target: 'https://mall.gpxscs.cn', // 目标服务器
|
||||
target: "https://mall.gpxscs.cn", // 目标服务器
|
||||
changeOrigin: true, // 是否改变请求源
|
||||
pathRewrite: {
|
||||
'^/api/admin': '/api/admin',
|
||||
"^/api/admin": "/api/admin",
|
||||
},
|
||||
},
|
||||
'/api/mobile': {
|
||||
"/api/mobile": {
|
||||
// 匹配所有以 /api/mobile 开头的请求路径
|
||||
target: 'https://mall.gpxscs.cn', // 目标服务器
|
||||
target: "https://mall.gpxscs.cn", // 目标服务器
|
||||
changeOrigin: true, // 是否改变请求源
|
||||
logLevel: 'debug',
|
||||
logLevel: "debug",
|
||||
pathRewrite: {
|
||||
'^/api/mobile': '/api/mobile',
|
||||
"^/api/mobile": "/api/mobile",
|
||||
},
|
||||
},
|
||||
// '/signed':{
|
||||
|
||||