Handy_Cao 2 년 전
부모
커밋
4b07fbd27d

+ 3 - 3
GuangZuan/miniprogram/mHome/pages/calculator/index.wxml

@@ -10,7 +10,7 @@
   <view class="cell-view zsshape" wx:if="{{active !== 2}}"> 
     <text>形状</text>
     <view class="content zsshape">
-      <button wx:for="{{zsshapes}}" wx:for-item="itm" wx:for-index="idx" class="{{itm.isCheck ? 'active' : ''}}" id="zsshape {{itm.id}}" wx:key="id" bindtap="onButtonPressed">{{itm.name}}</button>
+      <button wx:for="{{ zsshapes }}" wx:for-item="itm" wx:for-index="idx" class="{{ itm.isCheck ? 'active' : '' }}" id="zsshape {{ itm.id }}" wx:key="id" bindtap="onButtonPressed">{{ itm.name }}</button>
     </view>
   </view>
 
@@ -18,7 +18,7 @@
   <view class="cell-view zscolor"> 
     <text>颜色</text>
     <view class="content zscolor">
-      <button wx:for="{{zscolors}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="zscolor {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
+      <button wx:for="{{ zscolors }}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{ itm.isCheck ? 'active' : '' }}" id="zscolor {{ itm.id }}" bindtap="onButtonPressed">{{ itm.name }}</button>
     </view>
   </view>
 
@@ -26,7 +26,7 @@
   <view class="cell-view zsclarity"> 
     <text>净度</text>
     <view class="content zsclarity">
-      <button wx:for="{{zsclaritys}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="zsclarity {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
+      <button wx:for="{{ zsclaritys }}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{ itm.isCheck ? 'active' : '' }}" id="zsclarity {{ itm.id }}" bindtap="onButtonPressed">{{ itm.name }}</button>
     </view>
   </view>
 

+ 6 - 6
GuangZuan/miniprogram/mHome/pages/cerserach/index.wxml

@@ -7,30 +7,30 @@
 <!-- tabs -->
 <view class="tab-view">
   <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
-    <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
+    <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
   </van-tabs>  
 </view>
 
 <!-- 证书 -->
 <view class="cers">
-  <button wx:for="{{datas}}" wx:for-item="itm" wx:for-index="idx" wx:key="certtype" class="cers-button {{itm.isCheck ? 'active' : ''}}" id="{{itm.orderindex}}" bindtap="onButtonClick">{{itm.certtype}}</button>
+  <button wx:for="{{ datas }}" wx:for-item="itm" wx:for-index="idx" wx:key="certtype" class="cers-button {{ itm.isCheck ? 'active' : '' }}" id="{{ itm.orderindex }}" bindtap="onButtonClick">{{ itm.certtype }}</button>
 </view>
 
 <view class="container">
   <!-- 输入区域 -->
   <view class="input-view">
     <!-- 英文名称 -->
-    <text class="label">{{config.orgenname}}</text>
+    <text class="label">{{ config.orgenname }}</text>
     <!-- 请输入证书号 -->
     <view class="field-view"><van-field model:value="{{ certno }}" input-align="center" adjust-position placeholder="请输入证书号" /></view>
     <!-- 中文名称 -->
-    <text class="label">{{config.orgcnname}}</text>
+    <text class="label">{{ config.orgcnname }}</text>
     <!-- 请输入防伪码 -->
     <view class="field-view"><van-field model:value="{{ securityCode }}" input-align="center" adjust-position placeholder="请输入防伪码" /></view>
     <!-- 证书类型 -->
-    <text class="label">{{config.certtype}}证书数据来源于官网,所有权归NGDTC所有。</text>
+    <text class="label">{{ config.certtype }}证书数据来源于官网,所有权归NGDTC所有。</text>
     <!-- 证书查询地址 -->
-    <text class="label" style="padding-bottom: 10px;" wx:if="{{paramAddress != ''}}" user-select="{{true}}">证书查询地址:{{paramAddress}}</text>
+    <text class="label" style="padding-bottom: 10px;" wx:if="{{ paramAddress != '' }}" user-select="{{ true }}">证书查询地址:{{ paramAddress }}</text>
   </view>
 </view>
 

+ 3 - 4
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.less

@@ -40,7 +40,7 @@
       font-size: 20px;
     }
 
-    .attribute-info__item, .content__item{
+    .attribute-info__item, .content__item {
       width: 100%;
       padding-left: 15px;
       height: 44px;
@@ -91,9 +91,8 @@
             margin-bottom: 5px;
     
             text {
-              font-size: 13px;
-              padding: 2.5px;
-              width: 100px;
+              font-size: 12px;
+              padding: 2.5px 5px;
               text-align: center;
             }
           }

+ 0 - 347
GuangZuan/miniprogram/mHome/pages/msg/search/index.ts

@@ -1,347 +0,0 @@
-import { getEnumList } from "../../../../services/utils"
-
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    /// 底部安全区域
-    safeBottom: getApp().globalData.safeBottom,
-    /// tabs
-    tabs: [{id: 2, name: '单颗裸钻'}, {id: 5, name: '单颗彩钻'}],
-    /// tab索引
-    active: 0,
-    /// 形状
-    shapes: [{ id: 1, name: '圆明亮形', isCheck: true }],
-    /// 选中形状         
-    shape: ['1'],
-    /// 颜色
-    colors: [{id: 1, name: 'D', isCheck: true}],
-    /// 选中形状
-    color: [1],
-    /// 净度
-    neatness: [{ id: 1, name: 'FL', isCheck: true }],
-    /// 选中净度
-    neatnes: 1,
-    /// 切工 
-    qiegongs: [{ id: 1, name: 'EX', isCheck: true }],
-    /// 选中切工
-    qiegong: 1,
-    /// 对称
-    duichengs: [{ id: 1, name: 'EX', isCheck: true }],
-    duicheng: 1,
-    /// 抛光
-    paoguangs: [{ id: 1, name: 'EX', isCheck: true }],
-    paoguang: 1,
-    /// 莹光
-    yingguangs: [{ id: 1, name: '无', isCheck: true }],
-    /// 选中莹光
-    yingguang: 1,
-    /// 证书
-    certificates: [{ id: 1, name: 'GIA', isCheck: true }],
-    /// 选中证书
-    certificate: 1,
-    /// 币种
-    currencys: [{id: 1, name: '人民币(¥)', isCheck: true}, 
-                {id: 2, name: '美元($)', isCheck: false}],
-    currency: 1,
-    /// 最小重量
-    minweight: 0.00,
-    /// 最大重量
-    maxweight: 0.00
-  },
-
-  /**
-   * tab触发事件
-   */
-  onTabChange(e: any) {
-    /// 设置激活项
-    this.setData({ active: e.detail.index })
-  },
-
-  /**
-   * 返回上层视图
-   */
-  backToParent() {
-    /// 返回上层视图
-    wx.navigateBack()
-  },
-
-  /// 按钮点击事件
-  onButtonPressed(e: any) {
-    /// 数据拼接
-    const ids = (<string> e.target.id).split(' ')
-    const id = (<string> e.target.id).split(' ')[0]
-    const index = <number> <unknown>ids[1]
-
-    switch (id) {
-      case 'shape':   /// 形状
-        this.setData({ shapes: this.data.shapes.map(item => {
-          if (item.id == index) { item.isCheck = !item.isCheck } 
-          return item
-        }) })
-        /// 赋值
-        this.setData({ shape: this.data.shapes.map(item => {
-          return item.id.toString()
-        }) })
-        break;
-      case 'currency': 
-        this.setData({ currencys: this.data.currencys.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ currency: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'color':   /// 颜色
-        this.setData({ colors: this.data.colors.map(item => {
-          if (item.id == index) { item.isCheck = !item.isCheck } 
-          return item
-        }) })
-        /// 赋值
-        this.setData({ color: this.data.colors.map(item => { return item.id }) })
-        break;
-      case 'neatness':   /// 净度
-        this.setData({ neatness: this.data.neatness.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ neatnes: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'qiegong':   /// 切工
-        this.setData({ qiegongs: this.data.qiegongs.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ qiegong: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'duicheng':   /// 对称
-        this.setData({ duichengs: this.data.duichengs.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ duicheng: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'polishing':   /// 抛光
-        this.setData({ paoguangs: this.data.paoguangs.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ polishing: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'yingguang':   /// 荧光
-        this.setData({ yingguangs: this.data.yingguangs.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ yingguang: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'certificate':   /// 证书
-        this.setData({ certificates: this.data.certificates.map(item => {
-          if (item.id == index) {
-            item.isCheck = true
-            /// 赋值
-            this.setData({ certificate: item.id })
-          } else {
-            item.isCheck = false
-          }
-          return item
-        }) })
-        break;
-      case 'search':   /// 搜索
-        /// 搜索页面跳转
-        this.goToSearch()
-        break;
-      case 'clear': break;
-      default: break;
-    }
-  },
-
-  /// 重量范围值更改
-  syncNumRange(e: any) {
-    this.setData({
-      minweight: e.detail.value[0],
-      maxweight: e.detail.value[1],
-    })
-  },
-
-  /// 搜索页面跳转
-  goToSearch() {
-    /// 数据拼接
-    const info = {
-      category: this.data.tabs[this.data.active].id,
-      zsshapetype: this.data.shape,
-      zsclaritytype: this.data.neatnes,
-      zscuttype: this.data.qiegong,
-      zssymmetrytype: this.data.duicheng,
-      zspolishtype: this.data.paoguang,
-      zsfluorescencetype: this.data.yingguang,
-      zscurrencytype: this.data.currency,
-      zscerttype: this.data.certificate,
-      zscolortype: this.data.color,
-      weight1: this.data.minweight,
-      weight2: this.data.maxweight
-    }
-    /// 页面跳转
-    wx.switchTab({ 
-      url: '/pages/trade/index',
-      /// 加载成功
-      success: () => {
-        /// 缓存数据
-        wx.setStorageSync('TradeParams', JSON.stringify(info))
-      }
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad() {
-    
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-    /// 显示默认数据
-    this.setData({
-      /// 形状
-      shapes: getEnumList('ZSShapeType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 颜色
-      colors: getEnumList('ZSColorType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 净度
-      neatness: getEnumList('ZSClarityType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 切工
-      qiegongs: getEnumList('ZSCutType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 对称
-      duichengs: getEnumList('ZSSymmetryType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 抛光
-      paoguangs: getEnumList('ZSPolishType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 荧光
-      yingguangs: getEnumList('ZSFluorescenceType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-      /// 证书
-      certificates: getEnumList('ZSCertType').map(obj => {
-        return {
-          id: obj.enumitemname,
-          name: obj.enumdicname,
-          isCheck: false
-        }
-      }),
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-    
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 1 - 0
GuangZuan/miniprogram/pages/home/index.less

@@ -177,6 +177,7 @@
             border-radius: 10px;
             color: #fff;
             font-size: 11px;
+            margin-right: 5px;
           }
         }
 

+ 2 - 1
GuangZuan/miniprogram/pages/home/index.ts

@@ -39,7 +39,7 @@ Page({
     /// 公告消息
     msgs: [{}],
     /// 会员信息
-    members: [{}],
+    members: <GuangZuan.GZMemberInfo[]>[{}],
     /// 是否为空
     isEmpty: true
   },
@@ -139,6 +139,7 @@ Page({
               members: res.data.map(itm => {
                 var obj = itm
                 obj.imageurl = (services.config.openApiUrl+itm.imageurl).replace('./uploadFile', '/uploadFile')
+                obj.membertagsdisplay = itm.membertags.split(',')
                 return obj
              }),
               isEmpty: res.data.length === 0

+ 1 - 1
GuangZuan/miniprogram/pages/home/index.wxml

@@ -62,7 +62,7 @@
             <text class="username">{{ itm.contactname }}</text>
           </view>
           <view class="memberinfo__list__item__right__mid">
-            <text class="tag">{{ itm.membertags }}</text>
+            <text class="tag" wx:for="{{ itm.membertagsdisplay }}" wx:for-item="tag" wx:for-index="idx" wx:key="idx">{{ tag }}</text>
           </view>
           <view class="memberinfo__list__item__right__btm">
             <text class="mobile" user-select>电话: {{ itm.contactphone }}</text>