diff --git a/pages/index/index.vue b/pages/index/index.vue
index 0313a62..accaf9d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -36,14 +36,15 @@
-
+
{{item.title}}
- {{item.w_h_mm.w}}×{{item.w_h_mm.h}}mm | {{item.w_h_px.w}}×{{item.w_h_px.h}}px
+ {{item.w_h_mm.w}}×{{item.w_h_mm.h}}mm | {{item.w_h_px.w}}×{{item.w_h_px.h}}px
+ 自己设置照片的宽和高
@@ -226,96 +227,24 @@
scroll2(e) {
console.log(e);
},
- //扫码
- scanQrcode()
- {
- var _this =this;
- _this.$com.showLoading('识别中...');
- uni.scanCode({
- onlyFromCamera: false,
- success: function (res) {
- console.log(res);
- console.log('条码类型:' + res.scanType);
- console.log('条码内容:' + res.result);
- if (res.scanType == 'QR_CODE')
- {
- var url = res.result;
- var codeTypeArr = ['deviceKey', 'deviceCode', 'qrcode', 'code']; //支持的条码参数
- var url_str = '';
- codeTypeArr.forEach(function(item) {
- if(url.indexOf(item) != -1 )
- {
- var keyindex = item;
- var deviceKey = _this.getParameterByName(url,item);
- if(!_this.$com.isNull(deviceKey))
- {
- if(['qrcode', 'code'].includes(item)) {
- keyindex = 'deviceCode';
- }
- console.log(keyindex+'='+deviceKey);
- url_str = `${keyindex}=${deviceKey}`;
- return;
- }
-
- }
- });
- if(!_this.$com.isNull(url_str))
- {
- uni.$u.route({
- url: '/pages/order/order?'+url_str,
- });
- }
- else
- {
-
- _this.$com.alert('二维码格式有误');
-
- }
- }
- else
- {
- _this.$com.alert('暂不支持此种条码类型');
- }
- },
- fail:function(err){
- _this.$com.alert('扫码失败,请重试');
- },
- complete:function(end){
- _this.$com.hideLoading();
- }
- });
- },
- //获取url中是否有某个参数的值
- getParameterByName(url,name) {
- name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regexS = "[\\?&]" + name + "=([^]*)";
- var regex = new RegExp(regexS);
- var results = regex.exec(url);
-
- if (results == null) return "";
- else return decodeURIComponent(results[1].replace(/\+/g, " "));
- },
+
openAd(index)
{
var _this =this;
var item = _this.banner[index];
console.log(item);
- if(!_this.$com.isNull(item.jumpUrl))
+ if(!_this.$com.isNull(item.link_url))
{
- console.log(item.jumpUrl);
+ console.log(item.link_url);
var url = '';
- switch(item.jumpType)
+ switch(item.type)
{
- case 0:
- url=item.jumpUrl;
- break;
-
case 1:
- url='/pages/web/index?title='+item.adName+'&url='+encodeURIComponent(item.jumpUrl);
+ url=item.jumpUrl;
break;
case 2:
- url='/pages/web/video?title='+item.adName+'&url='+encodeURIComponent(item.jumpUrl);
+ url='/pages/web/index?title='+item.adName+'&url='+encodeURIComponent(item.jumpUrl);
break;
default:
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 26f896f..2ae46ef 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -146,8 +146,8 @@
-
- 去创建
+
+ 去创建
@@ -388,6 +388,36 @@ export default {
});
},
+ createNew(){
+ var _this =this;
+ console.log(e);
+ _this.current = e.index;
+ var type = _this.tabList[_this.current].type;
+ switch(type)
+ {
+ case 1:
+ uni.navigateTo({
+ url:'/pagesA/merge/index',
+ })
+ break;
+ case 2:
+ uni.navigateTo({
+ url:'/pagesA/color/index',
+ })
+ break;
+ case 3:
+ uni.navigateTo({
+ url:'/pagesA/photo/photo_1',
+ })
+ break;
+ case 4:
+ uni.navigateTo({
+ url:'/pagesA/photo/cartoon_1',
+ })
+ break;
+ }
+
+ },
},
};
diff --git a/pagesA/merge/index.vue b/pagesA/merge/index.vue
index 8088e0e..cd9acf8 100644
--- a/pagesA/merge/index.vue
+++ b/pagesA/merge/index.vue
@@ -45,7 +45,7 @@
{{item.title}}
- {{item.w_h_mm.w}}×{{item.w_h_mm.h}}mm | {{item.w_h_px.w}}×{{item.w_h_px.h}}px
+ {{item.w_h_mm.w}}×{{item.w_h_mm.h}}mm | {{item.w_h_px.w}}×{{item.w_h_px.h}}px
自己设置照片的宽和高
@@ -393,7 +393,11 @@
_this.curPage = post.page;
_this.total = d.total;
- _this.temList = _this.temList.concat(d.data);
+ var Data = d.data;
+ Data.forEach((item, index) => {
+ Data[index].icon = _this.$api.ossurl(item.icon);
+ });
+ _this.temList = _this.temList.concat(Data);
});