处方开方

master
gongfuxiang 2025-01-26 01:48:35 +08:00
parent 689698013d
commit eda4134496
4 changed files with 149 additions and 15 deletions

View File

@ -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;

View File

@ -1710,6 +1710,18 @@
}
}
]
},
{
"root": "pages/plugins/hospital",
"pages": [
{
"path": "prescription/prescription",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": ""
}
}
]
}
],
"preloadRule": {

View File

@ -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);

View File

@ -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>