13215663049 4 years ago
parent
commit
13d1db9dab
65 changed files with 1296 additions and 1173 deletions
  1. 9 4
      project.config.json
  2. 10 6
      src/app.config.js
  3. 25 10
      src/app.css
  4. 37 23
      src/app.less
  5. 0 623
      src/assets/img/css/swiper.css
  6. BIN
      src/assets/img/enter.png
  7. BIN
      src/assets/img/find.png
  8. 0 14
      src/assets/img/js/swiper.min.js
  9. BIN
      src/assets/img/right1.png
  10. BIN
      src/assets/img/weather/duoyun.png
  11. BIN
      src/assets/img/weather/feng.png
  12. BIN
      src/assets/img/weather/leizhenyu.png
  13. BIN
      src/assets/img/weather/qing.png
  14. BIN
      src/assets/img/weather/shachenbao.png
  15. BIN
      src/assets/img/weather/wu.png
  16. BIN
      src/assets/img/weather/xue.png
  17. BIN
      src/assets/img/weather/yin.png
  18. BIN
      src/assets/img/weather/yu.png
  19. 1 1
      src/assets/js/index.js
  20. 11 12
      src/assets/js/server.js
  21. 5 5
      src/components/findcircle/index.jsx
  22. 3 4
      src/components/recall/index.jsx
  23. 22 9
      src/components/search/index.jsx
  24. 57 40
      src/components/weather/index.jsx
  25. 0 0
      src/pages/cantfind/index.config.js
  26. 0 0
      src/pages/cantfind/index.css
  27. 0 0
      src/pages/cantfind/index.jsx
  28. 0 0
      src/pages/cantfind/index.less
  29. 0 0
      src/pages/commodity/index.config.js
  30. 0 0
      src/pages/commodity/index.css
  31. 118 0
      src/pages/commodity/index.jsx
  32. 0 0
      src/pages/commodity/index.less
  33. 0 0
      src/pages/complaint/index.config.js
  34. 12 6
      src/pages/page4/index.css
  35. 79 0
      src/pages/complaint/index.jsx
  36. 14 6
      src/pages/page4/index.less
  37. 0 0
      src/pages/details/index.config.js
  38. 17 8
      src/pages/page3/index.css
  39. 207 0
      src/pages/details/index.jsx
  40. 30 18
      src/pages/page3/index.less
  41. 3 0
      src/pages/enter/index.config.js
  42. 66 0
      src/pages/enter/index.css
  43. 33 0
      src/pages/enter/index.jsx
  44. 76 0
      src/pages/enter/index.less
  45. 1 0
      src/pages/index/index.css
  46. 11 10
      src/pages/index/index.jsx
  47. 1 0
      src/pages/index/index.less
  48. 3 0
      src/pages/login/index.config.js
  49. 61 0
      src/pages/login/index.css
  50. 33 0
      src/pages/login/index.jsx
  51. 71 0
      src/pages/login/index.less
  52. 3 0
      src/pages/message/index.config.js
  53. 82 0
      src/pages/message/index.css
  54. 91 0
      src/pages/message/index.jsx
  55. 100 0
      src/pages/message/index.less
  56. 0 183
      src/pages/page3/index.jsx
  57. 0 70
      src/pages/page4/index.jsx
  58. 0 117
      src/pages/page6/index.jsx
  59. 0 0
      src/pages/subsuccess/index.config.js
  60. 0 0
      src/pages/subsuccess/index.css
  61. 0 0
      src/pages/subsuccess/index.jsx
  62. 0 0
      src/pages/subsuccess/index.less
  63. 4 0
      src/server/index.js
  64. 0 4
      src/server/weather.js
  65. BIN
      测试码.png

+ 9 - 4
project.config.json

@@ -1,10 +1,10 @@
 {
   "miniprogramRoot": "dist/",
-  "projectname": "myApp",
+  "projectname": "myapp",
   "description": "first",
-  "appid": "wx106640ee424b8ea2",
+  "appid": "wxcaa301e98f44fee7",
   "setting": {
-    "urlCheck": true,
+    "urlCheck": false,
     "es6": false,
     "enhance": true,
     "postcss": false,
@@ -36,8 +36,13 @@
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
-    "showES6CompileOption": false
+    "disableUseStrict": false,
+    "minifyWXML": true,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false
   },
   "compileType": "miniprogram",
+  "libVersion": "2.20.0",
+  "cloudfunctionTemplateRoot": "cloudfunctionTemplate",
   "condition": {}
 }

+ 10 - 6
src/app.config.js

