You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
183 lines
3.1 KiB
Vue
183 lines
3.1 KiB
Vue
<script>
|
|
import {
|
|
getUpdateManager,
|
|
setHeaderHeight
|
|
} from "./utils/app";
|
|
import utils from "./utils/utils.js";
|
|
|
|
// #ifdef MP-ALIPAY
|
|
// 商品详情组件
|
|
const pluginGoodsEdit = requirePlugin('theGoodsEdit')
|
|
// #endif
|
|
|
|
// #ifdef MP-ALIPAY
|
|
// 本地生活商品插件集成sop
|
|
if (!my.canIUse('groupPurchaseoucherPlugin') && !my.isIDE) {
|
|
// my.ap && my.ap.updateAlipayClient && my.ap.updateAlipayClient(); // 如果动态加载不可用则打开支付宝客户端升级界面
|
|
}
|
|
// #endif
|
|
|
|
export default {
|
|
onLaunch(options) {
|
|
// #ifdef MP-ALIPAY
|
|
// 商品详情组件
|
|
if (pluginGoodsEdit) {
|
|
pluginGoodsEdit.setPlaceOrderCallback((arg) => {
|
|
// console.log(arg, 'arg')
|
|
uni.redirectTo({
|
|
url: arg.outItemId ? '/subPackages/goods/goods/index?id=' + arg.outItemId :
|
|
'/pages/index/index', // 跳转到小程序的下单页面地址
|
|
});
|
|
})
|
|
}
|
|
// #endif
|
|
|
|
this.initLog({
|
|
mch_id: 0
|
|
}) // 访问记录
|
|
getUpdateManager();
|
|
setHeaderHeight();
|
|
},
|
|
onShow(options) {
|
|
|
|
},
|
|
onHide() {
|
|
// console.log("App Hide");
|
|
},
|
|
methods: {}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
/*每个页面公共css */
|
|
@import "@/uni_modules/uview-ui/index.scss";
|
|
@import "@/static/css/common.scss";
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: #f2f2f2;
|
|
min-height: 100%;
|
|
font-family: PingFang SC, Arial, 'Helvetica Neue', Helvetica, sans-serif;
|
|
}
|
|
|
|
.g-price {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.fwb {
|
|
position: relative;
|
|
top: -2rpx;
|
|
font-weight: bold;
|
|
font-size: 32rpx;
|
|
line-height: 1;
|
|
}
|
|
}
|
|
|
|
.tabbar-page {
|
|
padding-bottom: 120rpx;
|
|
padding-bottom: calc(constant(safe-area-inset-bottom) + 120rpx);
|
|
padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
|
|
box-sizing: border-box;
|
|
background: #f2f2f2;
|
|
min-height: 100%;
|
|
}
|
|
|
|
.m-form {
|
|
background: #fff;
|
|
}
|
|
|
|
.m-form-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 10rpx 20rpx;
|
|
|
|
&.top {
|
|
padding-top: 24rpx;
|
|
align-items: start;
|
|
}
|
|
}
|
|
|
|
.m-form-label {
|
|
min-width: 150rpx;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.m-form-rig {
|
|
display: flex;
|
|
align-items: center;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
margin-left: 10rpx;
|
|
}
|
|
|
|
.m-form-inp {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
|
|
::v-deep {
|
|
.u-input {
|
|
height: 80rpx;
|
|
}
|
|
|
|
.u-textarea {
|
|
padding: 0 !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
.m-form-switch {
|
|
display: flex;
|
|
justify-content: center;
|
|
text-align: right;
|
|
}
|
|
|
|
.jcsb {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
// .m-form-textarea {
|
|
// margin: 10rpx 0;
|
|
// padding: 0;
|
|
// }
|
|
.clearfix::after {
|
|
clear: both;
|
|
content: " ";
|
|
display: block;
|
|
height: 0;
|
|
line-height: 0;
|
|
visibility: hidden;
|
|
font-size: 0;
|
|
}
|
|
|
|
// 隐藏库存
|
|
.goodsPop {
|
|
.info {
|
|
.stock {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.empty_no {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 26rpx;
|
|
}
|
|
|
|
.line-1 {
|
|
display: -webkit-box !important;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
word-break: break-all;
|
|
-webkit-line-clamp: 1;
|
|
-webkit-box-orient: vertical !important;
|
|
}
|
|
</style> |