送礼插件
parent
2e07e8beac
commit
0f9fe3bce5
|
|
@ -318,12 +318,12 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentGoodsList from '../../components/goods-list/goods-list';
|
||||
import componentNavBack from '../../components/nav-back/nav-back';
|
||||
import componentRealstoreCart from '../../components/realstore-cart/realstore-cart';
|
||||
import componentBottomLine from '../../components/bottom-line/bottom-line';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentGoodsList from '@/components/goods-list/goods-list';
|
||||
import componentNavBack from '@/components/nav-back/nav-back';
|
||||
import componentRealstoreCart from '@/components/realstore-cart/realstore-cart';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -769,7 +769,7 @@
|
|||
},
|
||||
])
|
||||
)
|
||||
),
|
||||
)
|
||||
};
|
||||
app.globalData.url_open('/pages/buy/buy?data=' + encodeURIComponent(base64.encode(JSON.stringify(data))));
|
||||
this.popup_close_event();
|
||||
|
|
|
|||
|
|
@ -178,9 +178,9 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentBadge from '../../components/badge/badge';
|
||||
import componentGoodsBuy from '../../components/goods-buy/goods-buy';
|
||||
import componentCartParaCurve from '../../components/cart-para-curve/cart-para-curve';
|
||||
import componentBadge from '@/components/badge/badge';
|
||||
import componentGoodsBuy from '@/components/goods-buy/goods-buy';
|
||||
import componentCartParaCurve from '@/components/cart-para-curve/cart-para-curve';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -136,12 +136,12 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentPopup from "@/components/popup/popup";
|
||||
import componentGoodsBuy from '../../components/goods-buy/goods-buy';
|
||||
import componentCartParaCurve from '../../components/cart-para-curve/cart-para-curve';
|
||||
import componentBadge from '../../components/badge/badge';
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentGoodsBuy from '@/components/goods-buy/goods-buy';
|
||||
import componentCartParaCurve from '@/components/cart-para-curve/cart-para-curve';
|
||||
import componentBadge from '@/components/badge/badge';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
var static_url = app.globalData.get_static_url('realstore', true);
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
const app = getApp();
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentUserBase from '../../components/user-base/user-base';
|
||||
import componentUserBase from '@/components/user-base/user-base';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -12,24 +12,24 @@
|
|||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view v-if="(data_list || null) != null && data_list.length > 0" class="data-list padding-horizontal-main padding-top-main oh">
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<view :data-value="item.url" @tap="url_event" class="item padding-main border-radius-main bg-white oh cp spacing-mb">
|
||||
<view v-if="(item.cover || null) != null" class="oh pr item-cover">
|
||||
<image :src="item.cover" mode="aspectFit" class="radius fl cover"></image>
|
||||
<view class="base-right fr">
|
||||
<view class="fw-b single-text text-size" :style="(item.title_color || null) != null ? 'color:' + item.title_color + ' !important;' : ''">{{ item.title }}</view>
|
||||
<view v-if="(item.describe || null) != null" class="cr-base margin-top-sm multi-text text-size-sm">{{item.describe}}</view>
|
||||
<view class="pa right-0 bottom-0 base-right-bottom cr-grey text-size-xs">
|
||||
<text class="fl">{{ item.add_time }}</text>
|
||||
<text class="fr">{{$t('article-category.article-category.gxra15')}}{{ item.access_count }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="fw-b single-text text-size" :style="(item.title_color || null) != null ? 'color:' + item.title_color + ' !important;' : ''">{{ item.title }}</view>
|
||||
<view class="cr-grey oh text-size-xs margin-top-sm">
|
||||
<text class="fl">{{ item.add_time }}</text>
|
||||
<text class="fr">{{$t('article-category.article-category.gxra15')}}{{ item.access_count }}</text>
|
||||
</view>
|
||||
<view :data-value="item.url" @tap="url_event" class="item padding-main border-radius-main bg-white oh cp spacing-mb">
|
||||
<view v-if="(item.cover || null) != null" class="oh pr item-cover">
|
||||
<image :src="item.cover" mode="aspectFit" class="radius fl cover"></image>
|
||||
<view class="base-right fr">
|
||||
<view class="fw-b single-text text-size" :style="(item.title_color || null) != null ? 'color:' + item.title_color + ' !important;' : ''">{{ item.title }}</view>
|
||||
<view v-if="(item.describe || null) != null" class="cr-base margin-top-sm multi-text text-size-sm">{{item.describe}}</view>
|
||||
<view class="pa right-0 bottom-0 base-right-bottom cr-grey text-size-xs">
|
||||
<text class="fl">{{ item.add_time }}</text>
|
||||
<text class="fr">{{$t('article-category.article-category.gxra15')}}{{ item.access_count }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="fw-b single-text text-size" :style="(item.title_color || null) != null ? 'color:' + item.title_color + ' !important;' : ''">{{ item.title }}</view>
|
||||
<view class="cr-grey oh text-size-xs margin-top-sm">
|
||||
<text class="fl">{{ item.add_time }}</text>
|
||||
<text class="fr">{{$t('article-category.article-category.gxra15')}}{{ item.access_count }}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
|
@ -46,8 +46,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -270,6 +270,6 @@ export default {
|
|||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import "./article-category.css";
|
||||
<style>
|
||||
@import "./article-category.css";
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -338,12 +338,12 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentTimeSelect from '../../components/time-select/time-select';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentTimeSelect from '@/components/time-select/time-select';
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
import componentBuyOrdergoodsform from '../../components/buy-ordergoodsform/buy-ordergoodsform';
|
||||
import componentBuyOrdergoodsform from '@/components/buy-ordergoodsform/buy-ordergoodsform';
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentQuickNav from '../../components/quick-nav/quick-nav';
|
||||
import componentCart from '../../components/cart/cart';
|
||||
import componentQuickNav from '@/components/quick-nav/quick-nav';
|
||||
import componentCart from '@/components/cart/cart';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentSearch from "@/components/search/search";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentLayout from "../../components/layout/layout";
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentLayout from "@/components/layout/layout";
|
||||
import componentSearch from "@/components/search/search";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
var common_static_url = app.globalData.get_static_url("common");
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentGoodsComments from "../../components/goods-comments/goods-comments";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
import componentGoodsComments from "@/components/goods-comments/goods-comments";
|
||||
|
||||
var static_url = app.globalData.get_static_url("home");
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -166,13 +166,13 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentQuickNav from "../../components/quick-nav/quick-nav";
|
||||
import componentQuickNav from "@/components/quick-nav/quick-nav";
|
||||
import componentPopup from "@/components/popup/popup";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentGoodsList from "../../components/goods-list/goods-list";
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentBadge from "../../components/badge/badge";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
import componentGoodsList from "@/components/goods-list/goods-list";
|
||||
import componentSearch from "@/components/search/search";
|
||||
import componentBadge from "@/components/badge/badge";
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
|
|
@ -387,9 +387,9 @@
|
|||
this.set_tab_bar_badge_handle();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg
|
||||
});
|
||||
});
|
||||
app.globalData.is_login_check(res.data, this, 'get_data');
|
||||
}
|
||||
|
||||
|
|
@ -410,7 +410,7 @@
|
|||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
}
|
||||
|
|
@ -469,7 +469,7 @@
|
|||
random_value: Math.random(),
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_list_loding_status: 3,
|
||||
data_list_loding_msg: '',
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0
|
||||
|
|
@ -481,7 +481,7 @@
|
|||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_total: 0,
|
||||
data_is_loading: 0
|
||||
|
|
@ -495,10 +495,10 @@
|
|||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_is_loading: 0
|
||||
});
|
||||
});
|
||||
app.globalData.is_login_check(res.data, this, 'get_data_list', is_mandatory);
|
||||
}
|
||||
},
|
||||
|
|
@ -508,7 +508,7 @@
|
|||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
data_is_loading: 0
|
||||
});
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
let login_static_url = app.globalData.get_static_url('thirdpartylogin', true) + 'icon/';
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -102,10 +102,10 @@
|
|||
});
|
||||
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
|
|
@ -117,8 +117,8 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
|
|
@ -162,8 +162,8 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -6,15 +6,20 @@
|
|||
<view class="padding-main">
|
||||
<view class="bg-white padding-main border-radius-main">
|
||||
<view class="fw-b text-size multi-text lh-xl margin-bottom">{{goods.title}}</view>
|
||||
<view v-if="(goods.show_field_price_status || 0) == 1" class="margin-bottom-xs">
|
||||
<text class="price cr-price">{{goods.show_price_symbol}}</text>
|
||||
<text class="sales-price text-size-lg">{{goods.price}}</text>
|
||||
<text v-if="(goods.show_price_unit || null) != null" class="cr-grey text-size-xs">{{goods.show_price_unit}}</text>
|
||||
</view>
|
||||
<view v-if="(goods.show_field_original_price_status || 0) == 1" class="original-price">
|
||||
<text class="text-size-xs">{{goods.show_original_price_symbol}}</text>
|
||||
<text class="text-size">{{goods.original_price}}</text>
|
||||
<text v-if="(goods.show_original_price_unit || null) != null" class="text-size-xs">{{goods.show_original_price_unit}}</text>
|
||||
<view class="pr">
|
||||
<view v-if="(goods.show_field_price_status || 0) == 1" class="margin-bottom-xs">
|
||||
<text class="price cr-price">{{goods.show_price_symbol}}</text>
|
||||
<text class="sales-price text-size-lg">{{goods.price}}</text>
|
||||
<text v-if="(goods.show_price_unit || null) != null" class="cr-grey text-size-xs">{{goods.show_price_unit}}</text>
|
||||
</view>
|
||||
<view v-if="(goods.show_field_original_price_status || 0) == 1" class="original-price">
|
||||
<text class="text-size-xs">{{goods.show_original_price_symbol}}</text>
|
||||
<text class="text-size">{{goods.original_price}}</text>
|
||||
<text v-if="(goods.show_original_price_unit || null) != null" class="text-size-xs">{{goods.show_original_price_unit}}</text>
|
||||
</view>
|
||||
<view class="pa top-0 right-0" @tap="share_event">
|
||||
<iconfont name="icon-share-square" size="34rpx" color="#999"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="(goods.show_inventory_status || 0) == 1" class="inventory text-size-xs margin-top">
|
||||
<text class="cr-grey">{{ $t('goods-detail.goods-detail.1s79t4') }}</text>
|
||||
|
|
@ -57,6 +62,9 @@
|
|||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
<!-- 分享弹窗 -->
|
||||
<component-share-popup ref="share"></component-share-popup>
|
||||
|
||||
<!-- 支付组件 -->
|
||||
<component-payment
|
||||
:propPayUrl="pay_url"
|
||||
|
|
@ -80,7 +88,8 @@
|
|||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
import componentSharePopup from '@/components/share-popup/share-popup';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -110,13 +119,16 @@
|
|||
// 支付失败跳转的页面
|
||||
to_fail_page: '/pages/plugins/givegift/gift/gift',
|
||||
// 现金--跳转指定页面
|
||||
to_appoint_page: '/pages/plugins/givegift/gift/gift',
|
||||
to_appoint_page: '/pages/plugins/givegift/gift/gift',
|
||||
// 自定义分享信息
|
||||
share_info: {}
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentPayment
|
||||
componentPayment,
|
||||
componentSharePopup
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -174,7 +186,21 @@
|
|||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
});
|
||||
if (this.goods != null) {
|
||||
// 基础自定义分享
|
||||
this.setData({
|
||||
share_info: {
|
||||
title: this.goods.seo_title || this.goods.title,
|
||||
desc: this.goods.seo_desc || this.goods.simple_desc,
|
||||
path: '/pages/goods-detail/goods-detail',
|
||||
query: 'id='+this.goods.id,
|
||||
img: this.goods.images
|
||||
},
|
||||
});
|
||||
// 标题
|
||||
uni.setNavigationBarTitle({ title: this.goods.title });
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
|
|
@ -301,6 +327,16 @@
|
|||
is_show_payment_popup: false,
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
},
|
||||
|
||||
// 分享开启弹层
|
||||
share_event(e) {
|
||||
if ((this.$refs.share || null) != null) {
|
||||
this.$refs.share.init({
|
||||
status: true,
|
||||
share_info: this.share_info
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
.user-avatar {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
}
|
||||
|
|
@ -1,8 +1,221 @@
|
|||
<template>
|
||||
</template>
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="(data || null) != null" class="page-bottom-fixed">
|
||||
<form @submit="form_submit">
|
||||
<image :src="data.goods.images" mode="widthFix" class="wh-auto dis-block"></image>
|
||||
<view class="padding-main">
|
||||
<view class="bg-white padding-main border-radius-main">
|
||||
<view class="fw-b text-size multi-text lh-xl margin-bottom">{{data.goods.title}}</view>
|
||||
<view class="pr">
|
||||
<view v-if="(data.goods.show_field_price_status || 0) == 1" class="margin-bottom-xs">
|
||||
<text class="price cr-price">{{data.goods.show_price_symbol}}</text>
|
||||
<text class="sales-price text-size-lg">{{data.goods.price}}</text>
|
||||
<text v-if="(data.goods.show_price_unit || null) != null" class="cr-grey text-size-xs">{{data.goods.show_price_unit}}</text>
|
||||
</view>
|
||||
<view v-if="(data.goods.show_field_original_price_status || 0) == 1" class="original-price">
|
||||
<text class="text-size-xs">{{data.goods.show_original_price_symbol}}</text>
|
||||
<text class="text-size">{{data.goods.original_price}}</text>
|
||||
<text v-if="(data.goods.show_original_price_unit || null) != null" class="text-size-xs">{{data.goods.show_original_price_unit}}</text>
|
||||
</view>
|
||||
<view class="pa top-0 right-0" @tap="share_event">
|
||||
<iconfont name="icon-share-square" size="34rpx" color="#999"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-xl margin-bottom-lg">
|
||||
<image :src="data.user.avatar" mode="aspectFit" class="va-m user-avatar"></image>
|
||||
<text class="text-size-sm cr-grey va-m margin-left-sm">{{ data.title }}</text>
|
||||
</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" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed">
|
||||
<view class="bottom-line-exclude">
|
||||
<button type="default" form-type="submit" class="bg-main br-main cr-white text-size round wh-auto">我要领取</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
<!-- 分享弹窗 -->
|
||||
<component-share-popup ref="share"></component-share-popup>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<!-- 规格选择 -->
|
||||
<component-goods-spec-choice ref="goods_spec_choice" v-on:specConfirmEvent="spec_confirm_event"></component-goods-spec-choice>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentGoodsSpecChoice from '@/components/goods-spec-choice/goods-spec-choice';
|
||||
import componentSharePopup from '@/components/share-popup/share-popup';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
params: {},
|
||||
data: null,
|
||||
form_data: {},
|
||||
// 自定义分享信息
|
||||
share_info: {}
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentGoodsSpecChoice,
|
||||
componentSharePopup
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
// 参数
|
||||
this.setData({params: params});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data();
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('receive', 'gift', 'givegift'),
|
||||
method: 'POST',
|
||||
data: this.params,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
data: res.data.data || null,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
if (this.data != null) {
|
||||
// 基础自定义分享
|
||||
this.setData({
|
||||
share_info: {
|
||||
title: this.data.title || this.data.desc,
|
||||
desc: this.data.desc,
|
||||
path: '/pages/plugins/givegift/receive/receive',
|
||||
query: app.globalData.json_to_url_params(this.params),
|
||||
img: (this.data.goods || null) != null ? this.data.goods.images : ''
|
||||
},
|
||||
});
|
||||
// 标题
|
||||
uni.setNavigationBarTitle({ title: this.data.title });
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
this.buy_handle();
|
||||
}
|
||||
},
|
||||
|
||||
// 规格确认回调事件
|
||||
spec_confirm_event(value) {
|
||||
this.buy_handle(value.spec);
|
||||
},
|
||||
|
||||
// 购买处理
|
||||
buy_handle(spec = '') {
|
||||
var data = {
|
||||
buy_type: 'goods',
|
||||
goods_data: encodeURIComponent(
|
||||
base64.encode(
|
||||
JSON.stringify([
|
||||
{
|
||||
goods_id: this.data.goods.id,
|
||||
stock: 1,
|
||||
spec: spec,
|
||||
plugins_givegift_value: this.data.code || this.data.key,
|
||||
plugins_givegift_type: (this.data.code || null) == null ? 'key' : 'code',
|
||||
plugins_givegift_user_message: this.form_data.user_message
|
||||
},
|
||||
])
|
||||
)
|
||||
)
|
||||
};
|
||||
app.globalData.url_open('/pages/buy/buy?data=' + encodeURIComponent(base64.encode(JSON.stringify(data))));
|
||||
},
|
||||
|
||||
// 分享开启弹层
|
||||
share_event(e) {
|
||||
if ((this.$refs.share || null) != null) {
|
||||
this.$refs.share.init({
|
||||
status: true,
|
||||
share_info: this.share_info
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
@import './receive.css';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@
|
|||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentBottomLine from '../../components/bottom-line/bottom-line';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
const theme_color = app.globalData.get_theme_color();
|
||||
const theme_color_light = app.globalData.get_theme_color(null, true);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -127,10 +127,10 @@
|
|||
});
|
||||
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
|
|
@ -142,8 +142,8 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
|
|
@ -188,8 +188,8 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -127,10 +127,10 @@
|
|||
});
|
||||
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
|
|
@ -142,8 +142,8 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
|
|
@ -188,8 +188,8 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -99,10 +99,10 @@
|
|||
data_list_loding_status: 1
|
||||
});
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
// 获取数据
|
||||
uni.request({
|
||||
|
|
@ -113,8 +113,8 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
|
|
@ -157,8 +157,8 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
var common_static_url = app.globalData.get_static_url("common");
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -85,27 +85,27 @@
|
|||
<view class="content fl br-l padding-left-main" :data-value="item.value" @tap="text_copy_event">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 快递信息 -->
|
||||
<view v-if="(detail.express_data || null) != null && detail.express_data.length > 0" class="express-data panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{$t('user-order-detail.user-order-detail.0876xf')}}</view>
|
||||
<view class="panel-content">
|
||||
<view v-for="(item, index) in detail.express_data" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="item oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{$t('user-order-detail.user-order-detail.12d445')}}</view>
|
||||
<view class="content fl br-l padding-left-main" :data-value="item.express_name" @tap="text_copy_event">{{item.express_name}}</view>
|
||||
</view>
|
||||
<view class="item oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{$t('user-order-detail.user-order-detail.2byl8l')}}</view>
|
||||
<view class="content fl br-l padding-left-main" :data-value="item.express_number" @tap="text_copy_event">{{item.express_number}}</view>
|
||||
</view>
|
||||
<view v-if="(item.note || null) != null" class="item oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{$t('common.note')}}:</view>
|
||||
<view class="content fl br-l padding-left-main" :data-value="item.note" @tap="text_copy_event">{{item.note}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 快递信息 -->
|
||||
<view v-if="(detail.express_data || null) != null && detail.express_data.length > 0" class="express-data panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{$t('user-order-detail.user-order-detail.0876xf')}}</view>
|
||||
<view class="panel-content">
|
||||
<view v-for="(item, index) in detail.express_data" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="item oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{$t('user-order-detail.user-order-detail.12d445')}}</view>
|
||||
<view class="content fl br-l padding-left-main" :data-value="item.express_name" @tap="text_copy_event">{{item.express_name}}</view>
|
||||
</view>
|
||||
<view class="item oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{$t('user-order-detail.user-order-detail.2byl8l')}}</view>
|
||||
<view class="content fl br-l padding-left-main" :data-value="item.express_number" @tap="text_copy_event">{{item.express_number}}</view>
|
||||
</view>
|
||||
<view v-if="(item.note || null) != null" class="item oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{$t('common.note')}}:</view>
|
||||
<view class="content fl br-l padding-left-main" :data-value="item.note" @tap="text_copy_event">{{item.note}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 扩展数据 -->
|
||||
|
|
@ -131,8 +131,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentBottomLine from '../../components/bottom-line/bottom-line';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -121,10 +121,10 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '../../common/js/lib/base64.js';
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentBottomLine from '../../components/bottom-line/bottom-line';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
|
|
|
|||
|
|
@ -241,8 +241,8 @@
|
|||
<script>
|
||||
const app = getApp();
|
||||
import componentPopup from "@/components/popup/popup";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
var common_static_url = app.globalData.get_static_url("common");
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue