Merge branch 'master' of http://114.215.101.231:8099/yanchengjie/Bitcoin into yan
正在显示
12 个修改的文件
包含
965 行增加
和
633 行删除
@@ -27,11 +27,12 @@ export const product_favorite = (product_id) => request({url: 'product/product_ | @@ -27,11 +27,12 @@ export const product_favorite = (product_id) => request({url: 'product/product_ | ||
27 | // 产品举报原因 | 27 | // 产品举报原因 |
28 | export const report_list = (data) => request({url: 'product/report_list',method: 'post',data: data}) | 28 | export const report_list = (data) => request({url: 'product/report_list',method: 'post',data: data}) |
29 | 29 | ||
30 | +// 产品举报 | ||
31 | +export const product_report = (data) => request({url: 'product/product_report',method: 'post',data: data}) | ||
32 | + | ||
30 | // 获取买家填写的信息 | 33 | // 获取买家填写的信息 |
31 | export const last_buy_data = (data) => request({url: 'product/last_buy_data',method: 'post',data: data}) | 34 | export const last_buy_data = (data) => request({url: 'product/last_buy_data',method: 'post',data: data}) |
32 | 35 | ||
33 | -// 产品举报 | ||
34 | -export const product_report = (data) => request({url: 'product/product_report',method: 'post',data: data}) | ||
35 | 36 | ||
36 | // 实名认证 | 37 | // 实名认证 |
37 | export const user_cert = (data) => request({url: 'user/user_cert',method: 'post',data: data}) | 38 | export const user_cert = (data) => request({url: 'user/user_cert',method: 'post',data: data}) |
node_modules/jweixin-module/README.md
0 → 100644
1 | +# jweixin-module | ||
2 | + | ||
3 | +微信JS-SDK | ||
4 | + | ||
5 | +## 安装 | ||
6 | + | ||
7 | +### NPM | ||
8 | + | ||
9 | +```shell | ||
10 | +npm install jweixin-module --save | ||
11 | +``` | ||
12 | + | ||
13 | +### UMD | ||
14 | + | ||
15 | +```http | ||
16 | +https://unpkg.com/jweixin-module/out/index.js | ||
17 | +``` | ||
18 | + | ||
19 | +## 使用 | ||
20 | + | ||
21 | +```js | ||
22 | +var jweixin = require('jweixin-module') | ||
23 | +jweixin.ready(function(){ | ||
24 | + // TODO | ||
25 | +}); | ||
26 | +``` | ||
27 | + | ||
28 | +## 完整API | ||
29 | + | ||
30 | +>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115) |
node_modules/jweixin-module/lib/index.js
0 → 100644
1 | +!function(e,n){"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)}(window,function(o,e){if(!o.jWeixin){var n,c={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},a=function(){var e={};for(var n in c)e[c[n]]=n;return e}(),i=o.document,t=i.title,r=navigator.userAgent.toLowerCase(),s=navigator.platform.toLowerCase(),d=!(!s.match("mac")&&!s.match("win")),u=-1!=r.indexOf("wxdebugger"),l=-1!=r.indexOf("micromessenger"),p=-1!=r.indexOf("android"),f=-1!=r.indexOf("iphone")||-1!=r.indexOf("ipad"),m=(n=r.match(/micromessenger\/(\d+\.\d+\.\d+)/)||r.match(/micromessenger\/(\d+\.\d+)/))?n[1]:"",g={initStartTime:L(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},h={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:f?1:p?2:-1,clientVersion:m,url:encodeURIComponent(location.href)},v={},S={_completes:[]},y={state:0,data:{}};O(function(){g.initEndTime=L()});var I=!1,_=[],w={config:function(e){B("config",v=e);var t=!1!==v.check;O(function(){if(t)M(c.config,{verifyJsApiList:C(v.jsApiList),verifyOpenTagList:C(v.openTagList)},function(){S._complete=function(e){g.preVerifyEndTime=L(),y.state=1,y.data=e},S.success=function(e){h.isPreVerifyOk=0},S.fail=function(e){S._fail?S._fail(e):y.state=-1};var t=S._completes;return t.push(function(){!function(){if(!(d||u||v.debug||m<"6.0.2"||h.systemType<0)){var i=new Image;h.appId=v.appId,h.initTime=g.initEndTime-g.initStartTime,h.preVerifyTime=g.preVerifyEndTime-g.preVerifyStartTime,w.getNetworkType({isInnerInvoke:!0,success:function(e){h.networkType=e.networkType;var n="https://open.weixin.qq.com/sdk/report?v="+h.version+"&o="+h.isPreVerifyOk+"&s="+h.systemType+"&c="+h.clientVersion+"&a="+h.appId+"&n="+h.networkType+"&i="+h.initTime+"&p="+h.preVerifyTime+"&u="+h.url;i.src=n}})}}()}),S.complete=function(e){for(var n=0,i=t.length;n<i;++n)t[n]();S._completes=[]},S}()),g.preVerifyStartTime=L();else{y.state=1;for(var e=S._completes,n=0,i=e.length;n<i;++n)e[n]();S._completes=[]}}),w.invoke||(w.invoke=function(e,n,i){o.WeixinJSBridge&&WeixinJSBridge.invoke(e,x(n),i)},w.on=function(e,n){o.WeixinJSBridge&&WeixinJSBridge.on(e,n)})},ready:function(e){0!=y.state?e():(S._completes.push(e),!l&&v.debug&&e())},error:function(e){m<"6.0.2"||(-1==y.state?e(y.data):S._fail=e)},checkJsApi:function(e){M("checkJsApi",{jsApiList:C(e.jsApiList)},(e._complete=function(e){if(p){var n=e.checkResult;n&&(e.checkResult=JSON.parse(n))}e=function(e){var n=e.checkResult;for(var i in n){var t=a[i];t&&(n[t]=n[i],delete n[i])}return e}(e)},e))},onMenuShareTimeline:function(e){P(c.onMenuShareTimeline,{complete:function(){M("shareTimeline",{title:e.title||t,desc:e.title||t,img_url:e.imgUrl||"",link:e.link||location.href,type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareAppMessage:function(n){P(c.onMenuShareAppMessage,{complete:function(e){"favorite"===e.scene?M("sendAppMessage",{title:n.title||t,desc:n.desc||"",link:n.link||location.href,img_url:n.imgUrl||"",type:n.type||"link",data_url:n.dataUrl||""}):M("sendAppMessage",{title:n.title||t,desc:n.desc||"",link:n.link||location.href,img_url:n.imgUrl||"",type:n.type||"link",data_url:n.dataUrl||""},n)}},n)},onMenuShareQQ:function(e){P(c.onMenuShareQQ,{complete:function(){M("shareQQ",{title:e.title||t,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareWeibo:function(e){P(c.onMenuShareWeibo,{complete:function(){M("shareWeiboApp",{title:e.title||t,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareQZone:function(e){P(c.onMenuShareQZone,{complete:function(){M("shareQZone",{title:e.title||t,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},updateTimelineShareData:function(e){M("updateTimelineShareData",{title:e.title,link:e.link,imgUrl:e.imgUrl},e)},updateAppMessageShareData:function(e){M("updateAppMessageShareData",{title:e.title,desc:e.desc,link:e.link,imgUrl:e.imgUrl},e)},startRecord:function(e){M("startRecord",{},e)},stopRecord:function(e){M("stopRecord",{},e)},onVoiceRecordEnd:function(e){P("onVoiceRecordEnd",e)},playVoice:function(e){M("playVoice",{localId:e.localId},e)},pauseVoice:function(e){M("pauseVoice",{localId:e.localId},e)},stopVoice:function(e){M("stopVoice",{localId:e.localId},e)},onVoicePlayEnd:function(e){P("onVoicePlayEnd",e)},uploadVoice:function(e){M("uploadVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadVoice:function(e){M("downloadVoice",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},translateVoice:function(e){M("translateVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},chooseImage:function(e){M("chooseImage",{scene:"1|2",count:e.count||9,sizeType:e.sizeType||["original","compressed"],sourceType:e.sourceType||["album","camera"]},(e._complete=function(e){if(p){var n=e.localIds;try{n&&(e.localIds=JSON.parse(n))}catch(e){}}},e))},getLocation:function(e){},previewImage:function(e){M(c.previewImage,{current:e.current,urls:e.urls},e)},uploadImage:function(e){M("uploadImage",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadImage:function(e){M("downloadImage",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},getLocalImgData:function(e){!1===I?(I=!0,M("getLocalImgData",{localId:e.localId},(e._complete=function(e){if(I=!1,0<_.length){var n=_.shift();wx.getLocalImgData(n)}},e))):_.push(e)},getNetworkType:function(e){M("getNetworkType",{},(e._complete=function(e){e=function(e){var n=e.errMsg;e.errMsg="getNetworkType:ok";var i=e.subtype;if(delete e.subtype,i)e.networkType=i;else{var t=n.indexOf(":"),o=n.substring(t+1);switch(o){case"wifi":case"edge":case"wwan":e.networkType=o;break;default:e.errMsg="getNetworkType:fail"}}return e}(e)},e))},openLocation:function(e){M("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){M(c.getLocation,{type:(e=e||{}).type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){M("hideOptionMenu",{},e)},showOptionMenu:function(e){M("showOptionMenu",{},e)},closeWindow:function(e){M("closeWindow",{},e=e||{})},hideMenuItems:function(e){M("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){M("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){M("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){M("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){M("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(f){var n=e.resultStr;if(n){var i=JSON.parse(n);e.resultStr=i&&i.scan_code&&i.scan_code.scan_result}}},e))},openAddress:function(e){M(c.openAddress,{},(e._complete=function(e){e=function(e){return e.postalCode=e.addressPostalCode,delete e.addressPostalCode,e.provinceName=e.proviceFirstStageName,delete e.proviceFirstStageName,e.cityName=e.addressCitySecondStageName,delete e.addressCitySecondStageName,e.countryName=e.addressCountiesThirdStageName,delete e.addressCountiesThirdStageName,e.detailInfo=e.addressDetailInfo,delete e.addressDetailInfo,e}(e)},e))},openProductSpecificView:function(e){M(c.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var n=e.cardList,i=[],t=0,o=n.length;t<o;++t){var r=n[t],a={card_id:r.cardId,card_ext:r.cardExt};i.push(a)}M(c.addCard,{card_list:i},(e._complete=function(e){var n=e.card_list;if(n){for(var i=0,t=(n=JSON.parse(n)).length;i<t;++i){var o=n[i];o.cardId=o.card_id,o.cardExt=o.card_ext,o.isSuccess=!!o.is_succ,delete o.card_id,delete o.card_ext,delete o.is_succ}e.cardList=n,delete e.card_list}},e))},chooseCard:function(e){M("chooseCard",{app_id:v.appId,location_id:e.shopId||"",sign_type:e.signType||"SHA1",card_id:e.cardId||"",card_type:e.cardType||"",card_sign:e.cardSign,time_stamp:e.timestamp+"",nonce_str:e.nonceStr},(e._complete=function(e){e.cardList=e.choose_card_info,delete e.choose_card_info},e))},openCard:function(e){for(var n=e.cardList,i=[],t=0,o=n.length;t<o;++t){var r=n[t],a={card_id:r.cardId,code:r.code};i.push(a)}M(c.openCard,{card_list:i},e)},consumeAndShareCard:function(e){M(c.consumeAndShareCard,{consumedCardId:e.cardId,consumedCode:e.code},e)},chooseWXPay:function(e){M(c.chooseWXPay,V(e),e)},openEnterpriseRedPacket:function(e){M(c.openEnterpriseRedPacket,V(e),e)},startSearchBeacons:function(e){M(c.startSearchBeacons,{ticket:e.ticket},e)},stopSearchBeacons:function(e){M(c.stopSearchBeacons,{},e)},onSearchBeacons:function(e){P(c.onSearchBeacons,e)},openEnterpriseChat:function(e){M("openEnterpriseChat",{useridlist:e.userIds,chatname:e.groupName},e)},launchMiniProgram:function(e){M("launchMiniProgram",{targetAppId:e.targetAppId,path:function(e){if("string"==typeof e&&0<e.length){var n=e.split("?")[0],i=e.split("?")[1];return n+=".html",void 0!==i?n+"?"+i:n}}(e.path),envVersion:e.envVersion},e)},openBusinessView:function(e){M("openBusinessView",{businessType:e.businessType,queryString:e.queryString||"",envVersion:e.envVersion},(e._complete=function(n){if(p){var e=n.extraData;if(e)try{n.extraData=JSON.parse(e)}catch(e){n.extraData={}}}},e))},miniProgram:{navigateBack:function(e){e=e||{},O(function(){M("invokeMiniProgramAPI",{name:"navigateBack",arg:{delta:e.delta||1}},e)})},navigateTo:function(e){O(function(){M("invokeMiniProgramAPI",{name:"navigateTo",arg:{url:e.url}},e)})},redirectTo:function(e){O(function(){M("invokeMiniProgramAPI",{name:"redirectTo",arg:{url:e.url}},e)})},switchTab:function(e){O(function(){M("invokeMiniProgramAPI",{name:"switchTab",arg:{url:e.url}},e)})},reLaunch:function(e){O(function(){M("invokeMiniProgramAPI",{name:"reLaunch",arg:{url:e.url}},e)})},postMessage:function(e){O(function(){M("invokeMiniProgramAPI",{name:"postMessage",arg:e.data||{}},e)})},getEnv:function(e){O(function(){e({miniprogram:"miniprogram"===o.__wxjs_environment})})}}},T=1,k={};return i.addEventListener("error",function(e){if(!p){var n=e.target,i=n.tagName,t=n.src;if("IMG"==i||"VIDEO"==i||"AUDIO"==i||"SOURCE"==i)if(-1!=t.indexOf("wxlocalresource://")){e.preventDefault(),e.stopPropagation();var o=n["wx-id"];if(o||(o=T++,n["wx-id"]=o),k[o])return;k[o]=!0,wx.ready(function(){wx.getLocalImgData({localId:t,success:function(e){n.src=e.localData}})})}}},!0),i.addEventListener("load",function(e){if(!p){var n=e.target,i=n.tagName;n.src;if("IMG"==i||"VIDEO"==i||"AUDIO"==i||"SOURCE"==i){var t=n["wx-id"];t&&(k[t]=!1)}}},!0),e&&(o.wx=o.jWeixin=w),w}function M(n,e,i){o.WeixinJSBridge?WeixinJSBridge.invoke(n,x(e),function(e){A(n,e,i)}):B(n,i)}function P(n,i,t){o.WeixinJSBridge?WeixinJSBridge.on(n,function(e){t&&t.trigger&&t.trigger(e),A(n,e,i)}):B(n,t||i)}function x(e){return(e=e||{}).appId=v.appId,e.verifyAppId=v.appId,e.verifySignType="sha1",e.verifyTimestamp=v.timestamp+"",e.verifyNonceStr=v.nonceStr,e.verifySignature=v.signature,e}function V(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function A(e,n,i){"openEnterpriseChat"!=e&&"openBusinessView"!==e||(n.errCode=n.err_code),delete n.err_code,delete n.err_desc,delete n.err_detail;var t=n.errMsg;t||(t=n.err_msg,delete n.err_msg,t=function(e,n){var i=e,t=a[i];t&&(i=t);var o="ok";if(n){var r=n.indexOf(":");"confirm"==(o=n.substring(r+1))&&(o="ok"),"failed"==o&&(o="fail"),-1!=o.indexOf("failed_")&&(o=o.substring(7)),-1!=o.indexOf("fail_")&&(o=o.substring(5)),"access denied"!=(o=(o=o.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=o||(o="permission denied"),"config"==i&&"function not exist"==o&&(o="ok"),""==o&&(o="fail")}return n=i+":"+o}(e,t),n.errMsg=t),(i=i||{})._complete&&(i._complete(n),delete i._complete),t=n.errMsg||"",v.debug&&!i.isInnerInvoke&&alert(JSON.stringify(n));var o=t.indexOf(":");switch(t.substring(o+1)){case"ok":i.success&&i.success(n);break;case"cancel":i.cancel&&i.cancel(n);break;default:i.fail&&i.fail(n)}i.complete&&i.complete(n)}function C(e){if(e){for(var n=0,i=e.length;n<i;++n){var t=e[n],o=c[t];o&&(e[n]=o)}return e}}function B(e,n){if(!(!v.debug||n&&n.isInnerInvoke)){var i=a[e];i&&(e=i),n&&n._complete&&delete n._complete,console.log('"'+e+'",',n||"")}}function L(){return(new Date).getTime()}function O(e){l&&(o.WeixinJSBridge?e():i.addEventListener&&i.addEventListener("WeixinJSBridgeReady",e,!1))}}); |
node_modules/jweixin-module/package.json
0 → 100644
1 | +{ | ||
2 | + "_from": "jweixin-module", | ||
3 | + "_id": "jweixin-module@1.6.0", | ||
4 | + "_inBundle": false, | ||
5 | + "_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==", | ||
6 | + "_location": "/jweixin-module", | ||
7 | + "_phantomChildren": {}, | ||
8 | + "_requested": { | ||
9 | + "type": "tag", | ||
10 | + "registry": true, | ||
11 | + "raw": "jweixin-module", | ||
12 | + "name": "jweixin-module", | ||
13 | + "escapedName": "jweixin-module", | ||
14 | + "rawSpec": "", | ||
15 | + "saveSpec": null, | ||
16 | + "fetchSpec": "latest" | ||
17 | + }, | ||
18 | + "_requiredBy": [ | ||
19 | + "#USER", | ||
20 | + "/" | ||
21 | + ], | ||
22 | + "_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", | ||
23 | + "_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd", | ||
24 | + "_spec": "jweixin-module", | ||
25 | + "_where": "F:\\minigroup\\Bitcoin", | ||
26 | + "author": { | ||
27 | + "name": "Shengqiang Guo" | ||
28 | + }, | ||
29 | + "bugs": { | ||
30 | + "url": "https://github.com/zhetengbiji/jweixin-module/issues" | ||
31 | + }, | ||
32 | + "bundleDependencies": false, | ||
33 | + "deprecated": false, | ||
34 | + "description": "微信JS-SDK", | ||
35 | + "devDependencies": {}, | ||
36 | + "homepage": "https://github.com/zhetengbiji/jweixin-module#readme", | ||
37 | + "keywords": [ | ||
38 | + "wxjssdk", | ||
39 | + "weixin", | ||
40 | + "jweixin", | ||
41 | + "wechat", | ||
42 | + "jssdk", | ||
43 | + "wx" | ||
44 | + ], | ||
45 | + "license": "ISC", | ||
46 | + "main": "lib/index.js", | ||
47 | + "name": "jweixin-module", | ||
48 | + "repository": { | ||
49 | + "type": "git", | ||
50 | + "url": "git+https://github.com/zhetengbiji/jweixin-module.git" | ||
51 | + }, | ||
52 | + "scripts": {}, | ||
53 | + "version": "1.6.0" | ||
54 | +} |
@@ -2,6 +2,11 @@ | @@ -2,6 +2,11 @@ | ||
2 | "requires": true, | 2 | "requires": true, |
3 | "lockfileVersion": 1, | 3 | "lockfileVersion": 1, |
4 | "dependencies": { | 4 | "dependencies": { |
5 | + "jweixin-module": { | ||
6 | + "version": "1.6.0", | ||
7 | + "resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", | ||
8 | + "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==" | ||
9 | + }, | ||
5 | "uview-ui": { | 10 | "uview-ui": { |
6 | "version": "2.0.31", | 11 | "version": "2.0.31", |
7 | "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.31.tgz", | 12 | "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.31.tgz", |
1 | <template> | 1 | <template> |
2 | <view class=""> | 2 | <view class=""> |
3 | <view class="mainBox"> | 3 | <view class="mainBox"> |
4 | - <view class="title">比特币跌幅超61%,山寨币跌幅超80%,熊市到底了吗?</view> | 4 | + <view class="title">{{detail.title}}</view> |
5 | <view class="timenev flexD"> | 5 | <view class="timenev flexD"> |
6 | <view class="time"> | 6 | <view class="time"> |
7 | - 发布时间: 2022-05-22 21:56 | 7 | + 发布时间{{detail.publishtime}} |
8 | </view> | 8 | </view> |
9 | <image src="../../static/ic_fenxiang.png" mode=""></image> | 9 | <image src="../../static/ic_fenxiang.png" mode=""></image> |
10 | </view> | 10 | </view> |
11 | - <rich-text nodes="string"></rich-text> | 11 | + <rich-text :nodes="detail.content"></rich-text> |
12 | </view> | 12 | </view> |
13 | 13 | ||
14 | </view> | 14 | </view> |
15 | </template> | 15 | </template> |
16 | 16 | ||
17 | <script> | 17 | <script> |
18 | + import { | ||
19 | + arc_detail | ||
20 | + } from '@/api/index.js' | ||
21 | + export default { | ||
22 | + data() { | ||
23 | + return { | ||
24 | + id: "", | ||
25 | + detail: { | ||
26 | + title: "", | ||
27 | + publishtime: "", | ||
28 | + content: "", | ||
29 | + } | ||
30 | + } | ||
31 | + }, | ||
32 | + onLoad(options) { | ||
33 | + this.id = options.id | ||
34 | + this.arc_detail() | ||
35 | + }, | ||
36 | + methods: { | ||
37 | + //详情 | ||
38 | + async arc_detail() { | ||
39 | + try { | ||
40 | + const res = await arc_detail(this.id) | ||
41 | + this.detail = res.detail | ||
42 | + console.log('arc_detail', res) | ||
43 | + // 保存数据 | ||
44 | + } catch (err) { | ||
45 | + uni.showToast({ | ||
46 | + title: err, | ||
47 | + icon: 'none' | ||
48 | + }) | ||
49 | + console.log('arc_detail', err) | ||
50 | + } | ||
51 | + }, | ||
52 | + } | ||
53 | + } | ||
18 | </script> | 54 | </script> |
19 | 55 | ||
20 | <style lang="less"> | 56 | <style lang="less"> |
21 | .mainBox { | 57 | .mainBox { |
22 | padding: 24rpx 31rpx; | 58 | padding: 24rpx 31rpx; |
59 | + | ||
23 | .timenev { | 60 | .timenev { |
24 | margin-top: 20rpx; | 61 | margin-top: 20rpx; |
25 | color: rgba(179, 179, 179, 1); | 62 | color: rgba(179, 179, 179, 1); |
@@ -97,7 +97,6 @@ | @@ -97,7 +97,6 @@ | ||
97 | 举报原因 | 97 | 举报原因 |
98 | </view> | 98 | </view> |
99 | <view class="select"> | 99 | <view class="select"> |
100 | - <uni-data-select v-model="value" :localdata="range" @change="change()"></uni-data-select> | ||
101 | <image src="../../static/ic-arrow2.png" mode=""></image> | 100 | <image src="../../static/ic-arrow2.png" mode=""></image> |
102 | </view> | 101 | </view> |
103 | </view> | 102 | </view> |
@@ -106,7 +105,7 @@ | @@ -106,7 +105,7 @@ | ||
106 | 详细描述 | 105 | 详细描述 |
107 | </view> | 106 | </view> |
108 | <view class="showcont"> | 107 | <view class="showcont"> |
109 | - description | 108 | + <textarea name="" id="" cols="30" rows="10" placeholder="请输入"></textarea> |
110 | </view> | 109 | </view> |
111 | </view> | 110 | </view> |
112 | <view class="btngroup"> | 111 | <view class="btngroup"> |
@@ -123,16 +122,14 @@ | @@ -123,16 +122,14 @@ | ||
123 | </template> | 122 | </template> |
124 | 123 | ||
125 | <script> | 124 | <script> |
125 | + let jweixin = require('jweixin-module') | ||
126 | import { | 126 | import { |
127 | product_detail, | 127 | product_detail, |
128 | product_favorite, | 128 | product_favorite, |
129 | report_list | 129 | report_list |
130 | } from '@/api/index.js' | 130 | } from '@/api/index.js' |
131 | - import uniselect from "@/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue" | ||
132 | export default { | 131 | export default { |
133 | - components: { | ||
134 | - "uni-data-select": uniselect | ||
135 | - }, | 132 | + |
136 | data() { | 133 | data() { |
137 | return { | 134 | return { |
138 | id: "", | 135 | id: "", |
@@ -191,6 +188,8 @@ | @@ -191,6 +188,8 @@ | ||
191 | console.log('report_list', err) | 188 | console.log('report_list', err) |
192 | } | 189 | } |
193 | }, | 190 | }, |
191 | + // 举报 | ||
192 | + | ||
194 | //收藏、取消收藏 | 193 | //收藏、取消收藏 |
195 | async product_favorite() { | 194 | async product_favorite() { |
196 | try { | 195 | try { |
@@ -475,7 +474,7 @@ | @@ -475,7 +474,7 @@ | ||
475 | padding: 24rpx; | 474 | padding: 24rpx; |
476 | width: 526rpx; | 475 | width: 526rpx; |
477 | height: 252rpx; | 476 | height: 252rpx; |
478 | - border: 2rpx solid rgba(0.9407999515533447, 0.9475764036178589, 0.9599999785423279, .3); | 477 | + border: 2rpx solid rgba(0.9407999515533447, 0.9475764036178589, 0.9599999785423279, .1); |
479 | } | 478 | } |
480 | } | 479 | } |
481 | 480 |
1 | -<template> | ||
2 | - <view class="content"> | ||
3 | - <view class="top"> | ||
4 | - <view class="logo"> | ||
5 | - <image src="/static/ic_logo.png" mode=""></image> | ||
6 | - <view class="search"> | ||
7 | - <view class="tosear" @click="gosourch"> | ||
8 | - <input type="text" value="" placeholder="搜索" disabled="true" | ||
9 | - placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" /> | ||
10 | - <image src="/static/icon-search.png" mode=""></image> | ||
11 | - </view> | ||
12 | - </view> | ||
13 | - </view> | ||
14 | - <view class="banner"> | ||
15 | - <u-swiper keyName="image_preview" :list="list1" @click="click" :indicator="true" indicatorMode="dot" | ||
16 | - radius="12" height="160" :circular="true"> | ||
17 | - </u-swiper> | ||
18 | - </view> | ||
19 | - </view> | ||
20 | - <view class="contail"> | ||
21 | - <view class="nev"> | ||
22 | - <view class="bar" v-for="(item,index) in categoryList" :key="index"> | ||
23 | - <image class="barimg" :src="item.image_preview" mode=""></image> | ||
24 | - <text>{{item.name}}</text> | ||
25 | - </view> | ||
26 | - <view class="bar" v-if="categoryLength>8"> | ||
27 | - <image class="barimg" src="/static/logo.png" mode=""></image> | ||
28 | - <text>更多</text> | ||
29 | - </view> | ||
30 | - </view> | ||
31 | - <view class="info"> | ||
32 | - <view class="leftbox"> | ||
33 | - <view class="lefttitle"> | ||
34 | - <view class="title"> | ||
35 | - 相关资讯 | ||
36 | - </view> | ||
37 | - <view class="more"> | ||
38 | - 更多 | ||
39 | - <image src="/static/ic-arrow.png" mode=""></image> | ||
40 | - </view> | ||
41 | - </view> | ||
42 | - <view class="newbar"> | ||
43 | - <view v-for="(item,index) in informationList" :key="index">·{{item.title}}</view> | ||
44 | - </view> | ||
45 | - </view> | ||
46 | - <view class="rightbox"> | ||
47 | - <view class="righttitle"> | ||
48 | - <view class="title"> | ||
49 | - 相关资讯 | ||
50 | - </view> | ||
51 | - <view class="active"> | ||
52 | - 充值活动 | ||
53 | - </view> | ||
54 | - </view> | ||
55 | - <view class="activeimg"> | ||
56 | - <image src="/static/Rectangle 2372.png" mode=""></image> | ||
57 | - <!-- <image src="/static/logo.png" mode=""></image> | ||
58 | - <image src="/static/logo.png" mode=""></image> --> | ||
59 | - </view> | ||
60 | - </view> | ||
61 | - </view> | ||
62 | - <view class="waterfall"> | ||
63 | - <view class="falltitle"> | ||
64 | - <view class="fallnev" :class="{newfall:fallindex==1}" @click="changefall(1)"> | ||
65 | - 猜你喜欢 | ||
66 | - <view class="tip"> | ||
67 | - | ||
68 | - </view> | ||
69 | - </view> | ||
70 | - <view class="fallnev" :class="{newfall:fallindex==2}" @click="changefall(2)"> | ||
71 | - 最新 | ||
72 | - <view class="tip"> | ||
73 | - | ||
74 | - </view> | ||
75 | - </view> | ||
76 | - <view class="fallnev" :class="{newfall:fallindex==3}" @click="changefall(3)"> | ||
77 | - 人气 | ||
78 | - <view class="tip"> | ||
79 | - | ||
80 | - </view> | ||
81 | - </view> | ||
82 | - </view> | ||
83 | - <view class="misslist"> | ||
84 | - <custom-waterfalls-flow :value="list" @wapperClick="godetail"> | ||
85 | - <template v-slot:default="item"> | ||
86 | - <view class="item"> | ||
87 | - <view class="title">{{item.name}}</view> | ||
88 | - <view class="types"> | ||
89 | - 所属分类:{{item.sort.name}} | ||
90 | - </view> | ||
91 | - <view class="desc"> | ||
92 | - <text v-if="item.seller_name">{{item.seller_name}}</text> | ||
93 | - <view class="money"> | ||
94 | - <text>¥</text>{{item.price}} | ||
95 | - </view> | ||
96 | - </view> | ||
97 | - </view> | ||
98 | - </template> | ||
99 | - </custom-waterfalls-flow> | ||
100 | - </view> | ||
101 | - </view> | ||
102 | - </view> | ||
103 | - <Botton :flag="1"></Botton> | ||
104 | - </view> | ||
105 | -</template> | ||
106 | - | ||
107 | -<script> | ||
108 | - import { | ||
109 | - getBanner, | ||
110 | - sortList, | ||
111 | - arcList, | ||
112 | - product_list, | ||
113 | - product_report | ||
114 | - } from '@/api/index' | ||
115 | - import helangWaterfall from "@/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue" | ||
116 | - import Botton from "@/components/Botton.vue" | ||
117 | - export default { | ||
118 | - components: { | ||
119 | - "custom-waterfalls-flow": helangWaterfall, | ||
120 | - "Botton": Botton | ||
121 | - }, | ||
122 | - data() { | ||
123 | - return { | ||
124 | - title: 'Hello', | ||
125 | - list1: [ | ||
126 | - 'https://cdn.uviewui.com/uview/swiper/swiper1.png', | ||
127 | - 'https://cdn.uviewui.com/uview/swiper/swiper2.png', | ||
128 | - 'https://cdn.uviewui.com/uview/swiper/swiper3.png', | ||
129 | - ], | ||
130 | - nevlist: [1, 2, 3, 4, , 6, 7], | ||
131 | - leftlist: [1, 2, 3], | ||
132 | - fallindex: 1, | ||
133 | - //瀑布 | ||
134 | - list: [], | ||
135 | - categoryList: [], // 分类列表 | ||
136 | - categoryLength: 0, //分类数量 | ||
137 | - informationList: [], // 相关资讯 | ||
138 | - currentpage: 1, //分页 | ||
139 | - } | ||
140 | - }, | ||
141 | - onShow() { | ||
142 | - this.initial() | ||
143 | - this.product_list() | ||
144 | - }, | ||
145 | - onLoad() { | ||
146 | - | ||
147 | - }, | ||
148 | - methods: { | ||
149 | - //产品举报 | ||
150 | - async product_report(){ | ||
151 | - let obj={ | ||
152 | - product_id:this.id, | ||
153 | - report_id:"", | ||
154 | - content:"", | ||
155 | - } | ||
156 | - try { | ||
157 | - // 轮播图 | ||
158 | - const res = await getBanner() | ||
159 | - // 分类 | ||
160 | - const sortRes = await sortList(1) | ||
161 | - // 相关资讯 | ||
162 | - const information= await arcList() | ||
163 | - // 轮播图 | ||
164 | - this.list1 =res.list | ||
165 | - this.categoryLength = sortRes.list.length | ||
166 | - this.categoryList = sortRes.list.length>8?sortRes.list.slice(0,7):sortRes.list | ||
167 | - this.informationList = information.list.length>3?information.list.slice(0,3):information.list | ||
168 | - console.log(sortRes,'分类'); | ||
169 | - console.log('getBanner', res) | ||
170 | - console.log(information,'资讯列表'); | ||
171 | - const result = await product_report(obj) | ||
172 | - console.log('product_report', result) | ||
173 | - // 保存数据 | ||
174 | - } catch (err) { | ||
175 | - uni.showToast({ title:err,icon:'none' }) | ||
176 | - console.log('product_report', err) | ||
177 | - } | ||
178 | - }, | ||
179 | - //产品列表 | ||
180 | - async product_list() { | ||
181 | - let obj = { | ||
182 | - type: this.fallindex, | ||
183 | - page: this.currentpage, | ||
184 | - pagenum: 15, | ||
185 | - } | ||
186 | - try { | ||
187 | - const res = await product_list(obj) | ||
188 | - console.log('产品列表', res) | ||
189 | - this.list = res.list.data | ||
190 | - this.list.forEach((item, index) => { | ||
191 | - item.image = item.images_preview[0] | ||
192 | - }) | ||
193 | - console.log('产品列表', this.list) | ||
194 | - // 保存数据 | ||
195 | - } catch (err) { | ||
196 | - uni.showToast({ | ||
197 | - title: err, | ||
198 | - icon: 'none' | ||
199 | - }) | ||
200 | - console.log('product_list', err) | ||
201 | - } | ||
202 | - }, | ||
203 | - async initial() { | ||
204 | - try { | ||
205 | - // 轮播图 | ||
206 | - const res = await getBanner() | ||
207 | - // 分类 | ||
208 | - const sortRes = await sortList() | ||
209 | - // 相关资讯 | ||
210 | - const information = await arcList() | ||
211 | - // 轮播图 | ||
212 | - this.list1 = res.list | ||
213 | - this.categoryLength = sortRes.list.length | ||
214 | - this.categoryList = sortRes.list.length > 8 ? sortRes.list.slice(0, 7) : sortRes.list | ||
215 | - this.informationList = information.list.length > 3 ? information.list.slice(0, 3) : information | ||
216 | - .list | ||
217 | - console.log(sortRes, '分类'); | ||
218 | - console.log('getBanner', res) | ||
219 | - console.log(information, '资讯列表'); | ||
220 | - // 保存数据 | ||
221 | - } catch (err) { | ||
222 | - uni.showToast({ | ||
223 | - title: err, | ||
224 | - icon: 'none' | ||
225 | - }) | ||
226 | - console.log('getBanner', err) | ||
227 | - } | ||
228 | - }, | ||
229 | - changefall(e) { | ||
230 | - this.fallindex = e | ||
231 | - }, | ||
232 | - //跳转详情 | ||
233 | - godetail(item) { | ||
234 | - console.log(1) | ||
235 | - uni.navigateTo({ | ||
236 | - url: "/pages/index/detail?id=" +item.id | ||
237 | - }) | ||
238 | - }, | ||
239 | - //跳转搜索 | ||
240 | - gosourch() { | ||
241 | - uni.navigateTo({ | ||
242 | - url: "/pages/index/search" | ||
243 | - }) | ||
244 | - }, | ||
245 | - } | ||
246 | - } | ||
247 | -</script> | ||
248 | - | ||
249 | -<style lang="scss"> | ||
250 | - page { | ||
251 | - background: rgba(246, 246, 246, 1); | ||
252 | - } | ||
253 | - | ||
254 | - .content { | ||
255 | - | ||
256 | - .top { | ||
257 | - height: 370rpx; | ||
258 | - background-image: linear-gradient(#FED000, #ffffff); | ||
259 | - padding: 32rpx; | ||
260 | - | ||
261 | - .logo { | ||
262 | - display: flex; | ||
263 | - align-items: center; | ||
264 | - | ||
265 | - image { | ||
266 | - width: 84rpx; | ||
267 | - height: 74rpx; | ||
268 | - margin-right: 36rpx; | ||
269 | - } | ||
270 | - | ||
271 | - .search { | ||
272 | - flex: 1; | ||
273 | - display: flex; | ||
274 | - align-items: center; | ||
275 | - | ||
276 | - .tosear { | ||
277 | - position: relative; | ||
278 | - width: 522rpx; | ||
279 | - height: 64rpx; | ||
280 | - border-radius: 38rpx; | ||
281 | - opacity: 1; | ||
282 | - | ||
283 | - border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1); | ||
284 | - background: rgba(245, 245, 245, 1); | ||
285 | - padding: 0 32rpx; | ||
286 | - | ||
287 | - input { | ||
288 | - text-align: center; | ||
289 | - width: 100%; | ||
290 | - height: 100%; | ||
291 | - } | ||
292 | - | ||
293 | - image { | ||
294 | - position: absolute; | ||
295 | - left: 280rpx; | ||
296 | - top: 50%; | ||
297 | - left: 36%; | ||
298 | - transform: translateY(-50%); | ||
299 | - width: 32rpx; | ||
300 | - height: 32rpx; | ||
301 | - } | ||
302 | - } | ||
303 | - } | ||
304 | - | ||
305 | - | ||
306 | - } | ||
307 | - | ||
308 | - .banner { | ||
309 | - margin-top: 32rpx; | ||
310 | - height: 320rpx; | ||
311 | - border-radius: 24rpx; | ||
312 | - } | ||
313 | - } | ||
314 | - | ||
315 | - .contail { | ||
316 | - padding: 0 32rpx; | ||
317 | - padding-bottom: 160rpx; | ||
318 | - box-sizing: border-box; | ||
319 | - | ||
320 | - .nev { | ||
321 | - margin-top: 48rpx; | ||
322 | - border-radius: 24rpx; | ||
323 | - padding: 0 32rpx; | ||
324 | - box-sizing: border-box; | ||
325 | - padding-bottom: 32rpx; | ||
326 | - background: rgba(255, 255, 255, 1); | ||
327 | - display: flex; | ||
328 | - flex-wrap: wrap; | ||
329 | - | ||
330 | - .bar { | ||
331 | - margin-top: 40rpx; | ||
332 | - margin-right: 68rpx; | ||
333 | - width: 104rpx; | ||
334 | - height: 124rpx; | ||
335 | - display: flex; | ||
336 | - flex-direction: column; | ||
337 | - align-items: center; | ||
338 | - color: rgba(0, 0, 0, 0.9); | ||
339 | - font-size: 26rpx; | ||
340 | - font-weight: 400; | ||
341 | - font-family: "PingFang SC"; | ||
342 | - text-align: center; | ||
343 | - | ||
344 | - .barimg { | ||
345 | - width: 80rpx; | ||
346 | - height: 80rpx; | ||
347 | - } | ||
348 | - | ||
349 | - &:nth-child(4n) { | ||
350 | - margin-right: 0; | ||
351 | - } | ||
352 | - } | ||
353 | - } | ||
354 | - | ||
355 | - .info { | ||
356 | - display: flex; | ||
357 | - margin-top: 24rpx; | ||
358 | - | ||
359 | - .leftbox { | ||
360 | - flex: 1; | ||
361 | - padding: 24rpx; | ||
362 | - margin-right: 22rpx; | ||
363 | - box-sizing: border-box; | ||
364 | - background: linear-gradient(180deg, rgba(255, 242, 242, 1) 0%, rgba(255, 255, 255, 1) 100%); | ||
365 | - | ||
366 | - .lefttitle { | ||
367 | - display: flex; | ||
368 | - align-items: center; | ||
369 | - justify-content: space-between; | ||
370 | - | ||
371 | - .title { | ||
372 | - opacity: 1; | ||
373 | - color: rgba(0, 0, 0, 1); | ||
374 | - font-size: 30rpx; | ||
375 | - font-weight: 500; | ||
376 | - font-family: "PingFang SC"; | ||
377 | - } | ||
378 | - | ||
379 | - | ||
380 | - | ||
381 | - .more { | ||
382 | - display: flex; | ||
383 | - align-items: center; | ||
384 | - | ||
385 | - image { | ||
386 | - width: 16rpx; | ||
387 | - height: 32rpx; | ||
388 | - } | ||
389 | - } | ||
390 | - } | ||
391 | - | ||
392 | - .newbar { | ||
393 | - color: rgba(0, 0, 0, 0.9); | ||
394 | - font-size: 22rpx; | ||
395 | - font-weight: 400; | ||
396 | - font-family: "PingFang SC"; | ||
397 | - text-align: left; | ||
398 | - | ||
399 | - view { | ||
400 | - margin-top: 16rpx; | ||
401 | - } | ||
402 | - } | ||
403 | - } | ||
404 | - | ||
405 | - .rightbox { | ||
406 | - flex: 1; | ||
407 | - padding: 24rpx; | ||
408 | - box-sizing: border-box; | ||
409 | - background: linear-gradient(180deg, rgba(255, 250, 231, 1) 0%, rgba(255, 255, 255, 1) 100%); | ||
410 | - | ||
411 | - .righttitle { | ||
412 | - display: flex; | ||
413 | - align-items: center; | ||
414 | - | ||
415 | - .title { | ||
416 | - color: rgba(50, 50, 51, 1); | ||
417 | - font-size: 30rpx; | ||
418 | - font-weight: 500; | ||
419 | - font-family: "PingFang SC"; | ||
420 | - } | ||
421 | - | ||
422 | - .active { | ||
423 | - margin-left: 16rpx; | ||
424 | - width: 104rpx; | ||
425 | - height: 32rpx; | ||
426 | - border-radius: 6rpx; | ||
427 | - opacity: 1; | ||
428 | - color: rgba(255, 255, 255, 1); | ||
429 | - font-size: 20rpx; | ||
430 | - font-weight: 500; | ||
431 | - font-family: "PingFang SC"; | ||
432 | - line-height: 32rpx; | ||
433 | - text-align: center; | ||
434 | - background: linear-gradient(90deg, rgba(255, 61, 61, 1) 0%, rgba(255, 122, 48, 1) 100%); | ||
435 | - } | ||
436 | - } | ||
437 | - | ||
438 | - .activeimg { | ||
439 | - margin-top: 12rpx; | ||
440 | - display: flex; | ||
441 | - align-items: center; | ||
442 | - justify-content: space-between; | ||
443 | - | ||
444 | - image { | ||
445 | - width: 284rpx; | ||
446 | - height: 136rpx; | ||
447 | - border-radius: 24rpx; | ||
448 | - } | ||
449 | - | ||
450 | - // image { | ||
451 | - // width: 134rpx; | ||
452 | - // height: 136rpx; | ||
453 | - // border-radius: 24rpx; | ||
454 | - // } | ||
455 | - } | ||
456 | - } | ||
457 | - } | ||
458 | - | ||
459 | - .waterfall { | ||
460 | - color: rgba(0, 0, 0, 0.9); | ||
461 | - font-size: 30rpx; | ||
462 | - font-weight: 400; | ||
463 | - font-family: "PingFang SC"; | ||
464 | - text-align: left; | ||
465 | - | ||
466 | - .falltitle { | ||
467 | - color: rgba(0, 0, 0, 0.9); | ||
468 | - font-size: 30rpx; | ||
469 | - font-weight: 400; | ||
470 | - font-family: "PingFang SC"; | ||
471 | - margin-top: 24rpx; | ||
472 | - display: flex; | ||
473 | - align-items: center; | ||
474 | - | ||
475 | - .fallnev { | ||
476 | - margin-right: 40rpx; | ||
477 | - | ||
478 | - .tip { | ||
479 | - width: 0; | ||
480 | - height: 0; | ||
481 | - | ||
482 | - } | ||
483 | - | ||
484 | - } | ||
485 | - | ||
486 | - .newfall { | ||
487 | - position: relative; | ||
488 | - color: rgba(0, 0, 0, 0.9); | ||
489 | - font-size: 36rpx; | ||
490 | - font-weight: 600; | ||
491 | - font-family: "PingFang SC"; | ||
492 | - | ||
493 | - .tip { | ||
494 | - position: absolute; | ||
495 | - bottom: 0; | ||
496 | - right: 0; | ||
497 | - width: 64rpx; | ||
498 | - height: 12rpx; | ||
499 | - border-radius: 14rpx; | ||
500 | - opacity: 1; | ||
501 | - background: rgba(254, 208, 0, .6); | ||
502 | - } | ||
503 | - } | ||
504 | - } | ||
505 | - | ||
506 | - .misslist { | ||
507 | - margin-top: 24rpx; | ||
508 | - | ||
509 | - .item { | ||
510 | - padding: 24rpx; | ||
511 | - box-sizing: border-box; | ||
512 | - | ||
513 | - .types { | ||
514 | - margin-top: 8rpx; | ||
515 | - color: rgba(0, 0, 0, 0.6); | ||
516 | - font-size: 24rpx; | ||
517 | - font-weight: 400; | ||
518 | - font-family: "PingFang SC"; | ||
519 | - } | ||
520 | - | ||
521 | - .desc { | ||
522 | - margin-top: 14rpx; | ||
523 | - display: flex; | ||
524 | - align-items: center; | ||
525 | - justify-content: space-between; | ||
526 | - color: rgba(0, 0, 0, 0.6); | ||
527 | - font-size: 20rpx; | ||
528 | - font-weight: 400; | ||
529 | - font-family: "PingFang SC"; | ||
530 | - | ||
531 | - .money { | ||
532 | - | ||
533 | - color: rgba(248, 83, 23, 1); | ||
534 | - font-size: 32rpx; | ||
535 | - font-weight: 700; | ||
536 | - font-family: "Montserrat"; | ||
537 | - | ||
538 | - text { | ||
539 | - font-size: 24rpx; | ||
540 | - font-weight: 500; | ||
541 | - } | ||
542 | - } | ||
543 | - } | ||
544 | - } | ||
545 | - | ||
546 | - } | ||
547 | - | ||
548 | - } | ||
549 | - } | ||
550 | - } | 1 | +<template> |
2 | + <view class="content"> | ||
3 | + <view class="top"> | ||
4 | + <view class="logo"> | ||
5 | + <image src="/static/ic_logo.png" mode=""></image> | ||
6 | + <view class="search"> | ||
7 | + <view class="tosear" @click="gosourch"> | ||
8 | + <input type="text" value="" placeholder="搜索" disabled="true" | ||
9 | + placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" /> | ||
10 | + <image src="/static/icon-search.png" mode=""></image> | ||
11 | + </view> | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + <view class="banner"> | ||
15 | + <u-swiper keyName="image_preview" :list="list1" @click="click" :indicator="true" indicatorMode="dot" | ||
16 | + radius="12" height="160" :circular="true"> | ||
17 | + </u-swiper> | ||
18 | + </view> | ||
19 | + </view> | ||
20 | + <view class="contail"> | ||
21 | + <view class="nev"> | ||
22 | + <view class="bar" v-for="(item,index) in categoryList" :key="index"> | ||
23 | + <image class="barimg" :src="item.image_preview" mode=""></image> | ||
24 | + <text>{{item.name}}</text> | ||
25 | + </view> | ||
26 | + <view class="bar" v-if="categoryLength>8"> | ||
27 | + <image class="barimg" src="/static/logo.png" mode=""></image> | ||
28 | + <text>更多</text> | ||
29 | + </view> | ||
30 | + </view> | ||
31 | + <view class="info"> | ||
32 | + <view class="leftbox"> | ||
33 | + <view class="lefttitle"> | ||
34 | + <view class="title"> | ||
35 | + 相关资讯 | ||
36 | + </view> | ||
37 | + <view class="more" @click="torealtime(1)"> | ||
38 | + 更多 | ||
39 | + <image src="/static/ic-arrow.png" mode=""></image> | ||
40 | + </view> | ||
41 | + </view> | ||
42 | + <view class="newbar"> | ||
43 | + <view v-for="(item,index) in informationList" :key="index">·{{item.title}}</view> | ||
44 | + </view> | ||
45 | + </view> | ||
46 | + <view class="rightbox" @click="torealtime(2)"> | ||
47 | + <view class="righttitle"> | ||
48 | + <view class="title"> | ||
49 | + 相关资讯 | ||
50 | + </view> | ||
51 | + <view class="active"> | ||
52 | + 充值活动 | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + <view class="activeimg"> | ||
56 | + <image src="/static/Rectangle 2372.png" mode=""></image> | ||
57 | + <!-- <image src="/static/logo.png" mode=""></image> | ||
58 | + <image src="/static/logo.png" mode=""></image> --> | ||
59 | + </view> | ||
60 | + </view> | ||
61 | + </view> | ||
62 | + <view class="waterfall"> | ||
63 | + <view class="falltitle"> | ||
64 | + <view class="fallnev" :class="{newfall:fallindex==1}" @click="changefall(1)"> | ||
65 | + 猜你喜欢 | ||
66 | + <view class="tip"> | ||
67 | + | ||
68 | + </view> | ||
69 | + </view> | ||
70 | + <view class="fallnev" :class="{newfall:fallindex==2}" @click="changefall(2)"> | ||
71 | + 最新 | ||
72 | + <view class="tip"> | ||
73 | + | ||
74 | + </view> | ||
75 | + </view> | ||
76 | + <view class="fallnev" :class="{newfall:fallindex==3}" @click="changefall(3)"> | ||
77 | + 人气 | ||
78 | + <view class="tip"> | ||
79 | + | ||
80 | + </view> | ||
81 | + </view> | ||
82 | + </view> | ||
83 | + <scroll-view scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh"> | ||
84 | + <view class="misslist"> | ||
85 | + <custom-waterfalls-flow :value="list" @wapperClick="godetail"> | ||
86 | + <template v-slot:default="item"> | ||
87 | + <view class="item"> | ||
88 | + <view class="title">{{item.name}}</view> | ||
89 | + <view class="types"> | ||
90 | + 所属分类:{{item.sort.name}} | ||
91 | + </view> | ||
92 | + <view class="desc"> | ||
93 | + <text v-if="item.seller_name">{{item.seller_name}}</text> | ||
94 | + <view class="money"> | ||
95 | + <text>¥</text>{{item.price}} | ||
96 | + </view> | ||
97 | + </view> | ||
98 | + </view> | ||
99 | + </template> | ||
100 | + </custom-waterfalls-flow> | ||
101 | + </view> | ||
102 | + </scroll-view> | ||
103 | + </view> | ||
104 | + </view> | ||
105 | + <Botton :flag="1"></Botton> | ||
106 | + </view> | ||
107 | +</template> | ||
108 | + | ||
109 | +<script> | ||
110 | + import { | ||
111 | + getBanner, | ||
112 | + sortList, | ||
113 | + arcList, | ||
114 | + product_list, | ||
115 | + product_report | ||
116 | + } from '@/api/index' | ||
117 | + import helangWaterfall from "@/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue" | ||
118 | + import Botton from "@/components/Botton.vue" | ||
119 | + export default { | ||
120 | + components: { | ||
121 | + "custom-waterfalls-flow": helangWaterfall, | ||
122 | + "Botton": Botton | ||
123 | + }, | ||
124 | + data() { | ||
125 | + return { | ||
126 | + title: 'Hello', | ||
127 | + list1: [ | ||
128 | + 'https://cdn.uviewui.com/uview/swiper/swiper1.png', | ||
129 | + 'https://cdn.uviewui.com/uview/swiper/swiper2.png', | ||
130 | + 'https://cdn.uviewui.com/uview/swiper/swiper3.png', | ||
131 | + ], | ||
132 | + nevlist: [1, 2, 3, 4, , 6, 7], | ||
133 | + leftlist: [1, 2, 3], | ||
134 | + fallindex: 1, | ||
135 | + //瀑布 | ||
136 | + list: [], | ||
137 | + categoryList: [], // 分类列表 | ||
138 | + categoryLength: 0, //分类数量 | ||
139 | + informationList: [], // 相关资讯 | ||
140 | + currentpage: 1, //分页 | ||
141 | + } | ||
142 | + }, | ||
143 | + onShow() { | ||
144 | + this.initial() | ||
145 | + this.product_list(true) | ||
146 | + }, | ||
147 | + onLoad() { | ||
148 | + | ||
149 | + }, | ||
150 | + methods: { | ||
151 | + //咨询列表 | ||
152 | + torealtime(e) { | ||
153 | + uni.navigateTo({ | ||
154 | + url: "/pages/index/realTimeInfo?type=" + e | ||
155 | + }) | ||
156 | + }, | ||
157 | + | ||
158 | + scrolltolower() { | ||
159 | + this.currentpage++ | ||
160 | + this.product_list() | ||
161 | + }, | ||
162 | + async product_report() { | ||
163 | + let obj = { | ||
164 | + product_id: this.id, | ||
165 | + report_id: "", | ||
166 | + content: "", | ||
167 | + } | ||
168 | + try { | ||
169 | + // 轮播图 | ||
170 | + const res = await getBanner() | ||
171 | + // 分类 | ||
172 | + const sortRes = await sortList(1) | ||
173 | + // 相关资讯 | ||
174 | + const information = await arcList() | ||
175 | + // 轮播图 | ||
176 | + this.list1 = res.list | ||
177 | + this.categoryLength = sortRes.list.length | ||
178 | + this.categoryList = sortRes.list.length > 8 ? sortRes.list.slice(0, 7) : sortRes.list | ||
179 | + this.informationList = information.list.length > 3 ? information.list.slice(0, 3) : information | ||
180 | + .list | ||
181 | + console.log(sortRes, '分类'); | ||
182 | + console.log('getBanner', res) | ||
183 | + console.log(information, '资讯列表'); | ||
184 | + const result = await product_report(obj) | ||
185 | + console.log('product_report', result) | ||
186 | + // 保存数据 | ||
187 | + } catch (err) { | ||
188 | + uni.showToast({ | ||
189 | + title: err, | ||
190 | + icon: 'none' | ||
191 | + }) | ||
192 | + console.log('product_report', err) | ||
193 | + } | ||
194 | + }, | ||
195 | + //产品列表 | ||
196 | + async product_list(x) { | ||
197 | + let obj = { | ||
198 | + type: this.fallindex, | ||
199 | + page: this.currentpage, | ||
200 | + pagenum: 15, | ||
201 | + } | ||
202 | + try { | ||
203 | + const res = await product_list(obj) | ||
204 | + console.log('产品列表', res) | ||
205 | + this.list = x ? res.list.data : this.list.concat(res.list.data) | ||
206 | + this.list.forEach((item, index) => { | ||
207 | + item.image = item.images_preview[0] | ||
208 | + }) | ||
209 | + if (res.list.data.length == 0) { | ||
210 | + uni.showToast({ | ||
211 | + title: "暂无更多数据", | ||
212 | + icon: 'none' | ||
213 | + }) | ||
214 | + return | ||
215 | + } | ||
216 | + console.log('产品列表', this.list) | ||
217 | + // 保存数据 | ||
218 | + } catch (err) { | ||
219 | + uni.showToast({ | ||
220 | + title: err, | ||
221 | + icon: 'none' | ||
222 | + }) | ||
223 | + console.log('product_list', err) | ||
224 | + } | ||
225 | + }, | ||
226 | + async initial() { | ||
227 | + try { | ||
228 | + // 轮播图 | ||
229 | + const res = await getBanner() | ||
230 | + // 分类 | ||
231 | + const sortRes = await sortList() | ||
232 | + // 相关资讯 | ||
233 | + const information = await arcList() | ||
234 | + // 轮播图 | ||
235 | + this.list1 = res.list | ||
236 | + this.categoryLength = sortRes.list.length | ||
237 | + this.categoryList = sortRes.list.length > 8 ? sortRes.list.slice(0, 7) : sortRes.list | ||
238 | + this.informationList = information.list.length > 3 ? information.list.slice(0, 3) : information | ||
239 | + .list | ||
240 | + console.log(sortRes, '分类'); | ||
241 | + console.log('getBanner', res) | ||
242 | + console.log(information, '资讯列表'); | ||
243 | + // 保存数据 | ||
244 | + } catch (err) { | ||
245 | + uni.showToast({ | ||
246 | + title: err, | ||
247 | + icon: 'none' | ||
248 | + }) | ||
249 | + console.log('getBanner', err) | ||
250 | + } | ||
251 | + }, | ||
252 | + changefall(e) { | ||
253 | + this.fallindex = e | ||
254 | + this.list = [] | ||
255 | + this.product_list(true) | ||
256 | + }, | ||
257 | + //跳转详情 | ||
258 | + godetail(item) { | ||
259 | + console.log(1) | ||
260 | + uni.navigateTo({ | ||
261 | + url: "/pages/index/detail?id=" + item.id | ||
262 | + }) | ||
263 | + }, | ||
264 | + //跳转搜索 | ||
265 | + gosourch() { | ||
266 | + uni.navigateTo({ | ||
267 | + url: "/pages/index/search" | ||
268 | + }) | ||
269 | + }, | ||
270 | + } | ||
271 | + } | ||
272 | +</script> | ||
273 | + | ||
274 | +<style lang="scss"> | ||
275 | + page { | ||
276 | + background: rgba(246, 246, 246, 1); | ||
277 | + } | ||
278 | + | ||
279 | + .content { | ||
280 | + | ||
281 | + .top { | ||
282 | + height: 370rpx; | ||
283 | + background-image: linear-gradient(#FED000, #ffffff); | ||
284 | + padding: 32rpx; | ||
285 | + | ||
286 | + .logo { | ||
287 | + display: flex; | ||
288 | + align-items: center; | ||
289 | + | ||
290 | + image { | ||
291 | + width: 84rpx; | ||
292 | + height: 74rpx; | ||
293 | + margin-right: 36rpx; | ||
294 | + } | ||
295 | + | ||
296 | + .search { | ||
297 | + flex: 1; | ||
298 | + display: flex; | ||
299 | + align-items: center; | ||
300 | + | ||
301 | + .tosear { | ||
302 | + position: relative; | ||
303 | + width: 522rpx; | ||
304 | + height: 64rpx; | ||
305 | + border-radius: 38rpx; | ||
306 | + opacity: 1; | ||
307 | + | ||
308 | + border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1); | ||
309 | + background: rgba(245, 245, 245, 1); | ||
310 | + padding: 0 32rpx; | ||
311 | + | ||
312 | + input { | ||
313 | + text-align: center; | ||
314 | + width: 100%; | ||
315 | + height: 100%; | ||
316 | + } | ||
317 | + | ||
318 | + image { | ||
319 | + position: absolute; | ||
320 | + left: 280rpx; | ||
321 | + top: 50%; | ||
322 | + left: 36%; | ||
323 | + transform: translateY(-50%); | ||
324 | + width: 32rpx; | ||
325 | + height: 32rpx; | ||
326 | + } | ||
327 | + } | ||
328 | + } | ||
329 | + | ||
330 | + | ||
331 | + } | ||
332 | + | ||
333 | + .banner { | ||
334 | + margin-top: 32rpx; | ||
335 | + height: 320rpx; | ||
336 | + border-radius: 24rpx; | ||
337 | + } | ||
338 | + } | ||
339 | + | ||
340 | + .contail { | ||
341 | + padding: 0 32rpx; | ||
342 | + padding-bottom: 160rpx; | ||
343 | + box-sizing: border-box; | ||
344 | + | ||
345 | + .nev { | ||
346 | + margin-top: 48rpx; | ||
347 | + border-radius: 24rpx; | ||
348 | + padding: 0 32rpx; | ||
349 | + box-sizing: border-box; | ||
350 | + padding-bottom: 32rpx; | ||
351 | + background: rgba(255, 255, 255, 1); | ||
352 | + display: flex; | ||
353 | + flex-wrap: wrap; | ||
354 | + | ||
355 | + .bar { | ||
356 | + margin-top: 40rpx; | ||
357 | + margin-right: 68rpx; | ||
358 | + width: 104rpx; | ||
359 | + height: 124rpx; | ||
360 | + display: flex; | ||
361 | + flex-direction: column; | ||
362 | + align-items: center; | ||
363 | + color: rgba(0, 0, 0, 0.9); | ||
364 | + font-size: 26rpx; | ||
365 | + font-weight: 400; | ||
366 | + font-family: "PingFang SC"; | ||
367 | + text-align: center; | ||
368 | + | ||
369 | + .barimg { | ||
370 | + width: 80rpx; | ||
371 | + height: 80rpx; | ||
372 | + } | ||
373 | + | ||
374 | + &:nth-child(4n) { | ||
375 | + margin-right: 0; | ||
376 | + } | ||
377 | + } | ||
378 | + } | ||
379 | + | ||
380 | + .info { | ||
381 | + display: flex; | ||
382 | + margin-top: 24rpx; | ||
383 | + | ||
384 | + .leftbox { | ||
385 | + flex: 1; | ||
386 | + padding: 24rpx; | ||
387 | + margin-right: 22rpx; | ||
388 | + box-sizing: border-box; | ||
389 | + background: linear-gradient(180deg, rgba(255, 242, 242, 1) 0%, rgba(255, 255, 255, 1) 100%); | ||
390 | + | ||
391 | + .lefttitle { | ||
392 | + display: flex; | ||
393 | + align-items: center; | ||
394 | + justify-content: space-between; | ||
395 | + | ||
396 | + .title { | ||
397 | + opacity: 1; | ||
398 | + color: rgba(0, 0, 0, 1); | ||
399 | + font-size: 30rpx; | ||
400 | + font-weight: 500; | ||
401 | + font-family: "PingFang SC"; | ||
402 | + } | ||
403 | + | ||
404 | + | ||
405 | + | ||
406 | + .more { | ||
407 | + display: flex; | ||
408 | + align-items: center; | ||
409 | + color: rgba(0, 0, 0, 0.9); | ||
410 | + font-size: 24rpx; | ||
411 | + font-weight: 400; | ||
412 | + font-family: "PingFang SC"; | ||
413 | + | ||
414 | + image { | ||
415 | + width: 16rpx; | ||
416 | + height: 32rpx; | ||
417 | + } | ||
418 | + } | ||
419 | + } | ||
420 | + | ||
421 | + .newbar { | ||
422 | + color: rgba(0, 0, 0, 0.9); | ||
423 | + font-size: 22rpx; | ||
424 | + font-weight: 400; | ||
425 | + font-family: "PingFang SC"; | ||
426 | + text-align: left; | ||
427 | + | ||
428 | + view { | ||
429 | + margin-top: 16rpx; | ||
430 | + } | ||
431 | + } | ||
432 | + } | ||
433 | + | ||
434 | + .rightbox { | ||
435 | + flex: 1; | ||
436 | + padding: 24rpx; | ||
437 | + box-sizing: border-box; | ||
438 | + background: linear-gradient(180deg, rgba(255, 250, 231, 1) 0%, rgba(255, 255, 255, 1) 100%); | ||
439 | + | ||
440 | + .righttitle { | ||
441 | + display: flex; | ||
442 | + align-items: center; | ||
443 | + | ||
444 | + .title { | ||
445 | + color: rgba(50, 50, 51, 1); | ||
446 | + font-size: 30rpx; | ||
447 | + font-weight: 500; | ||
448 | + font-family: "PingFang SC"; | ||
449 | + } | ||
450 | + | ||
451 | + .active { | ||
452 | + margin-left: 16rpx; | ||
453 | + width: 104rpx; | ||
454 | + height: 32rpx; | ||
455 | + border-radius: 6rpx; | ||
456 | + opacity: 1; | ||
457 | + color: rgba(255, 255, 255, 1); | ||
458 | + font-size: 20rpx; | ||
459 | + font-weight: 500; | ||
460 | + font-family: "PingFang SC"; | ||
461 | + line-height: 32rpx; | ||
462 | + text-align: center; | ||
463 | + background: linear-gradient(90deg, rgba(255, 61, 61, 1) 0%, rgba(255, 122, 48, 1) 100%); | ||
464 | + } | ||
465 | + } | ||
466 | + | ||
467 | + .activeimg { | ||
468 | + margin-top: 12rpx; | ||
469 | + display: flex; | ||
470 | + align-items: center; | ||
471 | + justify-content: space-between; | ||
472 | + | ||
473 | + image { | ||
474 | + width: 284rpx; | ||
475 | + height: 136rpx; | ||
476 | + border-radius: 24rpx; | ||
477 | + } | ||
478 | + | ||
479 | + // image { | ||
480 | + // width: 134rpx; | ||
481 | + // height: 136rpx; | ||
482 | + // border-radius: 24rpx; | ||
483 | + // } | ||
484 | + } | ||
485 | + } | ||
486 | + } | ||
487 | + | ||
488 | + .waterfall { | ||
489 | + color: rgba(0, 0, 0, 0.9); | ||
490 | + font-size: 30rpx; | ||
491 | + font-weight: 400; | ||
492 | + font-family: "PingFang SC"; | ||
493 | + text-align: left; | ||
494 | + | ||
495 | + .falltitle { | ||
496 | + color: rgba(0, 0, 0, 0.9); | ||
497 | + font-size: 30rpx; | ||
498 | + font-weight: 400; | ||
499 | + font-family: "PingFang SC"; | ||
500 | + margin-top: 24rpx; | ||
501 | + display: flex; | ||
502 | + align-items: center; | ||
503 | + | ||
504 | + .fallnev { | ||
505 | + margin-right: 40rpx; | ||
506 | + | ||
507 | + .tip { | ||
508 | + width: 0; | ||
509 | + height: 0; | ||
510 | + | ||
511 | + } | ||
512 | + | ||
513 | + } | ||
514 | + | ||
515 | + .newfall { | ||
516 | + position: relative; | ||
517 | + color: rgba(0, 0, 0, 0.9); | ||
518 | + font-size: 36rpx; | ||
519 | + font-weight: 600; | ||
520 | + font-family: "PingFang SC"; | ||
521 | + | ||
522 | + .tip { | ||
523 | + position: absolute; | ||
524 | + bottom: 0; | ||
525 | + right: 0; | ||
526 | + width: 64rpx; | ||
527 | + height: 12rpx; | ||
528 | + border-radius: 14rpx; | ||
529 | + opacity: 1; | ||
530 | + background: rgba(254, 208, 0, .6); | ||
531 | + } | ||
532 | + } | ||
533 | + } | ||
534 | + | ||
535 | + .misslist { | ||
536 | + margin-top: 24rpx; | ||
537 | + | ||
538 | + .item { | ||
539 | + padding: 24rpx; | ||
540 | + box-sizing: border-box; | ||
541 | + | ||
542 | + .types { | ||
543 | + margin-top: 8rpx; | ||
544 | + color: rgba(0, 0, 0, 0.6); | ||
545 | + font-size: 24rpx; | ||
546 | + font-weight: 400; | ||
547 | + font-family: "PingFang SC"; | ||
548 | + } | ||
549 | + | ||
550 | + .desc { | ||
551 | + margin-top: 14rpx; | ||
552 | + display: flex; | ||
553 | + align-items: center; | ||
554 | + justify-content: space-between; | ||
555 | + color: rgba(0, 0, 0, 0.6); | ||
556 | + font-size: 20rpx; | ||
557 | + font-weight: 400; | ||
558 | + font-family: "PingFang SC"; | ||
559 | + | ||
560 | + .money { | ||
561 | + | ||
562 | + color: rgba(248, 83, 23, 1); | ||
563 | + font-size: 32rpx; | ||
564 | + font-weight: 700; | ||
565 | + font-family: "Montserrat"; | ||
566 | + | ||
567 | + text { | ||
568 | + font-size: 24rpx; | ||
569 | + font-weight: 500; | ||
570 | + } | ||
571 | + } | ||
572 | + } | ||
573 | + } | ||
574 | + | ||
575 | + } | ||
576 | + | ||
577 | + } | ||
578 | + } | ||
579 | + } | ||
551 | </style> | 580 | </style> |
1 | <template> | 1 | <template> |
2 | <view class="product_all"> | 2 | <view class="product_all"> |
3 | <view class="top"> | 3 | <view class="top"> |
4 | - <image src="../../static/ic-back-false.png" mode=""></image> | 4 | + <image src="../../static/ic-back-false.png" mode="" @click="back"></image> |
5 | <view class="search"> | 5 | <view class="search"> |
6 | <view class="tosear" @click="gosourch"> | 6 | <view class="tosear" @click="gosourch"> |
7 | <input type="text" value="" placeholder="搜索" | 7 | <input type="text" value="" placeholder="搜索" |
8 | - placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" /> | 8 | + placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" |
9 | + v-model="keyword" /> | ||
9 | <image src="../../static/icon-search.png" mode=""></image> | 10 | <image src="../../static/icon-search.png" mode=""></image> |
10 | </view> | 11 | </view> |
11 | </view> | 12 | </view> |
12 | </view> | 13 | </view> |
13 | - <view class="misslist"> | ||
14 | - <custom-waterfalls-flow :value="list"> | ||
15 | - <!-- #ifdef MP-WEIXIN --> | ||
16 | - <view class="item" v-for="(item,index) in list" :key="index" slot="slot{{index}}"> | ||
17 | - <view class="title">{{item.title}}</view> | ||
18 | - <view class="desc"> | ||
19 | - <text>张三</text> | ||
20 | - <view class="money"> | ||
21 | - <text>¥</text>6666 | ||
22 | - </view> | ||
23 | - </view> | ||
24 | - </view> | ||
25 | - <!-- #endif --> | ||
26 | - <!-- #ifndef MP-WEIXIN --> | ||
27 | - <template v-slot:default="item"> | ||
28 | - <view class="item"> | ||
29 | - <view class="title">{{item.title}}</view> | ||
30 | - <view class="desc"> | ||
31 | - <text>张三</text> | ||
32 | - <view class="money"> | ||
33 | - <text>¥</text>6666 | 14 | + <scroll-view scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh"> |
15 | + <view class="misslist"> | ||
16 | + <custom-waterfalls-flow :value="list" @wapperClick="godetail"> | ||
17 | + <template v-slot:default="item"> | ||
18 | + <view class="item"> | ||
19 | + <view class="title">{{item.name}}</view> | ||
20 | + <view class="types"> | ||
21 | + 所属分类:{{item.sort.name}} | ||
22 | + </view> | ||
23 | + <view class="desc"> | ||
24 | + <text v-if="item.seller_name">{{item.seller_name}}</text> | ||
25 | + <view class="money"> | ||
26 | + <text>¥</text>{{item.price}} | ||
27 | + </view> | ||
34 | </view> | 28 | </view> |
35 | </view> | 29 | </view> |
36 | - </view> | ||
37 | - </template> | ||
38 | - <!-- #endif --> | ||
39 | - </custom-waterfalls-flow> | ||
40 | - </view> | 30 | + </template> |
31 | + </custom-waterfalls-flow> | ||
32 | + </view> | ||
33 | + </scroll-view> | ||
41 | </view> | 34 | </view> |
42 | </template> | 35 | </template> |
43 | 36 | ||
44 | <script> | 37 | <script> |
38 | + import { | ||
39 | + product_list | ||
40 | + } from '@/api/index' | ||
45 | export default { | 41 | export default { |
46 | data() { | 42 | data() { |
47 | return { | 43 | return { |
48 | //瀑布 | 44 | //瀑布 |
49 | - list: [{ | ||
50 | - image: 'https://via.placeholder.com/200x500.png/ff0000', | ||
51 | - title: '我是标题1', | ||
52 | - }, | ||
53 | - { | ||
54 | - image: 'https://via.placeholder.com/200x200.png/2878ff', | ||
55 | - title: '我是标题2', | ||
56 | - }, { | ||
57 | - image: 'https://via.placeholder.com/200x200.png/2878ff', | ||
58 | - title: '我是标题2', | ||
59 | - }, | ||
60 | - { | ||
61 | - image: 'https://via.placeholder.com/200x200.png/2878ff', | ||
62 | - title: '我是标题2', | ||
63 | - }, | ||
64 | - { | ||
65 | - image: 'https://via.placeholder.com/200x200.png/2878ff', | ||
66 | - title: '我是标题2', | ||
67 | - } | ||
68 | - ] | ||
69 | - | 45 | + list: [], |
46 | + keyword: "", | ||
47 | + currentpage: 1, | ||
70 | } | 48 | } |
49 | + }, | ||
50 | + onLoad(options) { | ||
51 | + this.keyword = options.ktext | ||
52 | + this.product_list(true) | ||
53 | + }, | ||
54 | + methods: { | ||
55 | + scrolltolower() { | ||
56 | + this.currentpage++ | ||
57 | + this.product_list() | ||
58 | + }, | ||
59 | + back() { | ||
60 | + uni.navigateBack({ | ||
61 | + delta: 1 | ||
62 | + }) | ||
63 | + }, | ||
64 | + //产品列表 | ||
65 | + async product_list(x) { | ||
66 | + let obj = { | ||
67 | + keyword: this.keyword, | ||
68 | + page: this.currentpage, | ||
69 | + pagenum: 15, | ||
70 | + } | ||
71 | + try { | ||
72 | + const res = await product_list(obj) | ||
73 | + console.log('产品列表', res) | ||
74 | + this.list = x ? res.list.data : this.list.concat(res.list.data) | ||
75 | + this.list.forEach((item, index) => { | ||
76 | + item.image = item.images_preview[0] | ||
77 | + }) | ||
78 | + if (res.list.data.length == 0) { | ||
79 | + uni.showToast({ | ||
80 | + title: "暂无更多数据", | ||
81 | + icon: 'none' | ||
82 | + }) | ||
83 | + return | ||
84 | + } | ||
85 | + console.log('产品列表', this.list) | ||
86 | + // 保存数据 | ||
87 | + } catch (err) { | ||
88 | + uni.showToast({ | ||
89 | + title: err, | ||
90 | + icon: 'none' | ||
91 | + }) | ||
92 | + console.log('product_list', err) | ||
93 | + } | ||
94 | + }, | ||
71 | } | 95 | } |
72 | } | 96 | } |
73 | </script> | 97 | </script> |
@@ -135,12 +159,20 @@ | @@ -135,12 +159,20 @@ | ||
135 | } | 159 | } |
136 | 160 | ||
137 | .misslist { | 161 | .misslist { |
138 | - margin-top: 132rpx; | 162 | + margin-top: 104rpx; |
139 | 163 | ||
140 | .item { | 164 | .item { |
141 | padding: 24rpx; | 165 | padding: 24rpx; |
142 | box-sizing: border-box; | 166 | box-sizing: border-box; |
143 | 167 | ||
168 | + .types { | ||
169 | + margin-top: 8rpx; | ||
170 | + color: rgba(0, 0, 0, 0.6); | ||
171 | + font-size: 24rpx; | ||
172 | + font-weight: 400; | ||
173 | + font-family: "PingFang SC"; | ||
174 | + } | ||
175 | + | ||
144 | .desc { | 176 | .desc { |
145 | margin-top: 14rpx; | 177 | margin-top: 14rpx; |
146 | display: flex; | 178 | display: flex; |
@@ -32,7 +32,10 @@ | @@ -32,7 +32,10 @@ | ||
32 | <image class="image_b" @click="upload(2)" v-if="!imageF" src="/static/icon_square_cream.png" mode=""></image> | 32 | <image class="image_b" @click="upload(2)" v-if="!imageF" src="/static/icon_square_cream.png" mode=""></image> |
33 | </view> | 33 | </view> |
34 | </view> | 34 | </view> |
35 | + | ||
35 | <view class="btn"> | 36 | <view class="btn"> |
37 | +<<<<<<< HEAD | ||
38 | +======= | ||
36 | <view class="paybtn" > | 39 | <view class="paybtn" > |
37 | <input type="text" placeholder="请输入" v-model="name"> | 40 | <input type="text" placeholder="请输入" v-model="name"> |
38 | </view> | 41 | </view> |
@@ -55,6 +58,7 @@ | @@ -55,6 +58,7 @@ | ||
55 | </view> | 58 | </view> |
56 | </view> | 59 | </view> |
57 | <view class="btn"> | 60 | <view class="btn"> |
61 | +>>>>>>> b13657550df89f042b3116430c8734e3d789d7fc | ||
58 | <view class="paybtn" @click="realAuthentication"> | 62 | <view class="paybtn" @click="realAuthentication"> |
59 | 提交 | 63 | 提交 |
60 | </view> | 64 | </view> |
@@ -2,12 +2,13 @@ | @@ -2,12 +2,13 @@ | ||
2 | <view class="timeInfo"> | 2 | <view class="timeInfo"> |
3 | <view class="nevtop"> | 3 | <view class="nevtop"> |
4 | <view class="top"> | 4 | <view class="top"> |
5 | - <u-search placeholder="请输入文章名称搜索" v-model="keyword" :clearabled="true" :show-action="false"></u-search> | 5 | + <u-search placeholder="请输入文章名称搜索" v-model="keyword" :clearabled="true" :show-action="false" |
6 | + @search="onsouch()"></u-search> | ||
6 | </view> | 7 | </view> |
7 | <view class="banner"> | 8 | <view class="banner"> |
8 | <scroll-view scroll-x="true" style="white-space:nowrap "> | 9 | <scroll-view scroll-x="true" style="white-space:nowrap "> |
9 | <view class="nav" :class="{newnav:chooseindex==index}" v-for="(item,index) in typelist" :key="index" | 10 | <view class="nav" :class="{newnav:chooseindex==index}" v-for="(item,index) in typelist" :key="index" |
10 | - @click="choose(index)">发发发 | 11 | + @click="choose(index,item.id)">{{item.name}} |
11 | <view class="tip" v-if="chooseindex==index"> | 12 | <view class="tip" v-if="chooseindex==index"> |
12 | </view> | 13 | </view> |
13 | </view> | 14 | </view> |
@@ -15,34 +16,115 @@ | @@ -15,34 +16,115 @@ | ||
15 | </view> | 16 | </view> |
16 | </view> | 17 | </view> |
17 | <view class="group"> | 18 | <view class="group"> |
18 | - <view class="item" v-for="(item,idx) in 20" :key="idx"> | ||
19 | - <view class="bot flexA"> | ||
20 | - <view class="left flexA"> | ||
21 | - <image src="/static/logo.png" mode=""></image> | ||
22 | - <view class=""> | ||
23 | - <view class="title">比特币20个</view> | ||
24 | - <view class="time">发布时间:2022-06-21 15:31</view> | 19 | + <scroll-view scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh"> |
20 | + <view class="item" v-for="(item,idx) in sortlist" :key="idx" @click="ondetail(item.id)"> | ||
21 | + <view class="bot flexA"> | ||
22 | + <view class="left flexA"> | ||
23 | + <image :src="item.image_preview" mode=""></image> | ||
24 | + <view class=""> | ||
25 | + <view class="title">{{item.title}}</view> | ||
26 | + <view class="time">发布时间:{{item.publishtime}}</view> | ||
27 | + </view> | ||
25 | </view> | 28 | </view> |
26 | </view> | 29 | </view> |
27 | </view> | 30 | </view> |
28 | - | ||
29 | - </view> | 31 | + </scroll-view> |
30 | </view> | 32 | </view> |
31 | </view> | 33 | </view> |
32 | </template> | 34 | </template> |
33 | 35 | ||
34 | <script> | 36 | <script> |
37 | + import { | ||
38 | + sort_list, | ||
39 | + arc_list | ||
40 | + } from '@/api/index.js' | ||
35 | export default { | 41 | export default { |
36 | data() { | 42 | data() { |
37 | return { | 43 | return { |
38 | chooseindex: 0, | 44 | chooseindex: 0, |
39 | - typelist: [1, , , 3, , 3, , , 4, , , , 4, ], | 45 | + typelist: [], |
46 | + keyword: "", | ||
47 | + sortlist: [], | ||
48 | + currentpage: 1, | ||
40 | } | 49 | } |
41 | }, | 50 | }, |
51 | + onLoad(options) { | ||
52 | + this.type = options.type | ||
53 | + this.sort_list(true) | ||
54 | + }, | ||
42 | methods: { | 55 | methods: { |
43 | - choose(e) { | 56 | + ondetail(e) { |
57 | + uni.navigateTo({ | ||
58 | + url: "/pages/index/consultationDetails?id=" + e | ||
59 | + }) | ||
60 | + }, | ||
61 | + // 加载 | ||
62 | + scrolltolower() { | ||
63 | + this.currentpage++ | ||
64 | + this.arc_list() | ||
65 | + }, | ||
66 | + //搜索 | ||
67 | + onsouch() { | ||
68 | + this.currentpage = 1 | ||
69 | + this.arc_list(true) | ||
70 | + }, | ||
71 | + //类型选择 | ||
72 | + choose(e, id) { | ||
44 | this.chooseindex = e | 73 | this.chooseindex = e |
45 | - } | 74 | + this.sortlist = [] |
75 | + this.sort_id = id | ||
76 | + this.arc_list(true) | ||
77 | + }, | ||
78 | + // 分类 | ||
79 | + async sort_list() { | ||
80 | + let obj = { | ||
81 | + type: this.type, | ||
82 | + keyword: this.keyword, | ||
83 | + } | ||
84 | + try { | ||
85 | + const res = await sort_list() | ||
86 | + this.typelist = res.list | ||
87 | + this.sort_id = this.typelist[0].id | ||
88 | + this.arc_list(true) | ||
89 | + console.log('sort_list', res) | ||
90 | + // 保存数据 | ||
91 | + } catch (err) { | ||
92 | + uni.showToast({ | ||
93 | + title: err, | ||
94 | + icon: 'none' | ||
95 | + }) | ||
96 | + console.log('sort_list', err) | ||
97 | + } | ||
98 | + }, | ||
99 | + // 资讯 | ||
100 | + async arc_list(x) { | ||
101 | + let obj = { | ||
102 | + type:this.type, | ||
103 | + sort_id: this.sort_id, | ||
104 | + keyword: this.keyword, | ||
105 | + page: this.currentpage, | ||
106 | + pagenum: 15, | ||
107 | + } | ||
108 | + try { | ||
109 | + const res = await arc_list(obj) | ||
110 | + this.sortlist = x ? res.list.data : this.sortlist.concat(res.list.data) | ||
111 | + console.log('arc_list', res) | ||
112 | + if (res.list.data.length == 0) { | ||
113 | + uni.showToast({ | ||
114 | + title: "暂无更多数据", | ||
115 | + icon: 'none' | ||
116 | + }) | ||
117 | + return | ||
118 | + } | ||
119 | + // 保存数据 | ||
120 | + } catch (err) { | ||
121 | + uni.showToast({ | ||
122 | + title: err, | ||
123 | + icon: 'none' | ||
124 | + }) | ||
125 | + console.log('arc_list', err) | ||
126 | + } | ||
127 | + }, | ||
46 | } | 128 | } |
47 | } | 129 | } |
48 | </script> | 130 | </script> |
@@ -56,9 +138,10 @@ | @@ -56,9 +138,10 @@ | ||
56 | .nevtop { | 138 | .nevtop { |
57 | position: fixed; | 139 | position: fixed; |
58 | width: 100%; | 140 | width: 100%; |
141 | + box-sizing: border-box; | ||
59 | top: 0; | 142 | top: 0; |
60 | left: 0; | 143 | left: 0; |
61 | - z-index:99; | 144 | + z-index: 99; |
62 | padding: 16rpx 32rpx; | 145 | padding: 16rpx 32rpx; |
63 | background-color: #ffffff; | 146 | background-color: #ffffff; |
64 | 147 |
1 | <template> | 1 | <template> |
2 | <view class="top"> | 2 | <view class="top"> |
3 | - <u-search :showAction="true" actionText="搜索" :clearabled="true"></u-search> | 3 | + <u-search :showAction="true" actionText="搜索" :clearabled="true" v-model="ktext" @custom="onsouch(ktext)"> |
4 | + </u-search> | ||
4 | <view class="main"> | 5 | <view class="main"> |
5 | <view class="title"> | 6 | <view class="title"> |
6 | <text>历史搜索</text> | 7 | <text>历史搜索</text> |
7 | <image src="../../static/ic-delete-false.png" mode="" @click="delhostily"></image> | 8 | <image src="../../static/ic-delete-false.png" mode="" @click="delhostily"></image> |
8 | </view> | 9 | </view> |
9 | <view class="schbox"> | 10 | <view class="schbox"> |
10 | - <view class="schitem" v-for="(item,index) in hostlist" :key="index" | ||
11 | - @click="onsouch(item.history.history_name)"> | ||
12 | - 11 | 11 | + <view class="schitem" v-for="(item,index) in hostlist" :key="index" @click="onsouch(item.keyword)"> |
12 | + {{item.keyword}} | ||
13 | </view> | 13 | </view> |
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
@@ -18,13 +18,70 @@ | @@ -18,13 +18,70 @@ | ||
18 | </template> | 18 | </template> |
19 | 19 | ||
20 | <script> | 20 | <script> |
21 | + import { | ||
22 | + search_list, | ||
23 | + search_clear | ||
24 | + } from '@/api/index.js' | ||
21 | export default { | 25 | export default { |
22 | data() { | 26 | data() { |
23 | return { | 27 | return { |
24 | - hostlist: [1, 23, 3] | 28 | + hostlist: [], |
29 | + ktext: "", | ||
25 | }; | 30 | }; |
26 | }, | 31 | }, |
27 | - methods: {}, | 32 | + onLoad() { |
33 | + }, | ||
34 | + onShow() { | ||
35 | + this.search_list() | ||
36 | + }, | ||
37 | + methods: { | ||
38 | + delhostily() { | ||
39 | + let that=this | ||
40 | + uni.showModal({ | ||
41 | + content:"是否删除历史搜索记录", | ||
42 | + success(res) { | ||
43 | + if (res.confirm) { | ||
44 | + that.search_clear() | ||
45 | + that.search_list() | ||
46 | + } | ||
47 | + } | ||
48 | + }) | ||
49 | + }, | ||
50 | + onsouch(e) { | ||
51 | + uni.navigateTo({ | ||
52 | + url: "/pages/index/product?ktext=" + e | ||
53 | + }) | ||
54 | + }, | ||
55 | + //清除历史搜索记录 | ||
56 | + async search_clear() { | ||
57 | + try { | ||
58 | + const res = await search_clear() | ||
59 | + console.log('search_clear', res) | ||
60 | + // 保存数据 | ||
61 | + } catch (err) { | ||
62 | + uni.showToast({ | ||
63 | + title: err, | ||
64 | + icon: 'none' | ||
65 | + }) | ||
66 | + console.log('search_clear', err) | ||
67 | + } | ||
68 | + }, | ||
69 | + // 历史搜索记录 | ||
70 | + async search_list() { | ||
71 | + try { | ||
72 | + const res = await search_list() | ||
73 | + console.log('search_list', res) | ||
74 | + this.hostlist = res.list | ||
75 | + // 保存数据 | ||
76 | + } catch (err) { | ||
77 | + uni.showToast({ | ||
78 | + title: err, | ||
79 | + icon: 'none' | ||
80 | + }) | ||
81 | + console.log('search_list', err) | ||
82 | + } | ||
83 | + }, | ||
84 | + }, | ||
28 | } | 85 | } |
29 | </script> | 86 | </script> |
30 | 87 |
-
请 注册 或 登录 后发表评论