diff --git a/app/admin/controller/StoreProduct.php b/app/admin/controller/StoreProduct.php
index 0ce5368..4ea5431 100644
--- a/app/admin/controller/StoreProduct.php
+++ b/app/admin/controller/StoreProduct.php
@@ -419,7 +419,8 @@ class StoreProduct extends BaseController
add_log('buy', $id, $param);
$app = $this->payment();
- $total_fee = env('APP_DEBUG') ? 1 : $post_price;
+// $total_fee = env('APP_DEBUG') ? 1 : $post_price;
+ $total_fee = $post_price;
// 用 easywechat 封装的方法请求微信的统一下单接口
$result = $app->order->unify([
'trade_type' => 'NATIVE', // 原生支付即扫码支付,商户根据微信支付协议格式生成的二维码,用户通过微信“扫一扫”扫描二维码后即进入付款确认界面,输入密码即完成支付。
diff --git a/app/admin/view/store_product/add.html b/app/admin/view/store_product/add.html
index d5368fe..9dcdc84 100644
--- a/app/admin/view/store_product/add.html
+++ b/app/admin/view/store_product/add.html
@@ -33,36 +33,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 平台商品分类* |
-
-
-
-
+ | 平台商品分类*
+ |
+
+
+ |
+ 品牌选择*
+ |
+
+
|
-
- 品牌选择* |
+ 商户分类*
+ |
-
-
-
+
|
-
商品封面图 |
@@ -220,6 +243,53 @@
}
});
+ function demo_cate_id () {
+ var demo_cate = xmSelect.render({
+ name: 'cate_id',
+ el: '#cate_id',
+ autoRow: true,
+ radio: true,
+ cascader: {
+ show: true,
+ indent: 200,
+ },
+ prop: {
+ name: 'name',
+ value: 'id',
+ },
+ data: [],
+ })
+ $.get('/admin/product.product/category_arr', function (result) {
+ demo_cate.update({
+ data: result.data
+ })
+ });
+ }
+ demo_cate_id()
+ function demo_mer_cate_id () {
+ var demo_cate = xmSelect.render({
+ name: 'mer_cate_id',
+ el: '#mer_cate_id',
+ autoRow: true,
+ cascader: {
+ show: true,
+ indent: 200,
+ },
+ prop: {
+ name: 'name',
+ value: 'id',
+ },
+ data: [],
+ radio: true,
+ })
+ $.get('/admin/product.product/category_arr?id=4', function (result) {
+ demo_cate.update({
+ data: result.data
+ })
+ });
+ }
+ demo_mer_cate_id();
+
var editor = layui.tinymce;
var edit = editor.render({
selector: "#container_content",
@@ -232,6 +302,17 @@
layer.msg('请先完善商品详情');
return false;
}
+
+ if (data.field.cate_id == '') {
+ layer.msg('请先选择平台分类');
+ return false;
+ }
+
+ if (data.field.mer_cate_id == '') {
+ layer.msg('请先选择商户分类');
+ return false;
+ }
+
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
diff --git a/app/admin/view/store_product/edit.html b/app/admin/view/store_product/edit.html
index 02dc88b..fd1a650 100644
--- a/app/admin/view/store_product/edit.html
+++ b/app/admin/view/store_product/edit.html
@@ -33,34 +33,58 @@
- |
- 平台商品分类* |
-
-
-
-
- |
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 品牌选择* |
-
-
-
-
+ | 平台商品分类*
+ |
+
+
+ |
+ 品牌选择*
+ |
+
+
+ |
+
+
+ 商户分类*
+ |
+
+
|
-
商品封面图 |
@@ -165,6 +189,8 @@
var moduleInit = ['tool', 'tagpicker', 'tinymce'];
var group_access = "{:session('gougu_admin')['group_access']}";
var multiple_images = "{$detail['slider_image']}".split(',');
+ var cate_id = "{$detail['cate_id']}";
+ var mer_cate_id = "{$detail['mer_cate_id']}";
//单击图片删除图片 【注册全局函数】
function delMultipleImgs(this_img){
//获取下标
@@ -224,6 +250,56 @@
}
});
+ function demo_cate_id () {
+ var demo_cate = xmSelect.render({
+ name: 'cate_id',
+ el: '#cate_id',
+ initValue: [cate_id],
+ autoRow: true,
+ cascader: {
+ show: true,
+ indent: 200,
+ },
+ prop: {
+ name: 'name',
+ value: 'id',
+ },
+ data: [],
+ radio: true,
+ })
+ $.get('/admin/product.product/category_arr', function (result) {
+ demo_cate.update({
+ data: result.data
+ })
+ });
+ }
+ demo_cate_id()
+ function demo_mer_cate_id () {
+ var demo_cate = xmSelect.render({
+ name: 'mer_cate_id',
+ el: '#mer_cate_id',
+ autoRow: true,
+ initValue: [mer_cate_id],
+ cascader: {
+ show: true,
+ indent: 200,
+ },
+ prop: {
+ name: 'name',
+ value: 'id',
+ },
+ data: [],
+ radio: true,
+ })
+ $.get('/admin/product.product/category_arr?id=4', function (result) {
+ demo_cate.update({
+ data: result.data
+ })
+ });
+ }
+ demo_mer_cate_id()
+
+
var editor = layui.tinymce;
var edit = editor.render({
selector: "#container_content",
@@ -236,6 +312,17 @@
layer.msg('请先完善商品详情');
return false;
}
+
+ if (data.field.cate_id == '') {
+ layer.msg('请先选择平台分类');
+ return false;
+ }
+
+ if (data.field.mer_cate_id == '') {
+ layer.msg('请先选择商户分类');
+ return false;
+ }
+
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
diff --git a/app/admin/view/store_product/read.html b/app/admin/view/store_product/read.html
index 86f420e..325d8f5 100644
--- a/app/admin/view/store_product/read.html
+++ b/app/admin/view/store_product/read.html
@@ -27,34 +27,58 @@
-
- 商户商品分类* |
-
-
-
-
- |
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 品牌选择* |
-
-
-
-
+ | 平台商品分类*
+ |
+
+
+ |
+ 品牌选择*
+ |
+
+
+ |
+
+
+ 商户分类*
+ |
+
+
|
-
商品封面图 |
@@ -145,4 +169,160 @@
{/block}
-
\ No newline at end of file
+
+
+{block name="script"}
+
+
+{/block}
diff --git a/public/.htaccess b/public/.htaccess
deleted file mode 100644
index 8932768..0000000
--- a/public/.htaccess
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Options +FollowSymlinks -Multiviews
- RewriteEngine On
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
-
\ No newline at end of file