处方开方
parent
689698013d
commit
eda4134496
|
|
@ -58,7 +58,7 @@
|
|||
<view v-if="(opt_button || null) != null && opt_button.length > 0" class="padding-bottom-main">
|
||||
<view :class="'oh buy-nav-btn-number-' + (opt_button.length || 0)">
|
||||
<block v-for="(item, index) in opt_button" :key="index">
|
||||
<view v-if="(item.name || null) != null && (item.type || null) != null && (item.type == 'cart' || item.type == 'buy' || item.type == 'show')" class="item fl bs-bb padding-horizontal-main">
|
||||
<view v-if="(item.name || null) != null && (item.type || null) != null" class="item fl bs-bb padding-horizontal-main">
|
||||
<button :class="'cr-white round text-size-sm bg-' + ((item.color || 'main') == 'main' ? 'main' : 'main-pair')" type="default" @tap="spec_confirm_event" :data-value="item.value" :data-type="item.type" hover-class="none">{{ item.name }}</button>
|
||||
</view>
|
||||
</block>
|
||||
|
|
@ -771,7 +771,17 @@
|
|||
)
|
||||
)
|
||||
};
|
||||
app.globalData.url_open('/pages/buy/buy?data=' + encodeURIComponent(base64.encode(JSON.stringify(data))));
|
||||
// 转换数据
|
||||
var data_params = encodeURIComponent(base64.encode(JSON.stringify(data)));
|
||||
|
||||
// 是否互联网医院插件-开处方
|
||||
if(parseInt(this.goods.plugins_hospital_is_prescription || 0) == 1) {
|
||||
app.globalData.url_open('/pages/plugins/hospital/prescription/prescription?data=' + data_params);
|
||||
} else {
|
||||
// 默认进去订单确认页面
|
||||
app.globalData.url_open('/pages/buy/buy?data=' + data_params);
|
||||
}
|
||||
// 关闭弹窗
|
||||
this.popup_close_event();
|
||||
break;
|
||||
|
||||
|
|
|
|||
12
pages.json
12
pages.json
|
|
@ -1710,6 +1710,18 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/plugins/hospital",
|
||||
"pages": [
|
||||
{
|
||||
"path": "prescription/prescription",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"preloadRule": {
|
||||
|
|
|
|||
|
|
@ -1365,19 +1365,6 @@
|
|||
this.setData({
|
||||
'plugins_coupon_data.data': temp_list,
|
||||
});
|
||||
// if ((res.data.data.is_repeat_receive = 1)) {
|
||||
// temp_list[index]['is_repeat_receive'] = 1;
|
||||
// temp_list[index]['already_receive_text'] = '已领取';
|
||||
// temp_list[index]['already_receive_text'] = '已领取';
|
||||
// if (temp_list[index].process_data.type !== 0) {
|
||||
// temp_list[index]['already_send_count'] = Number(temp_list[index]['already_send_count']) + 1;
|
||||
// temp_list[index]['process_data'].value = Math.floor((Number(temp_list[index]['already_send_count']) / Number(temp_list[index]['limit_send_count'])) * 100);
|
||||
// temp_list[index]['process_data'].msg = '已领' + Math.floor((Number(temp_list[index]['already_send_count']) / Number(temp_list[index]['limit_send_count'])) * 100) + '%';
|
||||
// }
|
||||
// this.setData({
|
||||
// 'plugins_coupon_data.data': temp_list,
|
||||
// });
|
||||
// }
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'coupon_receive_event')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
hello
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
buy_submit_disabled_status: false,
|
||||
params: null,
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentPopup,
|
||||
componentNoData
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
// params.data 参数 urlencode(base64_encode(json字符串))
|
||||
// buy_type 下单类型(goods 立即购买、cart 购物车)
|
||||
// goods_data 下单商品urlencode(base64_encode(json字符串[{goods_id,stock,spec}]))
|
||||
// params['data'] = '{"buy_type":"goods","goods_data":"W3siZ29vZHNfaWQiOiI5Iiwic3RvY2siOjEsInNwZWMiOlt7InR5cGUiOiLpopzoibIiLCJ2YWx1ZSI6IueyieiJsiJ9LHsidHlwZSI6IuWwuueggSIsInZhbHVlIjoiTCJ9XX1"}';
|
||||
// ids 购物车主键ids
|
||||
if ((params.data || null) != null) {
|
||||
params = JSON.parse(base64.decode(decodeURIComponent(params.data)));
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
console.log(this.params);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
currency_symbol: app.globalData.get_config('currency_symbol'),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
init() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'buy'),
|
||||
method: 'POST',
|
||||
data: this.params,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
console.log(data)
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'init')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue