# 2022-01-19

### 1.3.2 开源社区版(会员专业版同步修改):
【修复】修复前端首页【文章分类】组件会显示未设置为发布标签的文章问题;优化文章展示样式。#I4RA0C
【修复】修复前端首页【文章组】展示样式。
【修复】修复后端订单列表【支付】按钮异常问题。#I4QWAN
【修复】删除商品编辑界面的商品的重量,只保留sku的重量,防止引起歧义。#I4QESQ

### 0.1.0 会员专业版:
【升级】更新uview为v2.0.22版本。
【新增】微信直播组件增加上传图片到微信服务器功能。
【优化】优化升级uview后多个页面商品展示列表图片高度缩略问题。
【修复】修复商品预览数据未加载成功错误。
This commit is contained in:
JianWeie
2022-01-20 02:26:19 +08:00
parent 1daee7e948
commit 261b8e8dd3
33 changed files with 140 additions and 86 deletions

View File

@@ -497,7 +497,7 @@ namespace CoreCms.Net.Services
var articleClassifyId = parameters["articleClassifyId"].ObjectToInt(0);
var limit = parameters["limit"].ObjectToInt(0);
limit = limit > 0 ? limit : 20;
var list = await _articleServices.QueryPageAsync(p => p.typeId == articleClassifyId,
var list = await _articleServices.QueryPageAsync(p => p.typeId == articleClassifyId && p.isPub == true,
p => p.createTime, OrderByType.Desc, 1, limit);
if (list != null && list.Any())
{

View File

@@ -45,7 +45,7 @@
<style lang="scss" scoped>
.coreshop-index-article { border-radius: 8px; padding: 0px 10px; background: #FFFFFF !important; color: #333333 !important; overflow: hidden;
.coreshop-cell-item { padding: 5px 0px 5px 0; float: left; width: 100%; border-bottom: 1px solid #f3f3f3;
.coreshop-cell-item-bd { float: left; width: calc(100% - 100px);
.coreshop-cell-item-bd { float: left; display: flex; flex-direction: column;
.article-title { font-size: 14px; color: #333; width: 100%; overflow: hidden; float: left; margin-bottom: 5px; }
.article-des { font-size: 12px; color: #999; overflow: hidden; float: left; line-height: 20px; }
}

View File

@@ -10,7 +10,7 @@
<u-grid :col="coreshopdata.parameters.column" :border="false" align="left">
<u-grid-item :custom-style="{padding: '0px'}" v-for="(item, index) in coreshopdata.parameters.list" :key="index">
<view class="good_box" @tap="goGoodsDetail(item.id)">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="100%" :height="[coreshopdata.parameters.column==2?'164px':'104px']" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>
@@ -58,7 +58,7 @@
<u-grid :col="1" :border="false" align="left">
<u-grid-item :custom-style="{padding: '0px'}" v-for="item in coreshopdata.parameters.list" :key="item.id">
<view class="good_box" @click="goGoodsDetail(item.id)">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>
@@ -92,7 +92,7 @@
<u-grid :col="coreshopdata.parameters.column" :border="false" align="left">
<u-grid-item v-for="(item, index) in coreshopdata.parameters.list" v-if="index >=coreshopdata.parameters.column*no && index <coreshopdata.parameters.column*(no+1)" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u-image :src="item.image" :index="item.id" mode="widthFit" width="100%" :height="coreshopdata.parameters.column==3?'120px':coreshopdata.parameters.column==2?'176px':''" radius="10">
<u-image :src="item.image" :index="item.id" mode="widthFit" width="100%" :height="coreshopdata.parameters.column==3?'104px':coreshopdata.parameters.column==2?'164px':''" radius="10">
</u-image>
<view class="good_title u-line-2">
{{item.name}}
@@ -171,7 +171,7 @@
</script>
<style scoped lang="scss">
.goodsBox { border-radius: 8px; color: #333333 !important; padding: 0 5px;
.goodsBox { border-radius: 8px; color: #333333 !important; padding: 0 5px; overflow: hidden;
.good_box { border-radius: 8px; margin: 3px; background-color: #ffffff; padding: 5px; position: relative;
.good_title { font-size: 13px; margin-top: 5px; color: $u-main-color; }
.good_title-xl { font-size: 14px; margin-top: 5px; color: $u-main-color; }

View File

@@ -213,7 +213,7 @@
<scroll-view class="recommend-scroll" scroll-x>
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
<u--image :src="items.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2">{{items.name}}</view>
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
{{items.price}}
@@ -245,7 +245,7 @@
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherRecommendData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>

View File

@@ -253,7 +253,7 @@
<scroll-view class="recommend-scroll" scroll-x>
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
<u--image :src="items.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
<view class="u-line-1-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2" style="height: 32px;">{{items.name}}</view>
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
{{items.price}}
@@ -356,7 +356,7 @@
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherRecommendData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>

View File

@@ -217,7 +217,7 @@
<scroll-view class="recommend-scroll" scroll-x>
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
<u--image :src="items.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2">{{items.name}}</view>
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
{{items.price}}
@@ -249,7 +249,7 @@
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherRecommendData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>

View File

@@ -6,9 +6,9 @@
<!-- 条件筛选 -->
<view class="coreshop-justify-center coreshop-bg-white">
<fy-dropdown :menuList="menuList" ref="uDropdown">
<fy-dropdown-item v-model="comprehensiveDataValue" dropdownKey="synthesis" title="综合" :options="comprehensiveData" @change="comprehensive"></fy-dropdown-item>
<fy-dropdown-item v-model="priceSortDataValue" dropdownKey="price" title="价格" :options="priceSortData" @change="priceSort"></fy-dropdown-item>
<fy-dropdown-item v-model="salesVolumeDataValue" dropdownKey="sales" title="销量" :options="salesVolumeData" @change="salesVolume"></fy-dropdown-item>
<fy-dropdown-item v-model="comprehensiveDataValue" dropdownKey="synthesis" title="综合" :options="comprehensiveData" @change="comprehensive"></fy-dropdown-item>
<fy-dropdown-item v-model="priceSortDataValue" dropdownKey="price" title="价格" :options="priceSortData" @change="priceSort"></fy-dropdown-item>
<fy-dropdown-item v-model="salesVolumeDataValue" dropdownKey="sales" title="销量" :options="salesVolumeData" @change="salesVolume"></fy-dropdown-item>
<fy-dropdown-item v-model="current" title="显示" :options="currentData"></fy-dropdown-item>
<fy-dropdown-item title="其他" dropdownKey="other" :custom="true">
<view class="slot-content coreshop-bg-white">
@@ -92,7 +92,7 @@
<u-grid :col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '1px'}" v-for="item in goodsList" :key="item.id" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" :index="item.id" width="100%" mode="widthFix" radius="10"></u--image>
<u--image :src="item.image" :index="item.id" width="100%" height="167px" mode="widthFix" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>
@@ -167,9 +167,9 @@
</template>
<script>
export default {
data() {
return {
title: '列表',

View File

@@ -166,7 +166,7 @@
<scroll-view class="recommend-scroll" scroll-x>
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
<u--image :src="items.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2">{{items.name}}</view>
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
{{items.price}}
@@ -259,7 +259,7 @@
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherRecommendData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>

View File

@@ -400,7 +400,7 @@
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>

View File

@@ -184,7 +184,7 @@
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherRecommendData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
</view>

View File

@@ -1,3 +1,21 @@
## 2.0.222022-01-19
# uView2.0重磅发布,利剑出鞘,一统江湖
1. $u.page()方法优化,避免在特殊场景可能报错的问题
2. picker组件添加immediateChange参数
3. 新增$u.pages()方法
## 2.0.212022-01-19
# uView2.0重磅发布,利剑出鞘,一统江湖
1. 优化form组件在用户设置rules的时候提示用户model必传
2. 优化遗留的通过正则判断rpx单位的问题
3. 修复微信小程序环境中tabbar组件开启safeAreaInsetBottom属性后placeholder高度填充不正确
4. 修复swiper在current指定非0时缩放有误
5. 修复u-icon添加stop属性的时候报错
6. 修复upload组件在accept=all的时候没有作用
7. 修复在text组件mode为phone时call属性无效的问题
8. 处理u-form clearValidate方法
9. 其他修复
## 2.0.202022-01-14
# uView2.0重磅发布,利剑出鞘,一统江湖

View File

@@ -64,15 +64,7 @@
return style
},
show() {
let top
// 如果是rpx转为px
if (/rpx$/.test(this.top)) {
top = uni.rpx2px(parseInt(this.top))
} else {
// 如果px通过parseInt获取其数值部分
top = parseInt(this.top)
}
return this.scrollTop > top
return uni.$u.getPx(this.scrollTop) > uni.$u.getPx(this.top)
},
contentStyle() {
const style = {}

View File

@@ -87,7 +87,7 @@
* @property {String} rightIcon 右侧图标
* @property {String} leftIcon 左侧图标
* @property {Boolean} required 是否显示左边的必填星号只作显示用具体校验必填的逻辑请在rules中配置 (默认 false )
*
*
* @example <u-form-item label="姓名" prop="userInfo.name" borderBottom ref="item1"></u-form-item>
*/
export default {

View File

@@ -90,6 +90,10 @@
setRules(rules) {
// 判断是否有规则
if (Object.keys(rules).length === 0) return;
if (Object.keys(this.model).length === 0) {
uni.$u.error('设置rulesmodel必须设置');
return;
};
this.formRules = rules;
// 重新将规则赋予Validator
this.validator = new Schema(rules);
@@ -112,13 +116,17 @@
props = [].concat(props);
this.children.map((child) => {
// 如果u-form-item的prop在props数组中则清除对应的校验结果信息
if (props.includes(child.prop)) {
if (props.includes(child.props)) {
child.message = null;
}
});
},
// 对部分表单字段进行校验
async validateField(value, callback, event = null) {
if (Object.keys(this.formRules).length === 0) {
uni.$u.error('未设置rules请看文档说明');
return;
}
// $nextTick是必须的否则model的变更可能会延后于此方法的执行
this.$nextTick(() => {
// 校验错误信息返回给回调方法用于存放所有form-item的错误信息

View File

@@ -139,7 +139,7 @@
clickHandler(e) {
this.$emit('click', this.index)
// 是否阻止事件冒泡
this.stop && uni.$u.preventEvent(e)
this.stop && this.preventEvent(e)
}
}
}

View File

@@ -19,9 +19,7 @@
:lazy-load="lazyLoad"
class="u-image__image"
:style="{
borderRadius: shape == 'circle' ? '10000px' : $u.addUnit(radius),
width: $u.addUnit(width),
height: $u.addUnit(height)
borderRadius: shape == 'circle' ? '10000px' : $u.addUnit(radius)
}"
></image>
<view
@@ -117,9 +115,10 @@
if (!n) {
// 如果传入null或者''或者false或者undefined标记为错误状态
this.isError = true
this.loading = false
} else {
this.isError = false
this.loading = false
}
}
}
@@ -127,6 +126,9 @@
computed: {
wrapStyle() {
let style = {};
// 通过调用addUnit()方法如果有单位如百分比px单位等直接返回如果是纯粹的数值则加上rpx单位
style.width = this.$u.addUnit(this.width);
style.height = this.$u.addUnit(this.height);
// 如果是显示圆形,设置一个很多的半径值即可
style.borderRadius = this.shape == 'circle' ? '10000px' : uni.$u.addUnit(this.radius)
// 如果设置圆角必须要有hidden否则可能圆角无效
@@ -205,6 +207,11 @@
position: relative;
transition: opacity 0.5s ease-in-out;
&__image {
width: 100%;
height: 100%;
}
&__loading,
&__error {
position: absolute;

View File

@@ -18,7 +18,7 @@
<slot name="header" />
</cell>
<slot />
<cell v-if="$slots.header">
<cell v-if="$slots.footer">
<slot name="footer" />
</cell>
</list>
@@ -39,7 +39,7 @@
<slot name="header" />
</view>
<slot />
<view v-if="$slots.header">
<view v-if="$slots.footer">
<slot name="footer" />
</view>
</scroll-view>

View File

@@ -134,8 +134,7 @@
computed: {
getCursorSpacing() {
// 判断传入的单位如果为px单位需要转成px
const number = parseInt(this.cursorSpacing)
return /rpx$/.test(String(this.cursorSpacing)) ? uni.upx2px(number) : number
return uni.$u.getPx(this.cursorSpacing)
},
// 按钮的样式
buttonStyle() {

View File

@@ -74,6 +74,11 @@ export default {
defaultIndex: {
type: Array,
default: uni.$u.props.picker.defaultIndex
}
},
// 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件只在微信2.21.1及以上有效
immediateChange: {
type: Boolean,
default: uni.$u.props.picker.immediateChange
}
}
}

View File

@@ -18,6 +18,7 @@
class="u-picker__view"
:indicatorStyle="`height: ${$u.addUnit(itemHeight)}`"
:value="innerIndex"
:immediateChange="immediateChange"
:style="{
height: `${$u.addUnit(visibleItemCount * itemHeight)}`
}"
@@ -70,6 +71,7 @@
* @property {String} keyName 选项对象中,需要展示的属性键名(默认 'text'
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器(默认 false
* @property {Array} defaultIndex 各列的默认索引
* @property {Boolean} immediateChange 是否在手指松开时立即触发change事件默认 false
* @event {Function} close 关闭选择器时触发
* @event {Function} cancel 点击取消按钮触发
* @event {Function} change 当选择值变化时触发

View File

@@ -135,13 +135,7 @@
observer && observer.disconnect()
},
getStickyTop() {
if (/rpx$/.test(this.customNavHeight)) {
// rpx单位需要转为px单位才能直接相加
this.stickyTop = parseInt(this.offsetTop) + parseInt(uni.rpx2px(this.customNavHeight))
} else {
// 无论customNavHeight为数值(默认px单位)还是12px(parseInt后为12)之类转换后都为数值,可以直接相加
this.stickyTop = parseInt(this.offsetTop) + parseInt(this.customNavHeight)
}
this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight)
},
async checkSupportCssSticky() {
// #ifdef H5

View File

@@ -159,7 +159,7 @@ export default {
// subsection模式下激活时默认为白色的文字
if (this.mode === "subsection") {
style.color =
this.current === index ? "#fff" : this.activeColor;
this.current === index ? "#fff" : this.inactiveColor;
} else {
// button模式下激活时文字颜色默认为activeColor
style.color =

View File

@@ -131,6 +131,12 @@
currentIndex: 0
}
},
watch: {
current(val, preVal) {
if(val === preVal) return;
this.currentIndex = val; // 和上游数据关联上
}
},
computed: {
itemStyle() {
return index => {

View File

@@ -94,8 +94,9 @@
// 延时一定时间
await uni.$u.sleep(20)
// #ifndef APP-NVUE
this.$uGetRect('.u-tabbar__content').then(size => {
this.placeholderHeight = 50
this.$uGetRect('.u-tabbar__content').then(({height = 50}) => {
// 修复IOS safearea bottom 未填充高度
this.placeholderHeight = height
})
// #endif

View File

@@ -146,7 +146,7 @@ export default {
methods: {
clickHandler() {
// 如果为手机号模式,拨打电话
if (this.mode === 'phone' && uni.$u.test.mobile(this.text)) {
if (this.call && this.mode === 'phone' && uni.$u.test.mobile(this.text)) {
uni.makePhoneCall({
phoneNumber: this.text
})

View File

@@ -127,6 +127,25 @@ export function chooseFile({
// #endif
break
// #endif
default:
// 此为保底选项在accept不为上面任意一项的时候选取全部文件
// #ifdef MP-WEIXIN
wx.chooseMessageFile({
count: multiple ? maxCount : 1,
type: 'all',
success: (res) => resolve(formatFile(res)),
fail: reject
})
// #endif
// #ifdef H5
// 需要hx2.9.9以上才支持uni.chooseFile
uni.chooseFile({
count: multiple ? maxCount : 1,
type: 'all',
success: (res) => resolve(formatFile(res)),
fail: reject
})
// #endif
}
})
}

View File

@@ -1,5 +1,5 @@
// 此版本发布于2022-01-14
const version = '2.0.20'
// 此版本发布于2022-01-20
const version = '2.0.22'
// 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') {

View File

@@ -13,7 +13,7 @@ export default {
navbar: {
safeAreaInsetTop: true,
placeholder: false,
fixed: false,
fixed: true,
border: false,
leftIcon: 'arrow-left',
leftText: '',

View File

@@ -24,6 +24,7 @@ export default {
visibleItemCount: 5,
keyName: 'text',
closeOnClickOverlay: false,
defaultIndex: () => []
defaultIndex: () => [],
immediateChange: false
}
}

View File

@@ -69,11 +69,6 @@ function random(min, max) {
}
/**
* 本算法来源于简书开源代码详见https://www.jianshu.com/p/fdbf293d0a85
* 全局唯一标识符uuidGlobally Unique Identifier,也称作 uuid(Universally Unique IDentifier)
* 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
* 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
* v-for的时候,推荐使用后端返回的id而不是循环的index
* @param {Number} len uuid的长度
* @param {Boolean} firstU 将返回的首字母置为"u"
* @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
@@ -622,7 +617,16 @@ function setProperty(obj, key, value) {
*/
function page() {
const pages = getCurrentPages()
return `/${getCurrentPages()[pages.length - 1].route}`
// 某些特殊情况下(比如页面进行redirectTo时的一些时机)pages可能为空数组
return `/${pages[pages.length - 1]?.route ?? ''}`
}
/**
* @description 获取当前路由栈实例数组
*/
function pages() {
const pages = getCurrentPages()
return pages
}
export default {
@@ -652,5 +656,6 @@ export default {
formValidate,
getProperty,
setProperty,
page
page,
pages
}

View File

@@ -2,7 +2,7 @@
"id": "uview-ui",
"name": "uview-ui",
"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
"version": "2.0.20",
"version": "2.0.22",
"description": "uView UI已完美兼容nvue全面的组件和便捷的工具会让您信手拈来如鱼得水",
"keywords": [
"uview",

View File

@@ -77,13 +77,6 @@
</div>
<fieldset class="layui-elem-field layui-field-title site-title"><legend><a name="compress">其他参数</a></legend></fieldset>
<div class="layui-form-item">
<label for="weight" class="layui-form-label layui-form-required">重量</label>
<div class="layui-input-inline layui-inline-2">
<input name="goods[weight]" id="weight" lay-verType="tips" lay-verify="required" value="{{d.data.model.weight }}" lay-verType="tips" lay-verify="required|number" class="layui-input" placeholder="请输入重量" lay-reqText="请输入重量" />
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label for="unit" class="layui-form-label layui-form-required">单位</label>
<div class="layui-input-inline layui-inline-2">

View File

@@ -460,7 +460,7 @@
//支付
payOrder: function () {
var id = $(this).attr('data-id');
doPayOrder(id);
doPayOrder(id, 0);
},
//发货
shipOrder: function () {
@@ -534,7 +534,7 @@
var checkStatus = table.checkStatus(obj.config.id);
switch (obj.event) {
case 'payOrderArray':
doPayOrder(checkStatus);
doPayOrder(checkStatus, 1);
break;
case 'shipOrderArray':
doShip(checkStatus, 0);
@@ -1146,18 +1146,22 @@
});
}
//执行支付操作
function doPayOrder(checkStatus) {
var checkData = checkStatus.data;
if (checkData.length === 0) {
return layer.msg('请选择您要支付的数据');
}
function doPayOrder(checkStatus, type) {
var delidsStr = [];
layui.each(checkData,
function (index, item) {
delidsStr.push(item.orderId);
});
if (type == 0) {
delidsStr.push(checkStatus);
} else if (type == 1) {
var checkData = checkStatus.data;
if (checkData.length === 0) {
return layer.msg('请选择您要支付的数据');
}
layui.each(checkData,
function (index, item) {
delidsStr.push(item.orderId);
});
} else {
return layer.msg('您的支付模式有问题,请核实');
}
coreHelper.Post("Api/CoreCmsOrder/GetPay", { id: delidsStr, data: 1 }, function (e) {
if (e.code === 0) {
admin.popup({