送礼插件细节+商品详情样式优化
parent
70473e2e82
commit
8e04d39d10
|
|
@ -33,6 +33,8 @@
|
|||
"please_input": "Please enter",
|
||||
"settlement": "balance",
|
||||
"confirm_sub": "Confirm submission",
|
||||
"submit_payment": "Submit payment",
|
||||
"my_want_receive": "I want to claim it",
|
||||
"clear": "empty",
|
||||
"all": "All",
|
||||
"share": "Share",
|
||||
|
|
@ -1911,5 +1913,13 @@
|
|||
"6redfg": "Use data",
|
||||
"fu3rf1": "Please enter the card password key"
|
||||
}
|
||||
},
|
||||
"givegift-gift": {
|
||||
"givegift-gift": {
|
||||
"8yghjd": "Unlimited collection",
|
||||
"567uye": "Message reminder",
|
||||
"rtyu33": "Message prompt, maximum format of 200 characters",
|
||||
"34rrr3": "Leave a message for Ta to express gratitude!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,8 @@
|
|||
"please_input": "请输入",
|
||||
"settlement": "结算",
|
||||
"confirm_sub": "确认提交",
|
||||
"submit_payment": "提交支付",
|
||||
"my_want_receive": "我要领取",
|
||||
"clear": "清空",
|
||||
"all": "全部",
|
||||
"share": "分享",
|
||||
|
|
@ -1893,5 +1895,13 @@
|
|||
"6redfg": "使用数据",
|
||||
"fu3rf1": "请输入卡密key"
|
||||
}
|
||||
},
|
||||
"givegift-gift": {
|
||||
"givegift-gift": {
|
||||
"8yghjd": "不限领取",
|
||||
"567uye": "留言提示",
|
||||
"rtyu33": "留言提示,格式最多200个字符",
|
||||
"34rrr3": "给Ta留言表示感谢!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 支付选择 -->
|
||||
<view v-if="(total_price > 0 && common_order_is_booking != 1 && payment_list.length > 0) || plugins_coin_is_valid" class="payment-list border-radius-main bg-white oh padding-main spacing-mb">
|
||||
<view v-if="total_price > 0 && ((common_order_is_booking != 1 && payment_list.length > 0) || plugins_coin_is_valid)" class="payment-list border-radius-main bg-white oh padding-main spacing-mb">
|
||||
<!-- 虚拟币支付 -->
|
||||
<block v-if="plugins_coin_is_valid">
|
||||
<block v-for="(item, index) in plugins_coin_data.accounts_list" :key="index">
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
</block>
|
||||
</block>
|
||||
<!-- 支付方式 -->
|
||||
<view v-if="total_price > 0 && common_order_is_booking != 1 && payment_list.length > 0" :class="(plugins_coin_is_valid ? 'br-t-f9' : '')">
|
||||
<view v-if="common_order_is_booking != 1 && payment_list.length > 0" :class="(plugins_coin_is_valid ? 'br-t-f9' : '')">
|
||||
<view v-for="(item, index) in payment_list" :key="index">
|
||||
<view class="item flex-row jc-sb align-c" :data-value="item.id" :data-index="index" @tap="payment_event">
|
||||
<view class="item-content pr flex-1 flex-width">
|
||||
|
|
|
|||
|
|
@ -267,7 +267,9 @@
|
|||
background: transparent;
|
||||
}
|
||||
.goods-base-price-countdown .price-content .sales-price,
|
||||
.goods-base-price-countdown .price-content .sales-price-unit {
|
||||
.goods-base-price-countdown .price-content .sales-price-unit,
|
||||
.goods-base-price-countdown .price-content .points-price-value,
|
||||
.goods-base-price-countdown .price-content .points-price-unit {
|
||||
color: #fff !important;
|
||||
}
|
||||
.goods-base-price-countdown .price-content .original-price,
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@
|
|||
<view v-if="(goods.show_field_original_price_status || 0) == 1 && (goods_spec_base_original_price || null) != null && goods_spec_base_original_price != 0" class="item original-price single-text">{{ goods.show_original_price_symbol }}{{ goods_spec_base_original_price }}{{ goods.show_original_price_unit }}</view>
|
||||
<!-- 积分兑换 -->
|
||||
<view v-if="(goods.plugins_points_data || null) != null && (goods.plugins_points_data.is_goods_detail_show || 0) == 1" class="item">
|
||||
<text class="text-size-lg cr-base va-m">{{ goods.plugins_points_data.points_value }}</text>
|
||||
<text class="text-size-xs cr-grey va-m margin-left-xs">{{goods.plugins_points_data.points_unit}}</text>
|
||||
<text class="points-price-value text-size-lg cr-base va-m">{{ goods.plugins_points_data.points_value }}</text>
|
||||
<text class="points-price-unit text-size-xs cr-grey va-m margin-left-xs">{{goods.plugins_points_data.points_unit}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<text class="fr cr-main">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<component-panel-content :propData="item" :propDataField="field_list" :propIsTerse="true"></component-panel-content>
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propExcludeField="status_name" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view v-if="item.status == 0" class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white cr-green br-green" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/givegift/receive/receive?code='+item.code" hover-class="none">{{$t('common.link')}}</button>
|
||||
|
|
@ -133,7 +133,6 @@
|
|||
var data = res.data.data;
|
||||
this.setData({
|
||||
nav_status_list: data.nav_status_list || [],
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_page: 1,
|
||||
|
|
@ -224,7 +223,8 @@
|
|||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: data.data_total,
|
||||
data_page_total: data.page_total,
|
||||
data_page_total: data.page_total,
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<image :src="item.goods.images" mode="aspectFill" class="radius goods-images fl"></image>
|
||||
<view class="goods-title multi-text fr">{{item.goods.title}}</view>
|
||||
</view>
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propIsItemShowMax="6" :propIsTerse="true"></component-panel-content>
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propExcludeField="status_name" propIsItemShowMax="6" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white cr-base br-grey" type="default" size="mini" @tap="popup_edit_open_event" :data-index="index" hover-class="none">{{$t('common.edit')}}</button>
|
||||
|
|
@ -57,13 +57,13 @@
|
|||
<view class="border-radius-main spacing-mb oh">
|
||||
<view class="form-gorup">
|
||||
<view class="flex-row jc-sb align-c padding-top-sm">
|
||||
<view class="form-gorup-title">留言提示</view>
|
||||
<input type="text" name="message_tips" :value="edit_data.message_tips || ''" class="br-b-f5 tr message-tips" placeholder-class="cr-grey-c" placeholder="留言提示,格式最多200个字符" />
|
||||
<view class="form-gorup-title">{{$t('givegift-gift.givegift-gift.567uye')}}</view>
|
||||
<input type="text" name="message_tips" :value="edit_data.message_tips || ''" class="br-b-f5 tr message-tips" placeholder-class="cr-grey-c" :placeholder="$t('givegift-gift.givegift-gift.rtyu33')" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup">
|
||||
<view class="flex-row jc-sb align-c padding-bottom-sm">
|
||||
<view class="form-gorup-title">不限领取</view>
|
||||
<view class="form-gorup-title">{{$t('givegift-gift.givegift-gift.8yghjd')}}</view>
|
||||
<switch name="is_no_limit_receive" :checked="edit_data.is_no_limit_receive == 1" />
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -225,7 +225,6 @@
|
|||
payment_list: data.payment_list || [],
|
||||
default_payment_id: data.default_payment_id || 0,
|
||||
nav_status_list: data.nav_status_list || [],
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_page: 1,
|
||||
|
|
@ -317,7 +316,8 @@
|
|||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: data.data_total,
|
||||
data_page_total: data.page_total,
|
||||
data_page_total: data.page_total,
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
|
|
|
|||
|
|
@ -37,23 +37,23 @@
|
|||
</view>
|
||||
|
||||
<view class="oh margin-top-xl">
|
||||
<view class="fl margin-top-sm">不限领取</view>
|
||||
<view class="fl margin-top-sm">{{$t('givegift-gift.givegift-gift.8yghjd')}}</view>
|
||||
<view class="fr">
|
||||
<switch name="is_no_limit_receive" :checked="true" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="oh margin-top-xl right-width">
|
||||
<view class="fl margin-top-sm">留言提示</view>
|
||||
<view class="fl margin-top-sm">{{$t('givegift-gift.givegift-gift.567uye')}}</view>
|
||||
<view class="fr">
|
||||
<input type="text" class="br round padding-horizontal lh-xxl ht-xxl" placeholder-class="cr-grey-c" placeholder="留言提示,格式最多200个字符" name="message_tips" />
|
||||
<input type="text" class="br round padding-horizontal lh-xxl ht-xxl" placeholder-class="cr-grey-c" :placeholder="$t('givegift-gift.givegift-gift.rtyu33')" name="message_tips" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<button type="default" form-type="submit" class="item bg-main br-main cr-white text-size round wh-auto" :disabled="form_submit_disabled_status">提交支付</button>
|
||||
<button type="default" form-type="submit" class="item bg-main br-main cr-white text-size round wh-auto" :disabled="form_submit_disabled_status">{{$t('common.submit_payment')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
|
@ -151,14 +151,14 @@
|
|||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 初始化
|
||||
this.init();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
|
@ -170,14 +170,11 @@
|
|||
|
||||
methods: {
|
||||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.setData({
|
||||
pay_url: app.globalData.get_request_url('pay', 'gift', 'givegift'),
|
||||
qrcode_url: app.globalData.get_request_url('paycheck', 'gift', 'givegift'),
|
||||
});
|
||||
this.get_data();
|
||||
}
|
||||
this.setData({
|
||||
pay_url: app.globalData.get_request_url('pay', 'gift', 'givegift'),
|
||||
qrcode_url: app.globalData.get_request_url('paycheck', 'gift', 'givegift'),
|
||||
});
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
|
|
@ -288,51 +285,63 @@
|
|||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
var form_data = e.detail.value;
|
||||
form_data['goods_id'] = this.goods.id;
|
||||
this.setData({
|
||||
form_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('create', 'gift', 'givegift'),
|
||||
method: 'POST',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
is_show_payment_popup: this.is_show_payment_popup ? false : true,
|
||||
temp_pay_value: data.order_id,
|
||||
pay_price: data.total_price,
|
||||
payment_id: data.payment_user_id || this.default_payment_id,
|
||||
});
|
||||
uni.setStorageSync(app.globalData.data.cache_page_pay_key, {
|
||||
order_ids: data.order_id,
|
||||
});
|
||||
} else {
|
||||
// 是否登录
|
||||
var user = app.globalData.get_user_info(this, 'form_submit', e);
|
||||
if(user !== false) {
|
||||
var form_data = e.detail.value;
|
||||
form_data['goods_id'] = this.goods.id;
|
||||
this.setData({
|
||||
form_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('create', 'gift', 'givegift'),
|
||||
method: 'POST',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
if(parseInt(data.is_success || 0) == 1) {
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
var self = this;
|
||||
setTimeout(function() {
|
||||
app.globalData.url_open(self.to_appoint_page, true);
|
||||
}, 1500);
|
||||
} else {
|
||||
this.setData({
|
||||
is_show_payment_popup: this.is_show_payment_popup ? false : true,
|
||||
temp_pay_value: data.order_id,
|
||||
pay_price: data.total_price,
|
||||
payment_id: data.payment_user_id || this.default_payment_id,
|
||||
});
|
||||
uni.setStorageSync(app.globalData.data.cache_page_pay_key, {
|
||||
order_ids: data.order_id,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'form_submit', e)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'form_submit', e)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 支付窗口关闭
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@
|
|||
</view>
|
||||
<view v-if="(data.desc || null) != null" class="margin-top-lg cr-red">{{data.desc}}</view>
|
||||
<view class="margin-top-xxl padding-bottom-sm">
|
||||
<input type="text" class="br round padding-horizontal lh-xxl ht-xxl" placeholder-class="cr-grey-c" placeholder="给Ta留言表示感谢!" name="user_message" />
|
||||
<input type="text" class="br round padding-horizontal lh-xxl ht-xxl" placeholder-class="cr-grey-c" :placeholder="$t('givegift-gift.givegift-gift.34rrr3')" name="user_message" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<button type="default" form-type="submit" class="item bg-main br-main cr-white text-size round wh-auto">我要领取</button>
|
||||
<button type="default" form-type="submit" class="item bg-main br-main cr-white text-size round wh-auto">{{$t('common.my_want_receive')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
|
@ -97,14 +97,14 @@
|
|||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 加载数据
|
||||
this.get_data();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
|
@ -115,13 +115,6 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data();
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
|
|
@ -176,18 +169,23 @@
|
|||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
this.setData({
|
||||
form_data: e.detail.value || {}
|
||||
});
|
||||
// 是否登录
|
||||
var user = app.globalData.get_user_info(this, 'form_submit', e);
|
||||
if(user !== false) {
|
||||
// 设置表单数据
|
||||
this.setData({
|
||||
form_data: e.detail.value || {}
|
||||
});
|
||||
|
||||
// 是否多规格
|
||||
var goods = this.data.goods;
|
||||
if(goods.is_exist_many_spec == 1) {
|
||||
if ((this.$refs.goods_spec_choice || null) != null) {
|
||||
this.$refs.goods_spec_choice.init(goods.id, goods['specifications']['choose'], goods.buy_min_number);
|
||||
// 是否多规格
|
||||
var goods = this.data.goods;
|
||||
if(goods.is_exist_many_spec == 1) {
|
||||
if ((this.$refs.goods_spec_choice || null) != null) {
|
||||
this.$refs.goods_spec_choice.init(goods.id, goods['specifications']['choose'], goods.buy_min_number);
|
||||
}
|
||||
} else {
|
||||
this.buy_handle();
|
||||
}
|
||||
} else {
|
||||
this.buy_handle();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue