推广二维码

master
tping 3 years ago
parent 48b4748277
commit 5db39d8cbf

@ -204,10 +204,11 @@ class QrCodePromotionController extends BaseController
if ($id > 0) {
$uniqueStr = $this->getUniqueStr();
$h5Link = ($isHttps? 'https://': 'http://').$_SERVER['HTTP_HOST']."/index.php?s=/Qrcode/Jump/jumpMp/{$uniqueStr}";
$expireDate = date('Y-m-d', strtotime("+90 day"));
$expireDate = date('Y-m-d', strtotime("+30 day"));
$shortLink = $this->getShortUrl($h5Link, $expireDate);
M('qrcode_promotion_list', 'tab_')->where(['id' => $id])->save([
'unique_str' => $uniqueStr,
'h5_link' => $h5Link,
'short_link' => $shortLink
]);

@ -53,6 +53,7 @@
<script type="text/javascript">
var imgIndex = 0;
var imgCnt = 0;
$('#imgFile').uploadifive({
'fileObjName':'file',
'removeCompleted' : true,
@ -60,7 +61,11 @@
'buttonText' : '上传',
'uploadScript' : '/index.php?s=/Qrcode/QrCodePromotion/uploadQrCodeBackground',
'multi' : true,
'onSelect' : function (queue) {
imgCnt = imgCnt + 1;
},
'onUploadComplete' : function(file, data) {
imgCnt = imgCnt - 1;
var res = eval('(' + data + ')');
var src = res.path;
$('#img').append('<img src=' + src + ' width="150px" height="150px"/>');
@ -83,6 +88,10 @@
$('.add-submit').on({
click: function() {
if (imgCnt > 0) {
alert('请等待上次结束再次提交。');
return ;
}
var id = $("#qp_id").val();
var imgs = $("#form_link_add").serialize();

Loading…
Cancel
Save