@@ -1,12 +1,16 @@
 export default {
   pages: [
-    'pages/index/index',
-    'pages/page6/index',
+    'pages/enter/index',
+    'pages/message/index',
+
+    'pages/login/index',
 
-    'pages/page3/index',
-    'pages/page2/index',
-    'pages/page4/index',
-    'pages/page5/index',
+    'pages/index/index',
+    'pages/commodity/index',
+    'pages/details/index',
+    'pages/cantfind/index',
+    'pages/complaint/index',
+    'pages/subsuccess/index',
   ],
   window: {
     backgroundTextStyle: 'light',

+ 25 - 10
src/app.css

@@ -336,19 +336,14 @@ view {
   font-size: 26px;
   font-weight: 500;
   color: #333333;
-  position: absolute;
-  top: 40px;
-  left: 276px;
-  display: flex;
 }
-.weather .futurediv .wea::before {
+.weather .futurediv .weabefore {
   content: '';
   display: inline-block;
   width: 36px;
   height: 36px;
-  background: url(http://api.k780.com/upload/weather/d/1.gif) no-repeat;
-  background-size: 100% auto;
   margin-right: 20px;
+  background-size: 100% auto;
 }
 .weather .futurediv .temp {
   font-size: 26px;
@@ -358,7 +353,27 @@ view {
   top: 40px;
   right: 54px;
 }
-.weather_qing::before {
-  background: url(assets/img/qing.png) no-repaet;
-  background-size: 100% auto;
+.qing {
+  background: url(assets/img/weather/qing.png) no-repeat;
+}
+.duoyun {
+  background: url(assets/img/weather/duoyun.png) no-repeat;
+}
+.yin {
+  background: url(assets/img/weather/yin.png) no-repeat;
+}
+.yu {
+  background: url(assets/img/weather/yu.png) no-repeat;
+}
+.leizhenyu {
+  background: url(assets/img/weather/leizhenyu.png) no-repeat;
+}
+.xue {
+  background: url(assets/img/weather/xue.png) no-repeat;
+}
+.wu {
+  background: url(assets/img/weather/wu.png) no-repeat;
+}
+.shachenbao {
+  background: url(assets/img/weather/shachenbao.png) no-repeat;
 }

+ 37 - 23
src/app.less

@@ -384,20 +384,15 @@ view {
       font-size: 26px;
       font-weight: 500;
       color: #333333;
-      position: absolute;
-      top: 40px;
-      left: 276px;
-      display: flex;
+    }
 
-      &::before {
-        content: '';
-        display: inline-block;
-        width: 36px;
-        height: 36px;
-        background: url(http://api.k780.com/upload/weather/d/1.gif) no-repeat;
-        background-size: 100% auto;
-        margin-right: 20px;
-      }
+    .weabefore {
+      content: '';
+      display: inline-block;
+      width: 36px;
+      height: 36px;
+      margin-right: 20px;
+      background-size: 100% auto;
     }
 
     .temp {
@@ -411,15 +406,34 @@ view {
   }
 }
 
-// .zhui {
-//   &::before {
-//     background-color: #d81b1b;
-//   }
-// }
+.qing {
+  background: url(./assets/img/weather/qing.png) no-repeat;
+}
+
+.duoyun {
+  background: url(./assets/img/weather/duoyun.png) no-repeat;
+}
 
-.weather_qing {
-  &::before {
-    background: url(./assets/img/qing.png) no-repaet;
-    background-size: 100% auto;
-  }
+.yin {
+  background: url(./assets/img/weather/yin.png) no-repeat;
+}
+
+.yu {
+  background: url(./assets/img/weather/yu.png) no-repeat;
+}
+
+.leizhenyu {
+  background: url(./assets/img/weather/leizhenyu.png) no-repeat;
+}
+
+.xue {
+  background: url(./assets/img/weather/xue.png) no-repeat;
+}
+
+.wu {
+  background: url(./assets/img/weather/wu.png) no-repeat;
+}
+
+.shachenbao {
+  background: url(./assets/img/weather/shachenbao.png) no-repeat;
 }

File diff suppressed because it is too large
+ 0 - 623
src/assets/img/css/swiper.css


BIN
src/assets/img/enter.png


BIN
src/assets/img/find.png


File diff suppressed because it is too large
+ 0 - 14
src/assets/img/js/swiper.min.js


BIN
src/assets/img/right1.png


BIN
src/assets/img/weather/duoyun.png


BIN
src/assets/img/weather/feng.png


BIN
src/assets/img/weather/leizhenyu.png


BIN
src/assets/img/weather/qing.png


BIN
src/assets/img/weather/shachenbao.png


BIN
src/assets/img/weather/wu.png


BIN
src/assets/img/weather/xue.png


BIN
src/assets/img/weather/yin.png


BIN
src/assets/img/weather/yu.png


+ 1 - 1
src/assets/js/index.js

@@ -1,5 +1,5 @@
 export const config = {
-  HOST: process.env.NODE_ENV === 'development' ? "http://139.155.240.30:5709/" : "http://139.155.240.30:5709/"  //test
+  HOST: process.env.NODE_ENV === 'development' ? "http://116.196.108.171:9999/" : "http://116.196.108.171:9999/"  //test
   // HOST: process.env.NODE_ENV === 'development' ? "http://101.37.76.132:8012/" : "http://101.37.76.132:8012/"
   //http://101.37.76.132:8012/
 }

+ 11 - 12
src/assets/js/server.js

@@ -1,24 +1,24 @@
 import Taro from '@tarojs/taro'
 import { HTTP_STATUS } from './code'
 import { logError } from './code'
-import store from "./../../store"
+
 import { config } from "./index"
 export default {
   baseOptions(params, method = 'GET') {
     let { url, data } = params
-    let token = store.data.token || ""
-    console.log(token)
-    let contentType = 'application/x-www-form-urlencoded'
+    let token = ""
+    //console.log(config.HOST + url);
+    let contentType = 'application/json'
     contentType = params.contentType || contentType
+    //console.log(contentType);
     const option = {
-      timeout: 10000,
       isShowLoading: false,
       loadingText: '正在加载',
-      url: url,      //config.HOST + url,
+      url: config.HOST + url,
       data: data,
       method: method,
       dataType: 'json',
-      header: { 'content-type': contentType, Authorization: token && `Bearer ${token}`, platform: 1 },
+      header: { Authorization: token, platform: 4, 'content-type': contentType },
       success(res) {
         if (res.statusCode === HTTP_STATUS.NOT_FOUND) {
           return logError('api', '请求资源不存在')
@@ -45,13 +45,12 @@ export default {
     }
     return new Promise(function (resolve, reject) {
       Taro.request(option).then(e => {
-        console.log(url,e, e.data.data)
-        if (e.data.code == 200) {
-          resolve(e.data.data)
+        if (e.statusCode == 200) {
+          resolve(e)
         }
-        else if (e.data.code == 401) {
+        else if (e.data.code == 500) {
           Taro.showToast({
-            title: "登陆超时",
+            title: "溯源码不存在",
             icon: "none",
             duration: 1000
           })

+ 5 - 5
src/components/findcircle/index.jsx

@@ -1,13 +1,13 @@
-import { View} from '@tarojs/components'
+import { View } from '@tarojs/components'
 import Taro from "@tarojs/taro"
-const Findcircle = () =>{
-  const went=(url)=>{
+const Findcircle = () => {
+  const went = (url) => {
     Taro.navigateTo({
-      url:url
+      url: url
     })
   }
   return (
-    <View className='findcircle' onTap={went.bind(this,`/pages/page3/index`)}>
+    <View className='findcircle' onTap={went.bind(this, `/pages/details/index`)}>
       <View className='findpic'></View>
       <View className='findtext'>扫码查询</View>
     </View>

+ 3 - 4
src/components/recall/index.jsx

@@ -1,10 +1,9 @@
 import { View, Input } from '@tarojs/components'
 import Taro from "@tarojs/taro"
-import React,{useState} from 'react'
-const Recall =()=> {
-
+import React, { useState } from 'react'
+const Recall = (a) => {
   return (
-    <View className='recall'>
+    <View className='recall' style={a.props == false ? 'display:none' : ''}>
       <View>该商品已召回,请及时联系供应商</View>
     </View>
   )

+ 22 - 9
src/components/search/index.jsx

@@ -1,21 +1,34 @@
 import { View, Input } from '@tarojs/components'
 import Taro from "@tarojs/taro"
-import React,{useState} from 'react'
-const Search =()=> {
-  const [num,setNum] =useState(null);
-  const shujuduqu=(e)=>{
+import React, { useState } from 'react'
+import { test } from "../../server/index"
+const Search = () => {
+  const [num, setNum] = useState(null);
+  const shujuduqu = (e) => {
     setNum(e.detail.value)
   }
-  const went=(url)=>{
-    Taro.navigateTo({
-      url:url
+  const went = (url) => {
+    // Taro.navigateTo({
+    //   url: url
+    // })
+    test({ sourceCode: num }).then(res => {
+      console.log(res);
+      if (res.data.code == 200) {
+        console.log('ok');
+        Taro.navigateTo({
+          url: '/pages/details/index?id=' + num,
+        })
+      }
+      else if (res.data.code == 500) {
+        console.log('溯源码不存在');
+      }
     })
   }
   return (
     <View className='search'>
       <View className='text'>查看溯源码</View>
-        <Input placeholder='输入溯源码查询' placeholder-class='inplaceholder' onBlur={(e)=>shujuduqu(e)}></Input>
-      <View className='inputicon' onClick={went.bind(this,`/pages/page2/index`)}></View>
+      <Input placeholder='输入溯源码查询' placeholder-class='inplaceholder' onBlur={(e) => shujuduqu(e)}></Input>
+      <View className='inputicon' onClick={went.bind(this, `/pages/cantfind/index`)}></View>
     </View>
   )
 }

+ 57 - 40
src/components/weather/index.jsx

@@ -1,18 +1,16 @@
 import { View, Input } from '@tarojs/components'
-import Taro,{useReady} from "@tarojs/taro"
-import React,{useState,useEffect} from 'react'
-const Weather =(date)=> {
-  const [futureli,setFutureli]=useState([])
-  const [today,setToday]=useState([])
-  const [success,setSuccess]=useState(false)
-  const [time,setTime]=useState('')
-  const weather=(a)=> {
+import Taro, { useReady } from "@tarojs/taro"
+import React, { useState, useEffect } from 'react'
+const Weather = (date) => {
+  const [futureli, setFutureli] = useState([])
+  const [today, setToday] = useState([])
+  const [success, setSuccess] = useState(false)
+  const [time, setTime] = useState('')
+  const weather = (a) => {
     Taro.request({
-      url: a.url, //仅为示例,并非真实的接口地址
+      url: a.url,
       data: {
-        app: 'weather.'+a.type,
-        //cityId:"101210101",
-        //citynm:'北京',
+        app: 'weather.' + a.type,
         weaId: a.weaId,
         appkey: '10003',
         sign: 'b59bc3ef6191eb9f747dd4e83c99f2a4',
@@ -23,39 +21,57 @@ const Weather =(date)=> {
       },
       success: function (res) {
         //console.log(res.data.result)
-        if(a.type==='future')
-        {
+        if (a.type === 'future') {
           setFutureli(res.data.result);
 
         }
-          else if(a.type==='today')
-          {
-            //console.log(res.data.result);
-            setToday(res.data.result);
-          }
+        else if (a.type === 'today') {
+          //console.log(res.data.result);
+          setToday(res.data.result);
+        }
       }
     })
   }
-  const getTime=()=>{
+  const getTime = () => {
     var time = new Date();
-    var h =time.getHours(); //h用来放时
-    h = h < 10? '0' + h:h;
+    var h = time.getHours(); //h用来放时
+    h = h < 10 ? '0' + h : h;
     var m = time.getMinutes();//m用来放分
-    m= m<10?'0'+m:m;
+    m = m < 10 ? '0' + m : m;
     //console.log(time.getMonth()+1+'月'+time.getDate()+'日'+' '+h + ':' + m);
-    setTime(time.getMonth()+1+'月'+time.getDate()+'日'+' '+h + ':' + m)
-}
-const intoarea=(a)=>{
-  if(typeof(a)==='string')
-  return a.split('℃')[1].replace('/','')+'~'+ a.split('℃')[0]+'℃'
-
-}
+    setTime(time.getMonth() + 1 + '月' + time.getDate() + '日' + ' ' + h + ':' + m)
+  }
+  const intoarea = (a) => {
+    if (typeof (a) == 'string' && a.length < 4)
+      return a + '~' + a + '℃'
+    else if (typeof (a) != 'undefined')
+      return a.split('℃')[1].replace('/', '') + '~' + a.split('℃')[0] + '℃'
+  }
+  const weathericon = (a) => {
+    let b = parseInt(a)
+    if (b == 0)
+      return "weabefore qing"
+    else if (b == 1)
+      return "weabefore duoyun"
+    else if (b == 2)
+      return "weabefore yin"
+    else if (b == 3 || b >= 6 && b <= 12 || b == 19 || b >= 21 && b <= 25 || b == 301)
+      return "weabefore yu"
+    else if (b == 4 || b == 5)
+      return "weabefore leizhenyu"
+    else if (b == 6 || b >= 13 && b <= 17 || b >= 26 && b <= 28 || b == 302)
+      return "weabefore xue"
+    else if (b == 18 || b == 32 || b == 49 || b >= 53 && b <= 58)
+      return "weabefore wu"
+    else if (b == 20 || b >= 29 && b <= 31)
+      return "weabefore shachenbao"
+  }
   useReady(() => {
-    weather({url:'https://sapi.k780.com',weaId:date.props.weaId,type:'future'});
-    weather({url:'https://sapi.k780.com',weaId:date.props.weaId,type:'today'});
+    weather({ url: 'https://sapi.k780.com', weaId: date.props.weaId, type: 'future' });
+    weather({ url: 'https://sapi.k780.com', weaId: date.props.weaId, type: 'today' });
     setSuccess(true)
-    setInterval(getTime,1000);
-   })
+    setInterval(getTime, 1000);
+  }, [])
   //  useEffect(()=>{
   //   setInterval(getTime,1000);
   //  },[])
@@ -68,20 +84,21 @@ const intoarea=(a)=>{
       <View className="today">
         <View className="temp_curr">{today.temp_curr}</View>
         <View className="todaydate">
-         <View className="du">℃</View>
-         <View className="sun">{today.weather}</View>
-         <View className="date">{time}</View>
-         <View className="temparea">{intoarea(today.temperature)}</View>
+          <View className="du">℃</View>
+          <View className="sun">{today.weather}</View>
+          <View className="date">{time}</View>
+          <View className="temparea">{intoarea(today.temperature)}</View>
         </View>
 
       </View>
       <View className="futuretitle">未来7天天气预报</View>
       {
-        futureli.map((item)=>{
+        futureli.map((item) => {
           return (
             <View className="futurediv">
               <View className='data'>{item.days.split('-')[1]}月{item.days.split('-')[2]}日</View>
-              <View className="wea zhui">{item.weather}</View>
+              <View className={weathericon(item.weather_iconid)}></View>
+              <View className="wea">{item.weather}</View>
               <View className="temp">{intoarea(item.temperature)}</View>
             </View>
           )

src/pages/page2/index.config.js → src/pages/cantfind/index.config.js


src/pages/page2/index.css → src/pages/cantfind/index.css


src/pages/page2/index.jsx → src/pages/cantfind/index.jsx


src/pages/page2/index.less → src/pages/cantfind/index.less


src/pages/page6/index.config.js → src/pages/commodity/index.config.js


src/pages/page6/index.css → src/pages/commodity/index.css


+ 118 - 0
src/pages/commodity/index.jsx

@@ -0,0 +1,118 @@
+import { Component } from 'react'
+import { View, Swiper, SwiperItem } from '@tarojs/components'
+import './index.less'
+import Taro from "@tarojs/taro"
+import React, { useState, useEffect } from 'react'
+const went = (url) => {
+  Taro.navigateTo({
+    url: url
+  })
+}
+
+const Index = () => {
+  const ajax = () => {
+    Taro.request({
+      url: 'https://sapi.k780.com', //仅为示例,并非真实的接口地址
+      data: {
+        app: 'weather.future',
+        //cityId:"101210101",
+        //citynm:'北京',
+        weaId: '94',
+        appkey: '10003',
+        sign: 'b59bc3ef6191eb9f747dd4e83c99f2a4',
+        format: 'json'
+      },
+      header: {
+        'content-type': 'application/json' // 默认值
+      },
+      success: function (res) {
+        console.log(res.data)
+      }
+    })
+  }
+  useEffect(() => {
+    ajax()
+  }, [])
+
+  const thinglist = [{ title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '新疆维吾尔', price: 430 }, { title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '新疆维吾尔', price: 430 }
+    , { title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '杭州', price: 430 }, { title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '徐州', price: 430 }]
+  const tulist = [{ url: '' }, { url: '' }]
+  const [picnum, setPicnum] = useState(1);
+  const bang = (e) => {
+    setPicnum(e.detail.current + 1)
+  }
+  const banmess = { text1: '山东土鸡汤', text2: '认证商品', text3: '享受百日阳光,营养价值超越普通三倍', text4: '发货地址:浙江省杭州市滨江区阿里中心2栋' }
+  const prointropic = [{}, {}, {}]
+  const chandiintro = [{ title: "基地名称1", mess: '介绍文本内容展示绍文本内容展示,介绍文本内容展示绍文本内容展示' }, { title: "基地名称2", mess: '介绍文本内容展示绍文本内容展示,介绍文本内容展示绍文本内容展示' }]
+  return (
+    <View className="index">
+      <View className="banner">
+        <Swiper
+          className='swiper-body'
+          indicatorColor='#999'
+          indicatorActiveColor='#333'
+          current={0}
+          duration={500}
+          interval={5000}
+          circular
+          autoplay onChange={bang}>
+          {
+            tulist.map((item, index) => {
+              return (<SwiperItem>
+                <View className='demo-text-1'></View>
+              </SwiperItem>)
+            })
+          }
+        </Swiper>
+        <View className='change'>{picnum}/{tulist.length}</View>
+      </View>
+      <View className="bannermess">
+        <View className="text1">{banmess.text1}</View>
+        <View className="text2">{banmess.text2}</View>
+        <View className="text3">{banmess.text3}</View>
+        <View className="text4">{banmess.text4}</View>
+      </View>
+      <View className="porintro">
+        <View className="title">商品介绍</View>
+        {
+          prointropic.map((item) => {
+            return (
+              <View className='pic'></View>
+            )
+          })
+        }
+      </View>
+      <View className="chandiintro">
+        <View className="introtitle">产地介绍</View>
+        {
+          chandiintro.map((item, index) => {
+            return (
+              <View className="chandidiv" style={index == chandiintro.length - 1 ? 'padding-bottom:0;border:none;' : ''}>
+                <View className="pic"></View>
+                <View className="xinxi">
+                  <View className="title">{item.title}</View>
+                  <View className="mess">{item.mess}</View>
+                </View>
+              </View>
+            )
+          })
+        }
+      </View>
+      <View className="advicetitle">优品推荐</View>
+      {
+        thinglist.map((item, index) => {
+          return (
+            <View className="thingdiv" style={index % 2 == 0 ? 'margin-right:10px' : ''} onClick={went.bind(this, `/pages/commodity/index`)}>
+              <View className="pic"></View>
+              <View className="title">大方土特产,独特配方专业人士手艺的测试测试测试</View>
+              <View className="has">认证商品</View>
+              <View className="address">新疆维吾尔</View>
+              <View className="price">¥430</View>
+            </View>
+          )
+        })
+      }
+    </View>
+  )
+}
+export default Index

src/pages/page6/index.less → src/pages/commodity/index.less


src/pages/page4/index.config.js → src/pages/complaint/index.config.js


+ 12 - 6
src/pages/page4/index.css

@@ -21,10 +21,14 @@ page {
   width: 478px;
   font-size: 28px;
   font-weight: 400;
-  color: #999999;
+  color: #000000;
   overflow: visible;
   word-break: break-all;
 }
+.complain .messdiv .tusucon {
+  font-size: 28rpx;
+  font-weight: 400;
+}
 .complain .messdiv .icon {
   width: 36px;
   height: 36px;
@@ -52,20 +56,21 @@ page {
 }
 .complain .complainpic {
   background-color: #FFFFFF;
-  padding: 30px 0 30px 24px;
+  padding: 30px 0 30px 0;
 }
 .complain .complainpic .title {
   font-size: 30px;
   font-weight: 500;
   color: #333333;
+  padding-left: 24px;
 }
 .complain .complainpic .picdiv {
-  width: 160px;
-  height: 160px;
   margin-top: 36px;
-  background-color: #f4f5f6;
+  padding-left: 4px;
   margin-bottom: 8px;
-  position: relative;
+}
+.complain .complainpic .picdiv .at-image-picker__item {
+  background-color: #f4f5f6;
 }
 .complain .complainpic .picdiv .icon {
   width: 38px;
@@ -80,4 +85,5 @@ page {
   font-size: 24px;
   font-weight: 400;
   color: #333333;
+  padding-left: 24px;
 }

+ 79 - 0
src/pages/complaint/index.jsx

@@ -0,0 +1,79 @@
+import { Component, useState } from 'react'
+import { View, Text, Textarea, Input } from '@tarojs/components'
+import './index.less'
+import Taro from "@tarojs/taro"
+import { AtImagePicker } from 'taro-ui'
+import "taro-ui/dist/style/components/image-picker.scss";
+import "taro-ui/dist/style/components/icon.scss";
+import { AtActionSheet, AtActionSheetItem } from "taro-ui"
+import "taro-ui/dist/style/components/action-sheet.scss";
+const went = (url) => {
+  Taro.navigateTo({
+    url: url
+  })
+}
+const Index = () => {
+  const [files, setFiles] = useState([])
+  const [chooseList, setChooseList] = useState(['发货慢', '物流慢', '乱标价', '质量不好', '货不对版', '最长六个选项'])
+  const [hadchoose, setHadchoose] = useState(false)
+  const [tusutype, setTusutype] = useState('')
+  const onChange = (files) => {
+    setFiles(files)
+
+  }
+  const onFail = (mes) => {
+    console.log(mes)
+  }
+  const onImageClick = (index, file) => {
+    console.log(index, file)
+  }
+  const tan = () => {
+    Taro.showActionSheet({
+      itemList: chooseList,
+      success: function (res) {
+        setHadchoose(true)
+        setTusutype(this.itemList[res.tapIndex])
+      },
+      fail: function (res) {
+        setHadchoose(false)
+        setTusutype('')
+      }
+    })
+  }
+
+  return (
+    <View className='complain'>
+      <View className="messdiv">
+        <View className="mess1">姓名</View>
+        <Input className='mess2' placeholder="请输入姓名(选填)"></Input>
+      </View>
+      <View className="messdiv">
+        <View className="mess1">手机号</View>
+        <Input className='mess2' placeholder="请输入手机号(选填)"></Input>
+      </View>
+      <View className="messdiv" onClick={tan}>
+        <View className="mess1">投诉类型</View>
+        <View className="tusucon">{tusutype}</View>
+        <View className="icon" style={hadchoose == true ? 'display:none' : 'display:block'}></View>
+      </View>
+      <View className="messdiv">
+        <View className="mess1" style='width:192rpx'>内容</View>
+        <Textarea className='mess2' placeholder="请描述投诉详情请描述投诉详情请描述投诉详情请描述投诉详情" style='height:88rpx'></Textarea>
+      </View>
+      <View className="lab">查证后将视情况给予一定奖励,建议留下联系方式,以便联系您
+        </View>
+      <View className="complainpic">
+        <View className="title">投诉图片</View>
+        {/* <View className="picdiv"><View className="icon"></View></View> */}
+        <AtImagePicker
+          className="picdiv"
+          files={files}
+          onChange={onChange.bind(this)}
+        />
+        <View className="label">文件大小不超过5M</View>
+      </View>
+      <View className="but" onClick={went.bind(this, `/pages/subsuccess/index`)}>提交</View>
+    </View>
+  )
+}
+export default Index

+ 14 - 6
src/pages/page4/index.less

@@ -25,11 +25,16 @@ page {
       width: 478px;
       font-size: 28px;
       font-weight: 400;
-      color: #999999;
+      color: #000000;
       overflow: visible;
       word-break: break-all
     }
 
+    .tusucon {
+      font-size: 28rpx;
+      font-weight: 400;
+    }
+
     .icon {
       width: 36px;
       height: 36px;
@@ -61,21 +66,23 @@ page {
 
   .complainpic {
     background-color: #FFFFFF;
-    padding: 30px 0 30px 24px;
+    padding: 30px 0 30px 0;
 
     .title {
       font-size: 30px;
       font-weight: 500;
       color: #333333;
+      padding-left: 24px;
     }
 
     .picdiv {
-      width: 160px;
-      height: 160px;
       margin-top: 36px;
-      background-color: #f4f5f6;
+      padding-left: 4px;
       margin-bottom: 8px;
-      position: relative;
+
+      .at-image-picker__item {
+        background-color: #f4f5f6;
+      }
 
       .icon {
         width: 38px;
@@ -92,6 +99,7 @@ page {
       font-size: 24px;
       font-weight: 400;
       color: #333333;
+      padding-left: 24px;
     }
   }
 

src/pages/page3/index.config.js → src/pages/details/index.config.js


+ 17 - 8
src/pages/page3/index.css

@@ -3,6 +3,16 @@ page {
   font-family: PingFangSC-Medium, PingFang SC;
   padding-bottom: 108px;
 }
+.message .noline::before {
+  content: '';
+  display: inline-block;
+  width: 4px;
+  height: 0px !important;
+  background-color: #E5E5E5;
+  margin-left: 56px;
+  margin-right: 56px;
+  margin-top: 32px;
+}
 .message .chanpin .mes {
   padding: 24px 24px 24px 24px;
   background: #F5F5F5;
@@ -21,10 +31,12 @@ page {
 }
 .message .chanpin .mes .productfrom .allmessage {
   display: flex;
+  overflow: hidden;
 }
 .message .chanpin .mes .productfrom .allmessage .contens .conten {
-  width: 550px;
   height: 416px;
+  display: flex;
+  padding-right: 56px;
 }
 .message .chanpin .mes .productfrom .allmessage .contens .conten .inner .title {
   font-size: 30px;
@@ -76,17 +88,16 @@ page {
   color: #999999;
 }
 .message .chanpin .mes .productfrom .allmessage .contens .conten .inner .pic {
-  width: 90%;
   height: 180px;
-  background-color: #02B178;
+  background-color: #F24724;
   margin-top: 24px;
   border-radius: 16px;
 }
-.message .chanpin .mes .productfrom .allmessage::before {
+.message .chanpin .mes .productfrom .allmessage .contens .conten::before {
   content: '';
   display: inline-block;
   width: 4px;
-  height: 820px;
+  height: 416px;
   background-color: #E5E5E5;
   margin-left: 56px;
   margin-right: 56px;
@@ -95,7 +106,6 @@ page {
 .message .chanpin .mes .productfrom .more {
   padding-bottom: 32px;
   font-size: 24px;
-  font-family: PingFangSC-Regular, PingFang SC;
   font-weight: 400;
   color: #838485;
   text-align: center;
@@ -112,7 +122,6 @@ page {
 .message .chanpin .mes .productfrom .less {
   padding-bottom: 32px;
   font-size: 24px;
-  font-family: PingFangSC-Regular, PingFang SC;
   font-weight: 400;
   color: #838485;
   text-align: center;
@@ -131,7 +140,7 @@ page {
   width: 100%;
   margin-top: 24px;
   border-radius: 16px;
-  background-color: aqua;
+  background-color: #F24724;
 }
 .message .chanpin .mes .wuliumessage {
   border-radius: 16px;

+ 207 - 0
src/pages/details/index.jsx

@@ -0,0 +1,207 @@
+import { Component } from 'react'
+import { View, Text, Swiper, SwiperItem, Image } from '@tarojs/components'
+import './index.less'
+import Taro, { useDidHide, useReady, Current } from "@tarojs/taro"
+import React, { useState, useEffect, onLoad, useLayoutEffect } from 'react'
+import Recall from '../../components/recall'
+import Weather from '../../components/weather'
+import { formatRichText } from "../../assets/js/filter"
+import { test } from "../../server/index"
+const Index = () => {
+  const [choice, setChoice] = useState(1)
+  //商品是否召回,true为召回
+  const [ifrecall, setIfrecall] = useState(true)
+  //设置产地天气定位城市ID,94为杭州
+  const [cityId, setCityId] = useState(94)
+  //生产追溯是否展开,true为初始不展开,false展开
+  const [ifshow, setIfshow] = useState(true)
+  const [froms, setFroms] = useState([])
+  const [promesslist, setpromesslist] = useState([])
+  const [wuliulist, setwuliulist] = useState([])
+  const [thinglist, setthinglist] = useState([])
+  const [addmesslist, setaddmesslist] = useState([])
+
+  const setChoice1 = () => {
+    setChoice(1)
+    console.log(froms);
+  }
+  const setChoice2 = () => {
+    setChoice(2)
+  }
+  const findmore = () => {
+    ifshow === false ? setIfshow(true) : setIfshow(false);
+  }
+
+  const went = (url) => {
+    Taro.navigateTo({
+      url: url
+    })
+  }
+
+  // const pages = getCurrentPages()
+  // const current = pages[pages.length - 1]
+  // const eventChannel = current.getOpenerEventChannel()
+  // eventChannel.emit('someEvent', 1);
+
+
+  useEffect(() => {
+    const id = Current.router.params.id;
+    console.log(id);
+    if (id)
+      test({ sourceCode: id }).then(e => {
+        console.log(e);
+        const res = e.data.data;
+        setFroms(res.supplySourceCodeInfoList)
+        //setpromesslist([{title: '产品名称', mess: '宫廷御用菜' }])
+      })
+
+  }, [])
+
+  // const froms = [{ title: '产前阶段:种植', time: '2021-09-11', name: '张和农', text: '操作描述:自然气候条件独特,常年云雾缭绕,周  边环境污染,是生产优质自然生态蔬菜园。' },
+  // { title: '产前阶段:除虫', time: '2021-09-12', name: '张和农', text: '操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。' },
+  // { title: '产前阶段:仓储信息', time: '2021-09-12', name: '张和农', text: '操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。' },
+  // { title: '产前阶段:仓储信息', time: '2021-09-12', name: '张和农', text: '操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。' },
+  // { title: '产前阶段:仓储信息', time: '2021-09-12', name: '张和农', text: '操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。' },
+  // { title: '产前阶段:仓储信息', time: '2021-09-12', name: '张和农', text: '操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。' }]
+
+  // const promesslist = [{ title: '产品名称', mess: '宫廷御用菜' }, { title: '产品分类', mess: '蔬菜' }, { title: '产品规格', mess: '2000g' }, { title: '建议价', mess: '38元/斤' }, { title: '溯源码', mess: '0253111625362354' }]
+  // const wuliulist = [{ com: '优鲜购有限公司(采购商)', tel: 12034131310 }, { com: '果乐汇有限公司(供应商)', tel: 12034131310 }]
+  // const thinglist = [{ title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '新疆维吾尔', price: 430 }, { title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '新疆维吾尔', price: 430 }
+  //   , { title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '杭州', price: 430 }, { title: '大方土特产,独特配方专业人士手艺的测试测试测试', address: '徐州', price: 430 }]
+  // const addmesslist = [{ title: '产地名称', text: '宫廷御用莲' }, { title: '详细地址', text: '北京市东城区东区路112号' }, { title: '负责人', text: '韩建' }]
+  return (
+    <View className='message'>
+      <View className='tab'>
+        <View className={choice === 1 ? 'tablist' : 'tablistfan'} onClick={setChoice1}>产品介绍</View>
+        <View className={choice === 2 ? 'tablist' : 'tablistfan'} onClick={setChoice2}>产地介绍</View>
+        <View className={choice === 1 ? 'tabhua1' : 'tabhua2'}></View>
+      </View>
+      <View className="chanpin" style={choice == 1 ? 'display:block' : 'display:none'}>
+        <Recall props={ifrecall}></Recall>
+        <View className="mes">
+          <View className="productfrom">
+            <View className="bigtitle">生产追溯</View>
+            <View className="allmessage">
+              <View className="contens">
+                {
+                  froms.map((item, index) => {
+                    return (
+                      <View className={index == froms.length - 1 ? 'noline conten' : 'conten'} key={index} style={index < 3 || ifshow == false ? 'visibility:visible' : 'display:none'}>
+                        <View className="inner">
+                          <View className="title">{item.title}阶段</View>
+                          <View className="time">{item.createTime.split(' ')[0]}</View>
+                          <View className="name">{item.createName}</View>
+                          <View className="text">{item.content}</View>
+                          <View className="pic"></View>
+                        </View>
+                      </View>)
+                  })
+                }
+              </View>
+            </View>
+            <View className={ifshow == false ? 'more' : 'less'} onClick={findmore}>{ifshow == false ? '收起' : '点击查看更多'}</View>
+          </View>
+          <View className="showpic"></View>
+          <View className="promessage">
+            <View className="messtitle">产品信息</View>
+            <View className="small1">该批次产品已追溯</View>
+            <View className="small2">190022次</View>
+            {
+              promesslist.map((item, index) => {
+                return (
+                  <View className="messdiv">
+                    <View className="mess1">{item.title}</View>
+                    <View className="mess2">{item.mess}</View>
+                  </View>
+                )
+              })
+            }
+            <View className="messdiv">
+              <View className="mess1">认证标识</View>
+              <View className="iconpic"></View>
+            </View>
+            <View className="messdiv" style='border:none' onClick={went.bind(this, `/pages/complaint/index`)}>
+              <View className="mess1">投诉建议</View>
+              <View className="icon2"></View>
+            </View>
+          </View>
+          <View className="videodiv">
+            <View className="title">产品短片</View>
+            <View className="video"></View>
+          </View>
+          <View className="wuliumessage">
+            <View className="title">物流信息</View>
+            {
+              wuliulist.map((item, index) => {
+                return (
+                  <View className="wuliudiv" style={index === wuliulist.length - 1 ? 'border:none' : ''}>
+                    <View className="commess">{item.com}</View>
+                    {/* <View className="tel">联系电话:{item.tel}</View> */}
+                    <View className="icon"></View>
+                  </View>
+                )
+              })
+            }
+          </View>
+          <View className="advicetitle">优品推荐</View>
+          {
+            thinglist.map((item, index) => {
+              return (
+                <View className="thingdiv" style={index % 2 == 0 ? 'margin-right:10px' : ''} onClick={went.bind(this, `/pages/commodity/index`)}>
+                  <View className="pic"></View>
+                  <View className="title">大方土特产,独特配方专业人士手艺的测试测试测试</View>
+                  <View className="has">认证商品</View>
+                  <View className="address">新疆维吾尔</View>
+                  <View className="price">¥430</View>
+                </View>
+              )
+            })
+          }
+        </View>
+      </View>
+      <View className="chandi" style={choice == 1 ? 'display:none' : 'display:block'}>
+        <Swiper
+          className='swiper-body'
+          indicatorDots
+          indicatorColor='#999'
+          indicatorActiveColor='#333'
+          current
+          duration={500}
+          interval={5000}
+          circular
+          autoplay>
+          <SwiperItem>
+            <View className='demo-text-1'>1</View>
+          </SwiperItem>
+          <SwiperItem>
+            <View className='demo-text-2'>2</View>
+          </SwiperItem>
+          <SwiperItem>
+            <View className='demo-text-3'>3</View>
+          </SwiperItem>
+        </Swiper>
+        <View className="promessage">
+          <View className="messtitle">产地信息</View>
+          <View className="small1">该批次产品已追溯</View>
+          <View className="small2">190022次</View>
+          {
+            addmesslist.map((item, index) => {
+              return (
+                <View className="messdiv" style={index == 0 ? 'margin-top:14px' : ''}>
+                  <View className="mess1">{item.title}</View>
+                  <View className="mess2">{item.text}</View>
+                </View>
+              )
+            })
+          }
+        </View>
+        <View className="videodiv">
+          <View className="title">生产基地短片</View>
+          <Image className="video" src='http://api.k780.com/upload/weather/d/1.gif'></Image>
+        </View>
+        <Weather props={{ weaId: cityId }}></Weather>
+      </View>
+    </View>
+  )
+}
+export default Index

+ 30 - 18
src/pages/page3/index.less

@@ -5,6 +5,19 @@ page {
 }
 
 .message {
+  .noline {
+    &::before {
+      content: '';
+      display: inline-block;
+      width: 4px;
+      height: 0px !important;
+      background-color: #E5E5E5;
+      margin-left: 56px;
+      margin-right: 56px;
+      margin-top: 32px;
+    }
+  }
+
   .chanpin {
     .mes {
       padding: 24px 24px 24px 24px;
@@ -28,13 +41,13 @@ page {
         .allmessage {
 
           display: flex;
-          // flex-wrap: wrap;
-
+          overflow: hidden;
 
           .contens {
             .conten {
-              width: 550px;
               height: 416px;
+              display: flex;
+              padding-right: 56px;
 
               .inner {
                 .title {
@@ -93,33 +106,33 @@ page {
                 }
 
                 .pic {
-                  width: 90%;
                   height: 180px;
-                  background-color: #02B178;
+                  background-color: #F24724;
                   margin-top: 24px;
                   border-radius: 16px;
                 }
               }
+
+              &::before {
+                content: '';
+                display: inline-block;
+                width: 4px;
+                height: 416px;
+                background-color: #E5E5E5;
+                margin-left: 56px;
+                margin-right: 56px;
+                margin-top: 32px;
+              }
             }
           }
 
-          &::before {
-            content: '';
-            display: inline-block;
-            width: 4px;
-            height: 820px;
-            background-color: #E5E5E5;
-            margin-left: 56px;
-            margin-right: 56px;
-            margin-top: 32px;
-          }
+
         }
 
         .more {
           //padding-top: 32px;
           padding-bottom: 32px;
           font-size: 24px;
-          font-family: PingFangSC-Regular, PingFang SC;
           font-weight: 400;
           color: #838485;
           text-align: center;
@@ -139,7 +152,6 @@ page {
           //padding-top: 32px;
           padding-bottom: 32px;
           font-size: 24px;
-          font-family: PingFangSC-Regular, PingFang SC;
           font-weight: 400;
           color: #838485;
           text-align: center;
@@ -161,7 +173,7 @@ page {
         width: 100%;
         margin-top: 24px;
         border-radius: 16px;
-        background-color: aqua;
+        background-color: #F24724;
       }
 
 

+ 3 - 0
src/pages/enter/index.config.js

@@ -0,0 +1,3 @@
+export default {
+  navigationStyle: 'custom'
+}

+ 66 - 0
src/pages/enter/index.css

@@ -0,0 +1,66 @@
+.index {
+  font-family: PingFangSC-Regular, PingFang SC;
+  background: #803a3a;
+  padding: 316px 0 292px 0;
+}
+.index .tex {
+  width: 384px;
+  height: 208px;
+  font-size: 64px;
+  font-family: SourceHanSansSC-Bold, SourceHanSansSC;
+  font-weight: bold;
+  color: #FFFFFF;
+  line-height: 104px;
+  margin: 0 182px 292px 184px;
+}
+.index .circle {
+  width: 254px;
+  height: 254px;
+  background: rgba(255, 255, 255, 0.85);
+  box-shadow: 0px 18px 46px 0px rgba(0, 0, 0, 0.1);
+  border-radius: 50%;
+  margin: 0 0 154px 248px;
+}
+.index .circle .saoma {
+  display: flex;
+  flex-wrap: wrap;
+  font-size: 28px;
+  font-weight: 400;
+  color: #E43827;
+  line-height: 40px;
+  text-align: center;
+  padding: 60px 68px 0 72px;
+}
+.index .circle .saoma::before {
+  content: '';
+  display: inline-block;
+  height: 84px;
+  width: 84px;
+  margin: 0 18px 14px 12px;
+  background: url(../../assets/img/find.png) no-repeat;
+  background-size: 100% auto;
+}
+.index .enter {
+  width: 640px;
+  height: 108px;
+  background: #E43827;
+  box-shadow: 0px 18px 46px 0px rgba(0, 0, 0, 0.1);
+  border-radius: 58px;
+  margin-left: 56px;
+}
+.index .enter .intext {
+  font-size: 36px;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 108px;
+  display: flex;
+}
+.index .enter .intext::before {
+  content: '';
+  display: inline-block;
+  width: 48px;
+  height: 48px;
+  background: url(../../assets/img/enter.png) no-repeat;
+  background-size: 100% auto;
+  margin: 32px 16px 0 198px;
+}

+ 33 - 0
src/pages/enter/index.jsx

@@ -0,0 +1,33 @@
+import { Component } from 'react'
+import { View, Text, Input } from '@tarojs/components'
+import Search from "../../components/search/index"
+import Findcircle from "../../components/findcircle/index"
+import './index.less'
+import Taro from "@tarojs/taro"
+
+const Index = () => {
+  const went = (url) => {
+    Taro.navigateTo({
+      url: url
+    })
+  }
+  const scan = () => {
+    wx.scanCode({
+      success(res) {
+        Taro.navigateTo({
+          url: '/pages/details/index?id=' + res.result,
+        })
+      }
+    })
+  }
+  return (
+    <View className='index'>
+      <View className="tex">探寻溯源信息见证产品成长</View>
+      <View className="circle" onTap={scan}>
+        <View className="saoma">扫码溯源</View>
+      </View>
+      <View className="enter" onTap={went.bind(this, '/pages/login/index')}><View className="intext">供应商入口</View></View>
+    </View>
+  )
+}
+export default Index

+ 76 - 0
src/pages/enter/index.less

@@ -0,0 +1,76 @@
+.index {
+  font-family: PingFangSC-Regular, PingFang SC;
+  background: #803a3a;
+  //opacity: 0.4;
+  padding: 316px 0 292px 0;
+
+  .tex {
+    width: 384px;
+    height: 208px;
+    font-size: 64px;
+    font-family: SourceHanSansSC-Bold, SourceHanSansSC;
+    font-weight: bold;
+    color: #FFFFFF;
+    line-height: 104px;
+    margin: 0 182px 292px 184px;
+  }
+
+  .circle {
+    width: 254px;
+    height: 254px;
+    background: rgba(255, 255, 255, 0.85);
+    box-shadow: 0px 18px 46px 0px rgba(0, 0, 0, 0.1);
+    border-radius: 50%;
+    margin: 0 0 154px 248px;
+
+
+    .saoma {
+      display: flex;
+      flex-wrap: wrap;
+      font-size: 28px;
+      font-weight: 400;
+      color: #E43827;
+      line-height: 40px;
+      text-align: center;
+      padding: 60px 68px 0 72px;
+
+      &::before {
+        content: '';
+        display: inline-block;
+        height: 84px;
+        width: 84px;
+        margin: 0 18px 14px 12px;
+        background: url(../../assets/img/find.png) no-repeat;
+        background-size: 100% auto;
+
+      }
+    }
+  }
+
+  .enter {
+    width: 640px;
+    height: 108px;
+    background: #E43827;
+    box-shadow: 0px 18px 46px 0px rgba(0, 0, 0, 0.1);
+    border-radius: 58px;
+    margin-left: 56px;
+
+    .intext {
+      font-size: 36px;
+      font-weight: 400;
+      color: #FFFFFF;
+      line-height: 108px;
+      display: flex;
+
+      &::before {
+        content: '';
+        display: inline-block;
+        width: 48px;
+        height: 48px;
+        background: url(../../assets/img/enter.png) no-repeat;
+        background-size: 100% auto;
+        margin: 32px 16px 0 198px;
+      }
+    }
+  }
+}

+ 1 - 0
src/pages/index/index.css

@@ -1,5 +1,6 @@
 .index {
   font-family: PingFangSC-Medium, PingFang SC;
+  background-color: #FFFFFF;
 }
 .index .search {
   background: linear-gradient(178deg, #E03326 0%, #E33A25 100%);

+ 11 - 10
src/pages/index/index.jsx

@@ -1,18 +1,19 @@
 import { Component } from 'react'
-import { View, Text,Input } from '@tarojs/components'
+import { View, Text, Input } from '@tarojs/components'
 import Search from "../../components/search/index"
 import Findcircle from "../../components/findcircle/index"
 import './index.less'
 import Taro from "@tarojs/taro"
-const Index= ()=> {
 
-return (
-      <View className='index'>
-        <Search></Search>
-        <Findcircle></Findcircle>
-        <View className='babletext'>点击按钮查询对应溯源码</View>
-        <View className="bottompic"></View>
-      </View>
-    )
+const Index = () => {
+
+  return (
+    <View className='index'>
+      <Search></Search>
+      <Findcircle></Findcircle>
+      <View className='babletext'>点击按钮查询对应溯源码</View>
+      <View className="bottompic"></View>
+    </View>
+  )
 }
 export default Index

+ 1 - 0
src/pages/index/index.less

@@ -1,5 +1,6 @@
 .index {
   font-family: PingFangSC-Medium, PingFang SC;
+  background-color: #FFFFFF;
 
   .search {
     background: linear-gradient(178deg, #E03326 0%, #E33A25 100%);

+ 3 - 0
src/pages/login/index.config.js

@@ -0,0 +1,3 @@
+export default {
+  navigationStyle: 'custom'
+}

+ 61 - 0
src/pages/login/index.css

@@ -0,0 +1,61 @@
+.index {
+  font-family: PingFangSC-Regular, PingFang SC;
+  padding: 280px 0 576px 0;
+}
+.index .log {
+  padding: 0 60px 0 60px;
+}
+.index .log .title {
+  font-size: 60px;
+  font-weight: 600;
+  color: #121319;
+  margin-bottom: 162px;
+}
+.index .log .box {
+  height: 72px;
+  border-bottom: solid 2px rgba(211, 223, 239, 0.66);
+  margin-bottom: 82px;
+  display: flex;
+  position: relative;
+}
+.index .log .box .tel {
+  font-size: 32px;
+  font-weight: 400;
+  color: #999999;
+  padding-left: 6px;
+  display: flex;
+}
+.index .log .box .tel::after {
+  content: '';
+  width: 2px;
+  height: 32px;
+  display: inline-block;
+  margin: 6px 22px 0 24px;
+  background-color: #979797;
+}
+.index .log .box Input {
+  display: flex;
+  font-size: 36px;
+  font-weight: 500;
+  color: #0B0D0E;
+}
+.index .log .box .get {
+  font-size: 32px;
+  font-weight: 400;
+  color: #505255;
+  position: absolute;
+  top: 0;
+  right: 0;
+}
+.index .butt {
+  width: 676px;
+  height: 100px;
+  margin: 132px 0 0 44px;
+  background: #E43827;
+  border-radius: 50px;
+  font-size: 32px;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 100px;
+  text-align: center;
+}

+ 33 - 0
src/pages/login/index.jsx

@@ -0,0 +1,33 @@
+import { Component } from 'react'
+import { View, Text, Input } from '@tarojs/components'
+import Search from "../../components/search/index"
+import Findcircle from "../../components/findcircle/index"
+import './index.less'
+import Taro from "@tarojs/taro"
+
+const Index = () => {
+  const went = (url) => {
+    Taro.navigateTo({
+      url: url
+    })
+  }
+  return (
+    <View className='index'>
+      <View className="log">
+        <View className="title">欢迎登录</View>
+        <View className="box">
+          <View className="tel">+86
+          </View>
+          <Input placeholder='请输入手机号'></Input>
+        </View>
+        <View className="box">
+          <Input placeholder='验证码'>
+          </Input>
+          <View className="get">获取验证码</View>
+        </View>
+      </View>
+      <View className="butt" onTap={went.bind(this, '/pages/message/index')}>登录</View>
+    </View>
+  )
+}
+export default Index

+ 71 - 0
src/pages/login/index.less

@@ -0,0 +1,71 @@
+.index {
+  font-family: PingFangSC-Regular, PingFang SC;
+  padding: 280px 0 576px 0;
+
+  .log {
+    padding: 0 60px 0 60px;
+
+    .title {
+      font-size: 60px;
+      font-weight: 600;
+      color: #121319;
+      margin-bottom: 162px;
+    }
+
+    .box {
+      height: 72px;
+      border-bottom: solid 2px rgba(211, 223, 239, .66);
+      margin-bottom: 82px;
+      display: flex;
+      position: relative;
+
+      .tel {
+        font-size: 32px;
+        font-weight: 400;
+        color: #999999;
+        padding-left: 6px;
+        display: flex;
+
+        &::after {
+          content: '';
+          width: 2px;
+          height: 32px;
+          display: inline-block;
+          margin: 6px 22px 0 24px;
+          background-color: #979797;
+        }
+      }
+
+      Input {
+        display: flex;
+        font-size: 36px;
+        font-weight: 500;
+        color: #0B0D0E;
+
+      }
+
+      .get {
+        font-size: 32px;
+        font-weight: 400;
+        color: #505255;
+        position: absolute;
+        top: 0;
+        right: 0;
+      }
+
+    }
+  }
+
+  .butt {
+    width: 676px;
+    height: 100px;
+    margin: 132px 0 0 44px;
+    background: #E43827;
+    border-radius: 50px;
+    font-size: 32px;
+    font-weight: 400;
+    color: #FFFFFF;
+    line-height: 100px;
+    text-align: center;
+  }
+}

+ 3 - 0
src/pages/message/index.config.js

@@ -0,0 +1,3 @@
+export default {
+  navigationBarTitleText: '溯源信息'
+}

+ 82 - 0
src/pages/message/index.css

@@ -0,0 +1,82 @@
+page {
+  background: #F5F5F5;
+  font-family: PingFangSC-Medium, PingFang SC;
+  padding-bottom: 194px;
+}
+.message .noline::before {
+  content: '';
+  display: inline-block;
+  width: 4px;
+  height: 0px !important;
+  background-color: #E5E5E5;
+  margin-left: 56px;
+  margin-right: 56px;
+  margin-top: 32px;
+}
+.message .list {
+  padding: 22px 24px 284px 24px;
+}
+.message .list .listli {
+  background: #FFFFFF;
+  border-radius: 16px;
+}
+.message .list .listli .title {
+  padding: 26px 0 24px 24px;
+  font-size: 30px;
+  font-weight: 500;
+  color: #333333;
+  border-bottom: 1px solid #EEEEEE;
+}
+.message .list .listli .messlidiv {
+  padding: 0 24px 24px 24px;
+}
+.message .list .listli .messlidiv .messli {
+  display: flex;
+  padding: 24px 0 24px 0;
+  border-bottom: 1px solid #EEEEEE;
+  position: relative;
+}
+.message .list .listli .messlidiv .messli .go {
+  display: inline-block;
+  width: 30px;
+  height: 30px;
+  background: url(../../assets/img/right1.png) no-repeat;
+  background-size: 100% auto;
+  position: absolute;
+  top: 34px;
+  right: 0px;
+}
+.message .list .listli .messlidiv .messli .pic {
+  display: inline-block;
+  width: 136px;
+  height: 136px;
+  margin-right: 24px;
+}
+.message .list .listli .messlidiv .messli .xinxidiv .xinxi1 {
+  font-size: 30px;
+  font-weight: 500;
+  color: #333333;
+  padding: 6px 0 8px 0;
+}
+.message .list .listli .messlidiv .messli .xinxidiv .xinxi2 {
+  font-size: 26px;
+  font-weight: 400;
+  color: #999999;
+}
+.message .fixbut {
+  background-color: #FFF;
+  padding: 24px 36px 70px 38px;
+  position: fixed;
+  bottom: 0;
+}
+.message .fixbut .buttoo {
+  width: 676px;
+  height: 100px;
+  background: #E43827;
+  border-radius: 50px;
+  text-align: center;
+  font-size: 32px;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 100px;
+}

+ 91 - 0
src/pages/message/index.jsx

@@ -0,0 +1,91 @@
+import { Component } from 'react'
+import { View, Text, Swiper, SwiperItem, Image } from '@tarojs/components'
+import './index.less'
+import Taro, { useDidHide, useReady, Current } from "@tarojs/taro"
+import React, { useState, useEffect, onLoad, useLayoutEffect } from 'react'
+import Recall from '../../components/recall'
+import { formatRichText } from "../../assets/js/filter"
+import { test } from "../../server/index"
+const Index = () => {
+  const [choice, setChoice] = useState(1)
+
+
+  const setChoice1 = () => {
+    setChoice(1)
+  }
+  const setChoice2 = () => {
+    setChoice(2)
+  }
+
+  const went = (url) => {
+    Taro.navigateTo({
+      url: url
+    })
+  }
+  const scan = () => {
+    wx.scanCode({
+      success(res) {
+        Taro.navigateTo({
+          url: '/pages/details/index?id=' + res.result,
+        })
+      }
+    })
+  }
+  const messlist = [{ number: '666666666666666', name: '东北优质黑大米' }, { number: '777777777777777', name: '东北优质黑大米' },
+  { number: '888888888888888', name: '东北优质黑大米' }, { number: '999999999999999', name: '东北优质黑大米' }]
+  return (
+    <View className='message'>
+      <View className='tab'>
+        <View className={choice === 1 ? 'tablist' : 'tablistfan'} onClick={setChoice1}>信息待补充</View>
+        <View className={choice === 2 ? 'tablist' : 'tablistfan'} onClick={setChoice2}>编辑历史</View>
+        <View className={choice === 1 ? 'tabhua1' : 'tabhua2'}></View>
+      </View>
+      <View className="list" style={choice == 1 ? 'display:block' : 'display:none'}>
+        <View className="listli">
+          <View className="title">审核失败({messlist.length})</View>
+
+          {
+            messlist.map((item, index) => {
+              return (
+                <View className="messlidiv">
+                  <View className="messli">
+                    <View className="go"></View>
+                    <View className="pic"></View>
+                    <View className="xinxidiv">
+                      <View className="xinxi1">批次号:{item.number}</View>
+                      <View className="xinxi2">产品名:{item.name}</View>
+                    </View>
+                  </View>
+                </View>
+              )
+            })
+          }
+        </View>
+      </View>
+      <View className="list" style={choice == 1 ? 'display:none' : 'display:block'}>
+        <View className="listli">
+          <View className="title">已编辑({messlist.length})</View>
+
+          {
+            messlist.map((item, index) => {
+              return (
+                <View className="messlidiv">
+                  <View className="messli">
+                    <View className="go"></View>
+                    <View className="pic"></View>
+                    <View className="xinxidiv">
+                      <View className="xinxi1">批次号:{item.number}</View>
+                      <View className="xinxi2">产品名:{item.name}</View>
+                    </View>
+                  </View>
+                </View>
+              )
+            })
+          }
+        </View>
+      </View>
+      <View className="fixbut" onTap={scan}><View className="buttoo">扫一扫</View></View>
+    </View>
+  )
+}
+export default Index

+ 100 - 0
src/pages/message/index.less

@@ -0,0 +1,100 @@
+page {
+  background: #F5F5F5;
+  font-family: PingFangSC-Medium, PingFang SC;
+  padding-bottom: 194px;
+}
+
+.message {
+  .noline {
+    &::before {
+      content: '';
+      display: inline-block;
+      width: 4px;
+      height: 0px !important;
+      background-color: #E5E5E5;
+      margin-left: 56px;
+      margin-right: 56px;
+      margin-top: 32px;
+    }
+  }
+
+  .list {
+    padding: 22px 24px 284px 24px;
+
+    .listli {
+      background: #FFFFFF;
+      border-radius: 16px;
+
+      .title {
+        padding: 26px 0 24px 24px;
+        font-size: 30px;
+        font-weight: 500;
+        color: #333333;
+        border-bottom: 1px solid #EEEEEE;
+      }
+
+      .messlidiv {
+        padding: 0 24px 24px 24px;
+
+        .messli {
+          display: flex;
+          padding: 24px 0 24px 0;
+          border-bottom: 1px solid #EEEEEE;
+          position: relative;
+
+          .go {
+            display: inline-block;
+            width: 30px;
+            height: 30px;
+            background: url(../../assets/img/right1.png) no-repeat;
+            background-size: 100% auto;
+            position: absolute;
+            top: 34px;
+            right: 0px;
+          }
+
+          .pic {
+            display: inline-block;
+            width: 136px;
+            height: 136px;
+            margin-right: 24px;
+          }
+
+          .xinxidiv {
+            .xinxi1 {
+              font-size: 30px;
+              font-weight: 500;
+              color: #333333;
+              padding: 6px 0 8px 0;
+            }
+
+            .xinxi2 {
+              font-size: 26px;
+              font-weight: 400;
+              color: #999999;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .fixbut {
+    background-color: #FFF;
+    padding: 24px 36px 70px 38px;
+    position: fixed;
+    bottom: 0;
+
+    .buttoo {
+      width: 676px;
+      height: 100px;
+      background: #E43827;
+      border-radius: 50px;
+      text-align: center;
+      font-size: 32px;
+      font-weight: 400;
+      color: #FFFFFF;
+      line-height: 100px;
+    }
+  }
+}

+ 0 - 183
src/pages/page3/index.jsx

@@ -1,183 +0,0 @@
-import { Component } from 'react'
-import { View, Text,Swiper,SwiperItem,Image } from '@tarojs/components'
-import './index.less'
-import Taro,{useDidHide,useReady} from "@tarojs/taro"
-import React,{useState,useEffect,onLoad,useLayoutEffect} from 'react'
-import Recall from '../../components/recall'
-import Weather from '../../components/weather'
-import { formatRichText } from "../../assets/js/filter"
-const Index= ()=> {
-  const [choice,setChoice]=useState(1)
-  //设置产地天气定位城市ID,94为杭州
-  const [cityID,setCityID]=useState(84)
-  //生产追溯是否展开,true为初始不展开,false展开
-  const [ifshow,setIfshow]=useState(true)
-  const [success,setSuccess]=useState(false)
-  const setChoice1=()=>{
-    setChoice(1)
-    console.log(cityID)
-    console.log(success)
-  }
-  const setChoice2=()=>{
-    setChoice(2)
-  }
-  const findmore = () =>{
-    ifshow===false?setIfshow(true):setIfshow(false);
-  }
-
-  const went=(url)=>{
-    Taro.navigateTo({
-      url:url
-    })
-  }
-  
-  useLayoutEffect(() => {
-      setCityID(94)
-
-    },[])
-
-  const froms = [{title:'产前阶段:种植',time:'2021-09-11',name:'张和农',text:'操作描述:自然气候条件独特,常年云雾缭绕,周  边环境污染,是生产优质自然生态蔬菜园。'},
-  {title:'产前阶段:除虫',time:'2021-09-12',name:'张和农',text:'操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。'},
-  {title:'产前阶段:仓储信息',time:'2021-09-12',name:'张和农',text:'操作描述:自然气候条件独特,常年云雾缭绕,周边环境污染,是生产优质自然生态蔬菜园。'}]
-
-  const promesslist = [{title:'产品名称',mess:'宫廷御用菜'},{title:'产品分类',mess:'蔬菜'},{title:'产品规格',mess:'2000g'},{title:'建议价',mess:'38元/斤'},{title:'溯源码',mess:'0253111625362354'}]
-  const wuliulist = [{com:'优鲜购有限公司(采购商)',tel:12034131310},{com:'果乐汇有限公司(供应商)',tel:12034131310}]
-  const thinglist = [{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'新疆维吾尔',price:430},{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'新疆维吾尔',price:430}
-  ,{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'杭州',price:430},{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'徐州',price:430}]
-  const addmesslist = [{title:'产地名称',text:'宫廷御用莲'},{title:'详细地址',text:'北京市东城区东区路112号'},{title:'负责人',text:'韩建'}]
-  return (
-      <View className='message'>
-        <View className='tab'>
-              <View className={choice === 1?'tablist':'tablistfan'} onClick={setChoice1}>产品介绍</View>
-              <View className={choice === 2?'tablist':'tablistfan'} onClick={setChoice2}>产地介绍</View>
-              <View className={choice === 1?'tabhua1':'tabhua2'}></View>
-        </View>
-        <View className="chanpin" style={choice==1?'display:block':'display:none'}>
-          <Recall></Recall>
-          <View className="mes">
-            <View className="productfrom">
-              <View className="bigtitle">生产追溯</View>
-              <View className="allmessage" style={ifshow==false?'':''}>
-                <View className="contens">
-                {
-                froms.map((item,index)=>{
-                  return (
-                    <View className='conten' key={index} style={index<1||ifshow==false?'display:inline-block':'display:inline-block'}>
-                      <View className="inner">
-                      <View className="title">{item.title}</View>
-                      <View className="time">{item.time}</View>
-                      <View className="name">{item.name}</View>
-                      <View className="text">{item.text}</View>
-                      <View className="pic"></View>
-                      </View>
-                    </View>  )
-                })
-              }
-                </View>
-              </View>
-              <View className={ifshow==false?'more':'less'} onClick={findmore}>{ifshow==false?'收起':'点击查看更多'}</View>
-            </View>
-            <View className="showpic"></View>
-            <View className="promessage">
-              <View className="messtitle">产品信息</View>
-              <View className="small1">该批次产品已追溯</View>
-              <View className="small2">190022次</View>
-              {
-                promesslist.map((item,index)=>{
-                  return (
-                    <View className="messdiv">
-                      <View className="mess1">{item.title}</View>
-                      <View className="mess2">{item.mess}</View>
-                    </View>
-                  )
-                })
-              }
-              <View className="messdiv">
-                <View className="mess1">认证标识</View>
-                <View className="iconpic"></View>
-              </View>
-              <View className="messdiv"  style='border:none' onClick={went.bind(this,`/pages/page4/index`)}>
-                <View className="mess1">投诉建议</View>
-                <View className="icon2"></View>
-              </View>
-            </View>
-            <View className="videodiv">
-              <View className="title">产品短片</View>
-              <View className="video"></View>
-            </View>
-            <View className="wuliumessage">
-              <View className="title">物流信息</View>
-              {
-                wuliulist.map((item,index)=>{
-                  return (
-                    <View className="wuliudiv" style={index===wuliulist.length-1?'border:none':''}>
-                      <View className="commess">{item.com}</View>
-                      {/* <View className="tel">联系电话:{item.tel}</View> */}
-                      <View className="icon"></View>
-                    </View>
-                  )
-                })
-              }
-            </View>
-            <View className="advicetitle">优品推荐</View>
-            {
-              thinglist.map((item,index)=>{
-                return(
-                  <View className="thingdiv" style={index%2==0?'margin-right:10px':''} onClick={went.bind(this,`/pages/page6/index`)}>
-                    <View className="pic"></View>
-                    <View className="title">大方土特产,独特配方专业人士手艺的测试测试测试</View>
-                    <View className="has">认证商品</View>
-                    <View className="address">新疆维吾尔</View>
-                    <View className="price">¥430</View>
-                </View>
-                )
-              })
-            }
-          </View>
-        </View>
-        <View className="chandi" style={choice==1?'display:none':'display:block'}>
-        <Swiper
-          className='swiper-body'
-          indicatorDots
-          indicatorColor='#999'
-          indicatorActiveColor='#333'
-          current
-          duration={500}
-          interval={5000}
-          circular
-          autoplay>
-        <SwiperItem>
-          <View className='demo-text-1'>1</View>
-        </SwiperItem>
-        <SwiperItem>
-          <View className='demo-text-2'>2</View>
-        </SwiperItem>
-        <SwiperItem>
-          <View className='demo-text-3'>3</View>
-        </SwiperItem>
-      </Swiper>
-            <View className="promessage">
-              <View className="messtitle">产地信息</View>
-              <View className="small1">该批次产品已追溯</View>
-              <View className="small2">190022次</View>
-              {
-                addmesslist.map((item,index)=>{
-                  return (
-                    <View className="messdiv" style={index==0?'margin-top:14px':''}>
-                      <View className="mess1">{item.title}</View>
-                      <View className="mess2">{item.text}</View>
-                    </View>
-                  )
-                })
-              }
-            </View>
-            <View className="videodiv">
-              <View className="title">生产基地短片</View>
-              <Image className="video" src='http://api.k780.com/upload/weather/d/1.gif'></Image>
-            </View>
-            <Weather props={{weaId:cityID}}></Weather>
-        </View>
-      </View>
-    )
-}
-export default Index

+ 0 - 70
src/pages/page4/index.jsx

@@ -1,70 +0,0 @@
-import { Component,useState} from 'react'
-import { View, Text,Textarea,Input } from '@tarojs/components'
-import './index.less'
-import Taro from "@tarojs/taro"
-import { AtImagePicker } from 'taro-ui'
-import "taro-ui/dist/style/components/image-picker.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import { AtActionSheet, AtActionSheetItem } from "taro-ui"
-import "taro-ui/dist/style/components/action-sheet.scss";
-const went=(url)=>{
-  Taro.navigateTo({
-    url:url
-  })
-}
-const Index= ()=> {
-
-    const [files,setFiles]=useState([])
-    const onChange=(files)=>{
-      setFiles(files)
-
-    }
-    const onFail=(mes)=>{
-      console.log(mes)
-    }
-    const onImageClick=(index, file)=>{
-      console.log(index, file)
-    }
-return (
-      <View className='complain'>
-        <View className="messdiv">
-          <View className="mess1">姓名</View>
-          <Input className='mess2' placeholder="请输入姓名(选填)"></Input>
-        </View>
-        <View className="messdiv">
-          <View className="mess1">手机号</View>
-          <Input className='mess2' placeholder="请输入手机号(选填)"></Input>
-        </View>
-        <View className="messdiv">
-          <View className="mess1">投诉类型</View>
-          <AtActionSheet cancelText='取消' title='头部标题可以用通过转义字符换行'>
-  <AtActionSheetItem>
-    按钮一
-  </AtActionSheetItem>
-  <AtActionSheetItem>
-    按钮二
-  </AtActionSheetItem>
-</AtActionSheet>
-          <View className="icon"></View>
-        </View>
-        <View className="messdiv">
-          <View className="mess1">内容</View>
-          <Textarea className='mess2' placeholder="请描述投诉详情请描述投诉详情请描述投诉详情请描述投诉详情" style='height:88rpx'></Textarea>
-        </View>
-        <View className="lab">查证后将视情况给予一定奖励,建议留下联系方式,以便联系您
-        </View>
-        <View className="complainpic">
-          <View className="title">投诉图片</View>
-          {/* <View className="picdiv"><View className="icon"></View></View> */}
-          <AtImagePicker
-          //className="picdiv"
-        files={files}
-        onChange={onChange.bind(this)}
-      />
-          <View className="label">文件大小不超过5M</View>
-        </View>
-        <View className="but" onClick={went.bind(this,`/pages/page5/index`)}>提交</View>
-      </View>
-    )
-}
-export default Index

+ 0 - 117
src/pages/page6/index.jsx

@@ -1,117 +0,0 @@
-import { Component } from 'react'
-import { View, Swiper,SwiperItem } from '@tarojs/components'
-import './index.less'
-import Taro from "@tarojs/taro"
-import React,{useState,useEffect} from 'react'
-const went=(url)=>{
-  Taro.navigateTo({
-    url:url
-  })}
-
-const Index= ()=> {
-  const ajax=()=>{
-    Taro.request({
-      url: 'https://sapi.k780.com', //仅为示例,并非真实的接口地址
-      data: {
-        app:'weather.future',
-        //cityId:"101210101",
-        //citynm:'北京',
-        weaId:'94',
-        appkey: '10003',
-        sign:'b59bc3ef6191eb9f747dd4e83c99f2a4',
-        format:'json'
-      },
-      header: {
-        'content-type': 'application/json' // 默认值
-      },
-      success: function (res) {
-        console.log(res.data)
-      }
-    })
-}
-useEffect(()=>{
-  ajax()
-},[])
-  
-  const thinglist = [{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'新疆维吾尔',price:430},{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'新疆维吾尔',price:430}
-  ,{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'杭州',price:430},{title:'大方土特产,独特配方专业人士手艺的测试测试测试',address:'徐州',price:430}]
-    const tulist =[{url:''},{url:''}]
-    const [picnum,setPicnum]=useState(1);
-    const bang =(e)=>{
-      setPicnum(e.detail.current+1)
-    }
-    const banmess={text1:'山东土鸡汤',text2:'认证商品',text3:'享受百日阳光,营养价值超越普通三倍',text4:'发货地址:浙江省杭州市滨江区阿里中心2栋'}
-    const prointropic = [{},{},{}]
-    const chandiintro =[{title:"基地名称1",mess:'介绍文本内容展示绍文本内容展示,介绍文本内容展示绍文本内容展示'},{title:"基地名称2",mess:'介绍文本内容展示绍文本内容展示,介绍文本内容展示绍文本内容展示'}]
-return (
-        <View className="index">
-          <View className="banner">
-          <Swiper
-            className='swiper-body'
-            indicatorColor='#999'
-            indicatorActiveColor='#333'
-            current={0}
-            duration={500}
-            interval={5000}
-            circular
-            autoplay onChange={bang}>
-            {
-              tulist.map((item,index)=>{
-                return(<SwiperItem>
-                  <View className='demo-text-1'></View>
-                </SwiperItem>)
-              })
-            }
-          </Swiper>
-          <View className='change'>{picnum}/{tulist.length}</View>
-          </View>
-          <View className="bannermess">
-            <View className="text1">{banmess.text1}</View>
-            <View className="text2">{banmess.text2}</View>
-            <View className="text3">{banmess.text3}</View>
-            <View className="text4">{banmess.text4}</View>
-          </View>
-          <View className="porintro">
-            <View className="title">商品介绍</View>
-            {
-              prointropic.map((item)=>{
-                return (
-                  <View className='pic'></View>
-                )
-              })
-            }
-          </View>
-          <View className="chandiintro">
-            <View className="introtitle">产地介绍</View>
-            {
-              chandiintro.map((item,index)=>{
-                return (
-                  <View className="chandidiv"style={index==chandiintro.length-1?'padding-bottom:0;border:none;':''}>
-                    <View className="pic"></View>
-                    <View className="xinxi">
-                    <View className="title">{item.title}</View>
-                    <View className="mess">{item.mess}</View>
-                    </View>
-                  </View>
-                )
-              })
-            }
-          </View>
-          <View className="advicetitle">优品推荐</View>
-            {
-              thinglist.map((item,index)=>{
-                return(
-                  <View className="thingdiv" style={index%2==0?'margin-right:10px':''} onClick={went.bind(this,`/pages/page6/index`)}>
-                    <View className="pic"></View>
-                    <View className="title">大方土特产,独特配方专业人士手艺的测试测试测试</View>
-                    <View className="has">认证商品</View>
-                    <View className="address">新疆维吾尔</View>
-                    <View className="price">¥430</View>
-                </View>
-                )
-              })
-            }
-        </View>
-    )
-}
-export default Index

src/pages/page5/index.config.js → src/pages/subsuccess/index.config.js


src/pages/page5/index.css → src/pages/subsuccess/index.css


src/pages/page5/index.jsx → src/pages/subsuccess/index.jsx


src/pages/page5/index.less → src/pages/subsuccess/index.less


+ 4 - 0
src/server/index.js

@@ -0,0 +1,4 @@
+import Http from '../assets/js/server'
+export function test(data) { //删除学员
+  return Http.get("supply/api/supply/code/detail/getsupplyCodeDetail", data)
+}

+ 0 - 4
src/server/weather.js

@@ -1,4 +0,0 @@
-import Http from '../assets/js/server'
-export function weather(data) { //删除学员
-  return Http.get("https://sapi.k780.com", data)
-}

BIN
测试码.png