Browse Source

Merge branch 'dongyuan' of http://gogs.efunbox.cn:3000/Rorschach/reader into dongyuan

Rorschach 6 years ago
parent
commit
433868f13d

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/reader.iml" filepath="$PROJECT_DIR$/.idea/reader.iml" />
+    </modules>
+  </component>
+</project>

+ 12 - 0
.idea/reader.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 340 - 0
.idea/workspace.xml

@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="2ecf3c01-ae46-4667-8997-db10a46d1157" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/component/my/my.js" beforeDir="false" afterPath="$PROJECT_DIR$/component/my/my.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/component/my/my.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/component/my/my.wxml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/component/my/my.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/component/my/my.wxss" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/mine/mine.js" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/mine/mine.json" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/mine/mine.wxml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/mine/mine.wxss" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/static/image/Group 8@2x.png" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/static/image/edit.png" beforeDir="false" afterPath="$PROJECT_DIR$/static/image/edit.png" afterDir="false" />
+    </list>
+    <ignored path="$PROJECT_DIR$/.tmp/" />
+    <ignored path="$PROJECT_DIR$/temp/" />
+    <ignored path="$PROJECT_DIR$/tmp/" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="FUSProjectUsageTrigger">
+    <session id="-1384404472">
+      <usages-collector id="statistics.lifecycle.project">
+        <counts>
+          <entry key="project.closed" value="2" />
+          <entry key="project.open.time.15" value="1" />
+          <entry key="project.open.time.5" value="1" />
+          <entry key="project.opened" value="2" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.extensions.open">
+        <counts>
+          <entry key="js" value="9" />
+          <entry key="json" value="3" />
+          <entry key="wxml" value="4" />
+          <entry key="wxss" value="2" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.types.open">
+        <counts>
+          <entry key="JSON" value="3" />
+          <entry key="JavaScript" value="9" />
+          <entry key="PLAIN_TEXT" value="6" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.extensions.edit">
+        <counts>
+          <entry key="json" value="1" />
+          <entry key="wxss" value="24" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.types.edit">
+        <counts>
+          <entry key="JSON" value="1" />
+          <entry key="PLAIN_TEXT" value="24" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.js.language.service.starts" />
+      <usages-collector id="statistics.vcs.git.usages" />
+    </session>
+  </component>
+  <component name="FileEditorManager">
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="240">
+              <caret line="14" column="23" lean-forward="true" selection-start-line="14" selection-start-column="23" selection-end-line="14" selection-end-column="23" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss">
+          <provider selected="true" editor-type-id="text-editor" />
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="390">
+              <caret line="40" column="8" selection-start-line="40" selection-start-column="8" selection-end-line="40" selection-end-column="8" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FindInProjectRecents">
+    <findStrings>
+      <find>followInit</find>
+    </findStrings>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/component/my/my.wxss" />
+        <option value="$PROJECT_DIR$/pages/index/index.json" />
+      </list>
+    </option>
+  </component>
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsGulpfileManager">
+    <detection-done>true</detection-done>
+    <sorting>DEFINITION_ORDER</sorting>
+  </component>
+  <component name="ProjectFrameBounds" extendedState="6">
+    <option name="x" value="260" />
+    <option name="y" value="20" />
+    <option name="width" value="1400" />
+    <option name="height" value="1000" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="Scope" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+              <item name="pages" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+              <item name="pages" type="462c0819:PsiDirectoryNode" />
+              <item name="user" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+              <item name="pages" type="462c0819:PsiDirectoryNode" />
+              <item name="user" type="462c0819:PsiDirectoryNode" />
+              <item name="myEdit" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="2ecf3c01-ae46-4667-8997-db10a46d1157" name="Default Changelist" comment="" />
+      <created>1541144282324</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1541144282324</updated>
+      <workItem from="1541144291161" duration="762000" />
+      <workItem from="1541157092216" duration="2211000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="2973000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
+    <layout>
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14278187" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Version Control" order="8" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Terminal" order="9" />
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="VcsContentAnnotationSettings">
+    <option name="myLimit" value="2678400000" />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="324">
+          <caret line="59" column="32" selection-start-line="59" selection-start-column="19" selection-end-line="59" selection-end-column="32" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/my/my.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="360">
+          <caret line="12" column="4" selection-start-line="12" selection-start-column="4" selection-end-line="12" selection-end-column="4" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="480">
+          <caret line="16" column="41" lean-forward="true" selection-start-line="16" selection-start-column="33" selection-end-line="16" selection-end-column="41" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/util.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="16" selection-start-column="6" selection-end-column="16" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/follow/follow.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="23" selection-start-column="13" selection-end-column="23" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/index/index.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="240">
+          <caret line="8" column="101" selection-start-line="8" selection-start-column="91" selection-end-line="8" selection-end-column="101" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/index/index.json">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="1" lean-forward="true" selection-start-column="1" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/follow/follow.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="22" selection-start-column="16" selection-end-column="22" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/index/index.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="90">
+          <caret line="3" column="7" lean-forward="true" selection-start-line="3" selection-start-column="7" selection-end-line="3" selection-end-column="7" />
+          <folding>
+            <element signature="n#!!doc" expanded="true" />
+            <element signature="e#41#97#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/const.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="30">
+          <caret line="1" column="18" lean-forward="true" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1320">
+          <caret line="44" column="38" lean-forward="true" selection-start-line="44" selection-start-column="38" selection-end-line="44" selection-end-column="38" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app.json">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="1" lean-forward="true" selection-start-column="1" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/my/my.wxss">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1596">
+          <caret line="40" column="14" lean-forward="true" selection-start-line="40" selection-start-column="14" selection-end-line="40" selection-end-column="14" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="390">
+          <caret line="40" column="8" selection-start-line="40" selection-start-column="8" selection-end-line="40" selection-end-column="8" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="240">
+          <caret line="14" column="23" lean-forward="true" selection-start-line="14" selection-start-column="23" selection-end-line="14" selection-end-column="23" />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>

+ 5 - 4
component/my/my.js

@@ -1,7 +1,7 @@
 export const myInit =  (that) => {
   that.setData({
     myData: {
-        title: '我的',
+        title: '修改资料',
         imgUrl: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
         name: 'ABC',
         address:['北京海淀','中关村','三小'],
@@ -11,10 +11,11 @@ export const myInit =  (that) => {
         flowerNum: 56245
     }
   })
-  that.toAttentionMe = (e) => {
+  that.toMyEdit = (e) => {
+    let title = e.currentTarget.dataset.title;
     wx.navigateTo({
-      url: '../user/myEdit/myEdit'
-    })
+      url: `../user/myEdit/myEdit?title=${title}`
+    });
   }
 
 }

+ 121 - 64
component/my/my.wxml

@@ -1,83 +1,140 @@
 <template name="my">
   <view class='mine-container'>
-    
-  </view>
-  <!-- <view class='containers'> 
-    <view class='mine-top' bindtap='toAttentionMe'>
-      <view class='avatar-box'>
-        <image src="{{ myData.imgUrl }}" background-size="cover"></image>
-      </view>
+    <view class='mine-center'>
       <view class='mine-info'>
-        <view>用户{{ myData.name }}</view>
-        <view>{{ myData.address[0] }},{{ myData.address[1] }},{{ myData.address[2] }}</view>
-      </view>
-      <view class='edit'>
-        <view class='icon'></view>
-      </view>
-    </view>
-    <view class='category'>
-      <view class='play'>
-        <view>{{ myData.playNum }}</view>
-        <text>播放</text>
+        <view class='mine-bg'>
+          <view class='mine-avatar'>
+            <image class='avatar-image' src='{{ myData.imgUrl }}'></image>
+          </view>
+        </view>
+        <view class='mine-edit' bindtap='toMyEdit' data-title='{{ myData.title }}'>
+          <view class='edit-image'>
+            <image class='edit-img' src='../../static/image/_edit.png'></image>
+          </view>
+          <view class='edit-text'>修改个人资料</view>
+        </view>
       </view>
-      <view class='attention'>
-        <view>{{ myData.attentionCount }}</view>
-        <text>关注</text>
-        <view class='attentionCount' bindtap='attentionCountAdd'>+5</view>
+      <view class='mine-detail'>
+        <text class='mine-title'>萝莉</text>
+        <view class='mine-address'>北京市,海淀区中关村三小</view>
+        <view class='mine-line'></view>
       </view>
-      <view class='point'>
-        <view>{{ myData.point }}</view>
-        <text>赞</text>
+      <view class='mine-category'>
+        <view class='play-count'>
+          <view>3232</view>
+          <view class='border-right'>
+            <view class='play-img'>
+              <image src='../../static/image/play.png'></image>
+            </view>
+            <text>播放量</text>
+          </view>
+        </view>
+        <view class='follow-count'>
+          <view class='color'>5200</view>
+          <view class='border-right'>
+            <view class='play-img'>
+              <image src='../../static/image/follow.png'></image>
+            </view>
+            <text>关注</text>
+          </view>
+        </view>
+        <view class='point-count'>
+          <view class='color'>300</view>
+          <view class='border-right'>
+            <view class='play-img'>
+              <image src='../../static/image/point.png'></image>
+            </view>
+            <text>赞</text>
+          </view>
+        </view>
+        <view class='flower-count'>
+          <view class='color'>100</view>
+          <view class='border-right'>
+            <view class='play-img'>
+              <image src='../../static/image/flower.png'></image>
+            </view>
+            <text>红花</text>
+          </view>
+        </view>
       </view>
-      <view class='red-flower'>
-        <view>{{ myData.flowerNum }}</view>
-        <text>红花</text>
+      <view class='wallet-module'>
+        <view class='wallet-center'>
+          <view class='wallet-left'>
+            <view class='icon-box'>
+              <image src='../../static/image/wallet.png'></image>
+            </view>
+            <text>钱包</text>
+          </view>
+          <view class='wallet-right'>
+            <image src='../../static/image/to.png'></image>
+          </view>
+        </view>
       </view>
-    </view>
-    <view class='wallet'>
-      <view class='wallet-title'>
-        <view class='image-box'>
-          <image src='{{ myData.imgUrl }}'></image>
+      <view class='course-module'>
+        <view class='wallet-center'>
+          <view class='wallet-left'>
+            <view class='icon-box'>
+              <image src='../../static/image/courses.png'></image>
+            </view>
+            <text>我的课程</text>
+          </view>
+          <view class='wallet-right'>
+            <image src='../../static/image/to.png'></image>
+          </view>
         </view>
-        <text class='text'>钱包</text>
       </view>
-      <view class='wallet-detail'> > </view>
-    </view>
-    <view class='grouping'>
-      <view class='grouping-title'>
-        <view class='image-box'>
-          <image src='{{ myData.imgUrl }}'></image>
+      <view class='group-module'>
+        <view class='wallet-center'>
+          <view class='wallet-left'>
+            <view class='icon-box'>
+              <image src='../../static/image/group.png'></image>
+            </view>
+            <text>我的拼团</text>
+          </view>
+          <view class='wallet-right'>
+            <image src='../../static/image/to.png'></image>
+          </view>
         </view>
-        <text class='text'>我的拼团</text>
       </view>
-      <view class='grouping-detail'> > </view>
-    </view>
-    <view class='reader'>
-      <view class='reader-title'>
-        <view class='image-box'>
-          <image src='{{ myData.imgUrl }}'></image>
+      <view class='reading-module'>
+        <view class='wallet-center'>
+          <view class='wallet-left'>
+            <view class='icon-box'>
+              <image src='../../static/image/record.png'></image>
+            </view>
+            <text>我的朗读</text>
+          </view>
+          <view class='wallet-right'>
+            <image src='../../static/image/to.png'></image>
+          </view>
         </view>
-        <text class='text'>我的朗读</text>
       </view>
-      <view class='reader-detail'> > </view>
-    </view>
-    <view class='keep'>
-      <view class='keep-title'>
-        <view class='image-box'>
-          <image src='{{ myData.imgUrl }}'></image>
+      <view class='keep-module'>
+        <view class='wallet-center'>
+          <view class='wallet-left'>
+            <view class='icon-box'>
+              <image src='../../static/image/keep.png'></image>
+            </view>
+            <text>我的收藏</text>
+          </view>
+          <view class='wallet-right'>
+            <image src='../../static/image/to.png'></image>
+          </view>
         </view>
-        <text class='text'>我的收藏</text>
       </view>
-      <view class='keep-detail'> > </view>
-    </view>
-    <view class='attention-me'>
-      <view class='attention-me-title'>
-        <view class='image-box'>
-          <image src='{{ myData.imgUrl }}'></image>
+      <view class='myfollow-module'>
+        <view class='wallet-center'>
+          <view class='wallet-left'>
+            <view class='icon-box'>
+              <image src='../../static/image/myfollow.png'></image>
+            </view>
+            <text>我的关注</text>
+          </view>
+          <view class='wallet-right'>
+            <image src='../../static/image/to.png'></image>
+          </view>
         </view>
-        <text class='text'>我的关注</text>
       </view>
-      <view class='attention-me-detail'> > </view>
     </view>
-  </view> -->
+  </view>
 </template>

+ 144 - 106
component/my/my.wxss

@@ -2,163 +2,201 @@
   width: 750rpx;
   height: 1116rpx;
   background: #F0F1F5;
-  padding: 0 17rpx;
+  position: relative;
 }
 
+.mine-center{
+  width: 716rpx;
+  margin: 0 auto;
+}
 
+.mine-info{
+  margin-top: 80rpx;
+  width: 100%;
+  height: 344rpx;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+}
 
+.mine-bg{
+  width: 156rpx;
+  height: 156rpx;
+  background: #61CA54;
+  border-radius: 50%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: absolute;
+  left: 280rpx;
+  top: 18rpx;
+}
 
+.mine-avatar{
+  width: 138rpx;
+  height: 138rpx;
+  border-radius: 50%;
+  background: gray;
+}
 
-
-
-
-
-/* .containers{
-  padding-top: 0;
+.avatar-image{
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
 }
 
-.mine-top{
-  margin-top: 16rpx;
-  position: relative;
-  width: 732rpx;
-  height: 220rpx;
+.mine-edit{
+  position: absolute;
+  top: 110rpx;
+  right: 83rpx;
+  width: 224rpx;
+  height: 46rpx;
+  border-radius: 22rpx;
+  background: #3DBEF9;
   display: flex;
   align-items: center;
-  background: #fff;
-  border-radius: 20rpx;
 }
 
-.avatar-box {
-  margin: 50rpx 0 50rpx 50rpx;
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
+.edit-image{
+  width: 24rpx;
+  height: 36rpx;
+  margin: 0 10rpx 6rpx 20rpx;
 }
 
-.avatar-box image{
+.edit-img{
   width: 100%;
   height: 100%;
-  border-radius: 50%;
 }
 
+.edit-text{
+  width: 144rpx;
+  height: 34rpx;
+  color: #FFFFFF;
+  font-size: 24rpx;
+}
 
-.mine-info{
-  margin-left: 24rpx;
+.mine-detail{
+  width: 670rpx;
+  text-align: center;
+  position: absolute;
+  top: 180rpx;
 }
 
-.mine-info :nth-child(1){
-  width: 308rpx;
-  height: 44rpx;
+.mine-title{
+  color: #000000;
   font-size: 32rpx;
-  color: #030303;
 }
 
-.mine-info :nth-child(2){
-  width: 422rpx;
-  height: 38rpx;
-  font-size: 30rpx;
-  color: #8F8E94;
+.mine-address{
+  color: #4C4C4C;
+  font-size: 28rpx;
 }
 
-.mine-top .edit{
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  width: 72rpx;
-  height: 72rpx;
+.mine-line{
+  width: 674rpx;
+  height: 4rpx;
+  background: #F0F1F5;
+  margin: 37rpx 20rpx;
+}
+
+.mine-category{
+  width: 716rpx;
+  height: 120rpx;
+  font-size: 28rpx;
+  font-weight: bold;
   display: flex;
+  justify-content: space-around;
   align-items: center;
+  position: absolute;
+  top: 300rpx;
+}
+
+.border-right{
+  display: flex;
   justify-content: center;
-  background: #C3C3C3;
-  border-radius: 20rpx 0 20rpx 0;
+  align-items: center;
+  font-size: 24rpx;
+  font-weight: lighter;
+  height: 22rpx;
+  border-right: 2rpx solid #D6D6D6;
 }
 
-.mine-top .edit .icon{
-  width: 48rpx;
-  height: 48rpx;
-  background: #FFFFFF;
+.flower-count .border-right{
+  border: none;
 }
 
-.category{
-  margin-top: 8rpx;
-  position: relative;
-  width: 732rpx;
-  height: 180rpx;
-  display: flex;
-  align-items: center;
-  border-radius: 20rpx;
-  background: #fff;
-  font-weight: 500;
-  font-family: SourceHanSansSC-regular;
-  color: #030303;
+.play-count,.point-count,.follow-count,.flower-count{
+ width: 25%;
+ text-align: center;
 }
 
-.attentionCount{
-  position: absolute;
-  top: 20rpx;
-  left: 313rpx;
-  width: 50rpx;
-  height: 44rpx;
-  line-height: 44rpx;
-  text-align: center;
-  color: red;
-  font-size: 28rpx;
-  font-weight: lighter;
+.play-img{
+  width: 28rpx;
+  height: 26rpx;
+  margin-right: 6rpx;
 }
 
-.category text{
-  color: #959595;
-  font-weight: 500;
-  font-size: 36rpx;
+image{
+  width: 100%;
+  height: 100%;
 }
 
-.play,.attention,.point,.red-flower{
-  flex: 1;
-  text-align: center;
+.play-count{
+  color: #92D626;
 }
 
-.wallet,.grouping,.reader,.keep,.attention-me{
-  margin-top: 8rpx;
-  width: 732rpx;
-  height: 120rpx;
-  background: #FFFFFF;
-  border-radius: 20rpx;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+.point-count{
+  color: #FFA700;
 }
 
-.wallet-title,.grouping-title,.reader-title,.keep-title,.attention-me-title{
-  margin-left: 50rpx;
+.follow-count{
+  color: #529BEF;
 }
 
-.image-box{
-  display: inline-block;
-  width: 56rpx;
-  height: 56rpx;
+.flower-count{
+  color: #EE5750;
 }
 
+.wallet-module{
+  margin-top: 30rpx;
+  width:716rpx;
+  height: 88rpx;
+  font-size: 34rpx;
+  color: #5E5E5E;
+  background: #FFFFFF;
+  border-radius: 14rpx;
+}
 
-.wallet image,.grouping image,.reader image,.keep image,.attention-me image{
-  width: 100%;
-  height: 100%;
-  vertical-align: bottom;
+.wallet-center{
+  width: 680rpx;
+  height: 88rpx;
+  margin: 0 auto;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
 }
 
-.wallet .text,.grouping .text,.reader .text,.keep .text,.attention-me .text{
-  display: inline-block;
-  margin-left: 14rpx;
-  font-size: 36rpx;
-  color: #101010;
+.icon-box{
+  width: 60rpx;
+  height: 60rpx;
+  margin-right: 16rpx;  
 }
 
-.wallet .wallet-detail,.grouping .grouping-detail,.reader-detail,.keep-detail,.attention-me-detail{
-  width: 48rpx;
-  height: 48rpx;
-  line-height: 48rpx;
-  color: #101010;
-  text-align: center;
-  margin-right: 20rpx;
+.wallet-left{
+  display: flex;
+  align-items: center;
+}
+
+.wallet-right{
+  width: 16rpx;
+  height: 28rpx;  
 }
 
- */
+.course-module,.group-module,.reading-module,.keep-module,.myfollow-module{
+  margin-top: 20rpx;
+  width:716rpx;
+  height: 88rpx;
+  font-size: 34rpx;
+  color: #5E5E5E;
+  background: #FFFFFF;
+  border-radius: 14rpx;
+}

+ 0 - 84
pages/user/mine/mine.js

@@ -1,84 +0,0 @@
-// pages/user/mine/mine.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    imgUrl:'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
-    editUrl:'../../../static/image/white.png',
-    nickName:'凤姐',
-    editTitle: '修改资料',
-    address: ['北京市', '海淀区中关村三小']
-  },
-  editDetail: function(e){
-    let title = e.currentTarget.dataset.title;
-    console.log(title);
-    wx.navigateTo({
-      url: `../myEdit/myEdit?title=${title}`
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    console.log(options.title);
-    if (options.title) {
-      wx.setNavigationBarTitle({
-        title: options.title //页面标题为路由参数
-      });
-      this.setData({
-        title: options.title
-      });
-    }
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 1
pages/user/mine/mine.json

@@ -1 +0,0 @@
-{}

+ 0 - 22
pages/user/mine/mine.wxml

@@ -1,22 +0,0 @@
-<!--pages/user/mine/mine.wxml-->
-<view class='mine-container'>
-  <view class='mine-border-radius'></view>
-  <view class='caret-left'></view>
-  <view class='caret-right'></view>
-  <view class='mine-top'>
-    <view class='mine-circle'></view>
-    <view class='avatar-box'>
-      <image class='avatar-image' src="{{ imgUrl }}" background-size="cover"></image>
-    </view>
-    <view class='edit-detail' bindtap='editDetail' data-title='{{ editTitle }}'>
-      <view class='edit-box'>
-        <image class='edit-image' src='{{ editUrl }}'></image>
-      </view>
-      <text class='edit-text'>修改个人资料</text>
-    </view>
-    <view class='nick-name'>
-      <text class='text'>{{ nickName }}</text>
-    </view>
-    <view class='nick-address'>{{ address[0] }},{{ address[1] }}</view>
-  </view>
-</view>

+ 0 - 113
pages/user/mine/mine.wxss

@@ -1,113 +0,0 @@
-/* pages/user/mine/mine.wxss */
-.mine-container{
-  width: 750rpx;
-  height: 1280rpx;
-  background: #F0F1F5;
-  position: relative;
-}
-
-.mine-border-radius{
-  width: 750rpx;
-  height: 190rpx;
-  background: #61CA54;
-}
-
-.caret-left{
-  position: absolute;
-  left: 0;
-  top: 190rpx;
-  width: 0;
-  height: 0;
-  border: 17rpx solid transparent;
-  border-top-color: #61CA54;
-}
-
-.caret-right{
-  position: absolute;
-  right: 0;
-  top: 190rpx;
-  width: 0;
-  height: 0;
-  border: 17rpx solid transparent;
-  border-top-color: #61CA54;
-}
-
-.mine-top{
-  position: absolute;
-  top: 88rpx;
-  left: 17rpx;
-  width: 716rpx;
-  height: 344rpx;
-  border-radius: 20rpx;
-  background: #FFFFFF;
-}
-
-.mine-circle{
-  width: 152rpx;
-  height: 76rpx; 
-  background-color: #61CA54;
-  border-radius:0 0 76rpx 76rpx; /* 左上、右上、右下、左下 */
-  margin: 0 auto;
-}
-
-.avatar-box{
-  position: absolute;
-  left: 290rpx;
-  bottom: 274rpx;
-  width: 138rpx;
-  height: 138rpx;
-  border-radius: 50%;
-}
-
-.avatar-image{
-  width: 100%;
-  height: 100%;
-  border-radius: 50%;
-}
-
-.edit-detail{
-  position: absolute;
-  top: 10rpx;
-  left: 430rpx;
-  width: 230rpx;
-  height: 50rpx;
-  display: flex;
-  align-items: flex-end;
-}
-
-.edit-box{
-  margin-left: 10rpx;
-  width: 46rpx;
-  height: 50rpx;
-}
-
-.edit-image{
-  width: 100%;
-  height: 100%;
-}
-
-.edit-text{
-  font-size: 24rpx;
-  color: #5E5E5E;
-  margin-left: 8rpx;
-}
-
-.nick-name{
-  width: 716rpx;
-  text-align: center;
-  line-height: 60rpx;
-}
-
-.nick-name>.text{
-  color: #000000;
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.nick-address{
-  width: 716rpx;
-  line-height: 40rpx;
-  text-align: center;
-  font-size: 28rpx;
-  color: #4C4C4C;
-}

+ 30 - 11
pages/user/myEdit/myEdit.js

@@ -4,19 +4,30 @@ Page({
    * 页面的初始数据
    */
   data: {
-    items: [
-      { sex: '女', checked: 'true' },
-      { sex: '男' }
+    zradio: [
+      { sex: '女', bool: false },
+      { sex: '男', bool: false }
     ],
-    checkbox:[
-      { occupation: '家长', checked: 'true' },
-      { occupation: '老师' },
-      { occupation: '学生' },
+    occupations: [
+      { occupation: '家长', bool: false },
+      { occupation: '老师', bool: false },
+      { occupation: '学生', checked: true, bool: false  }
     ],
     region: ['北京市', '海淀区','清华大学']
   },
-  radioChange: function(e){
-    console.log(e.detail.value);
+  radioChange: function (e) {
+    var zradio = this.data.zradio;
+    var index = e.currentTarget.dataset.index;
+    console.log(index);
+    if (this.data.zradio[index].bool) {
+      console.log(zradio[index].bool);
+      zradio[index].bool = false;
+    } else {
+      zradio[index].bool = true;
+    };
+    this.setData({
+      zradio: zradio
+    });
   },
   formSubmit: function (e) {
     console.log('form发生了submit事件,携带数据为:', e.detail.value)
@@ -30,8 +41,16 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
-    
+  onLoad: function (option) {
+    console.log(option.title);
+    if (option.title) {
+      wx.setNavigationBarTitle({
+        title: option.title//页面标题为路由参数
+      });
+      this.setData({
+        title: option.title
+      });
+    }
   },
 
   /**

+ 48 - 41
pages/user/myEdit/myEdit.wxml

@@ -1,45 +1,52 @@
 <view class='container'>
-  <form bindsubmit="formSubmit">
-  <view class='nickname-box'>
-    <text class='text'>昵称</text>
-    <input class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle'>
-    </input>
-    <image src='https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320' class='icon'></image>
-  </view>
-  <view class='sex-box'>
-    <text class='sex'>性别</text>
-    <radio-group class="radio-group" bindchange="radioChange">
-      <label class='radios' wx:for="{{ items }}" wx:key="{{ index }}">
-        <text>{{ item.sex }}</text>
-        <radio class='radio' value="{{ item.sex }}" checked="{{item.checked}}"/>
-      </label>
-    </radio-group>
-  </view>
-  <view class='birthday-box'>
-    <text class='birthday'>生日</text>
-    <view class='date'>2001年12月12日</view>
-  </view>
-  <view class='occupation-box'>
-    <radio-group class="radio-groups" bindchange="checkboxChange">
-      <text class='occupation'>职业</text>
-      <label class="checkbox" wx:for="{{ checkbox }}" wx:key="{{ index }}">
-        <text>{{ item.occupation }}</text>
-        <radio value="{{ item.occupation }}" checked="{{item.checked}}"/>
-      </label>
-    </radio-group>
-  </view>
-  <view class='school-box'>
-    <text class='sex'>学校</text>
-    <view class="address-box">
-      <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
-      <view class="picker">
-        当前选择:{{region[0]}},{{region[1]}},{{region[2]}}
+  <view class='setting-info'>
+    <form bindsubmit="formSubmit">
+      <view class='nickname-box'>
+        <view>昵称</view>
+        <view class='user-action'>
+          <input class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle'>
+          </input>
+        </view>
+        <view class='edit-img'>
+          <image src='../../../static/image/edit.png' class='icon'></image>
+        </view>
       </view>
-    </picker>
-    </view>
-  </view>
-   <view class="submit-btn">
-    <button class='btn' formType="submit">完成</button>
+      <view class='sex-box'>
+        <text class='sex-title'>性别</text>
+        <view class='radio-box' wx:for='{{ zradio }}' wx:key='{{ index }}' data-index='{{ index }}' bindtap='radioChange'>
+          <view>{{ item.sex }}</view>
+          <view class='radio'>
+            <view class='circle' wx:if='{{ item.bool }}'></view>
+          </view>
+        </view>
+      </view>
+      <view class='birthday-box'>
+        <text class='birthday-title'>生日</text>
+        <view class='date'>2001年12月12日</view>
+      </view>
+      <view class='occupation-box'>
+        <view class='occupation-title'>职业</view>
+        <view wx:for='{{ occupations }}' wx:key='{{ index }}' data-index='{{ index }}' bindtap='radioChange'>
+          <view>{{ item.occupation }}</view>
+          <view class='radio'>
+            <view class='circle' wx:if='{{ item.bool === !item.checked }}'></view>
+          </view>
+        </view>
+      </view>
+      <view class='school-box'>
+        <text class='sex'>学校</text>
+        <view class="address-box">
+          <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
+          <view class="picker" style='margin-left:30rpx;'>
+            {{region[0]}},{{region[1]}},{{region[2]}}
+          </view>
+        </picker>
+        </view>
+      </view>
+      <view class="submit-btn">
+        <button class='btn' formType="submit">确定</button>
+      </view>
+    </form>
+
   </view>
-  </form>
 </view>

+ 80 - 67
pages/user/myEdit/myEdit.wxss

@@ -1,81 +1,99 @@
-page{
+.container{
+  width: 750rpx;
+  height: 1206rpx;
+  padding-top: 0;
   background: #F7F7F7;
 }
-.container{
-  padding: 0;
+
+.setting-info{
+  width: 716rpx;
+  margin: 0 auto;
+  font-size: 32rpx;
+  color: #5E5E5E;
 }
 
 .nickname-box{
-  position: relative;
-  width: 750rpx;
-  line-height: 80rpx;
+  margin-top: 34rpx;
+  width: 716rpx;
+  height: 88rpx;
+  box-sizing: border-box;
+  padding: 22rpx 0 22rpx 26rpx;
   display: flex;
   align-items: center;
   background: #FFFFFF;
+  border-radius: 12rpx;
 }
 
-.nickname-box .text{
-  margin-left: 26rpx;
-  width: 100rpx;
-  height: 80rpx;
-  font-size: 28rpx;
+.user-action{
+  position: relative;
+  left: 30rpx;
 }
 
-.nickname{
-  width: 100%;
-  height: 40rpx;
+.placeholderStyle{
+  font-size: 32rpx;
+  color: #737373;
 }
 
-.placeholderStyle{
-  font-size: 28rpx;
+.edit-img{
+  position: absolute;
+  left: 220rpx;
+  width: 22rpx;
+  height: 32rpx;
 }
 
 .icon{
-  width: 34rpx;
-  height: 34rpx;
-  position: absolute;
-  left: 210rpx;
-  top: 20rpx;
+  width: 100%;
+  height: 100%;
 }
 
 .sex-box{
-  margin-top: 4rpx;
-  width: 750rpx;
-  line-height: 80rpx;
+  margin-top: 20rpx;
+  width: 716rpx;
+  height: 88rpx;
+  box-sizing: border-box;
   display: flex;
   background: #FFFFFF;
-  font-size: 28rpx;
+  padding: 22rpx 0 22rpx 26rpx;
+  border-radius: 12rpx;
 }
 
-.sex-box .sex{
-  margin-left: 26rpx;
+.radio-box{
+  display: flex;
+  margin-right: 50rpx;
 }
 
-.radio-group{
-  margin-left: 26rpx; 
+.sex-title{
+  display: inline-block;
+  margin-right: 30rpx;
 }
 
-.radios{
-  margin-left: 26rpx;
+.radio{
+  margin-left: 20rpx;
+  width: 32rpx;
+  height: 32rpx;
+  border-radius: 50%;
+  border: 4rpx solid  #FF8100;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 
-/* .sex-box .radio{
-  width: 34rpx;
-  height: 34rpx;
-  border: 2rpx solid #8BC34A;
-} */
-
-radio{
-  transform:scale(0.6);
+.circle{
+  width: 12rpx;
+  height: 12rpx;
+  border-radius: 50%;
+  background:  #FF5E00;
 }
 
 .birthday-box{
-  margin-top: 4rpx;
-  width: 750rpx;
-  line-height: 80rpx;
+  margin-top: 20rpx;
+  width: 716rpx;
+  height: 88rpx;
+  box-sizing: border-box;
   display: flex;
   background: #FFFFFF;
-  font-size: 28rpx;
+  padding: 22rpx 0 22rpx 26rpx;
+  border-radius: 12rpx;
 }
 
 .birthday-box .birthday{
@@ -86,39 +104,34 @@ radio{
   margin-left: 26rpx;
 }
 
-/* .picker{
-  width: 500rpx;
-  background: red;
-} */
-
 .occupation-box{
-  margin-top: 4rpx;
-  width: 750rpx;
-  line-height: 80rpx;
+  margin-top: 20rpx;
+  width: 716rpx;
+  height: 88rpx;
+  box-sizing: border-box;
   display: flex;
   background: #FFFFFF;
-  font-size: 28rpx;
+  padding: 22rpx 0 22rpx 26rpx;
+  border-radius: 12rpx;
 }
 
-.occupation-box .occupation{
-  margin-left: 26rpx;
-}
-
-.checkbox{
-  margin-left: 26rpx;
+.occupation-title{
+  border: 1px solid #539BF0
 }
 
 .school-box{
-  margin-top: 4rpx;
-  width: 750rpx;
-  line-height: 80rpx;
+  margin-top: 20rpx;
+  width: 716rpx;
+  height: 88rpx;
+  box-sizing: border-box;
   display: flex;
   background: #FFFFFF;
-  font-size: 28rpx;
+  padding: 22rpx 0 22rpx 26rpx;
+  border-radius: 12rpx;
 }
 
 .submit-btn{
-  margin-top: 534rpx;
+  margin-top: 326rpx;
   width: 750rpx;
   height: 200rpx;
   display: flex;
@@ -127,12 +140,12 @@ radio{
 }
 
 .btn{
-  font-size: 28rpx;
+  font-size: 40rpx;
   color: #FFFFFF;
-  width: 694rpx;
-  height: 100rpx;
+  width: 436rpx;
   line-height: 100rpx;
-  background: #259B24;
+  border-radius: 80rpx;
+  background: #539BF0;
 }
 
 

BIN
static/image/_edit.png


BIN
static/image/courses.png


BIN
static/image/edit.png


BIN
static/image/group.png


BIN
static/image/keep.png


BIN
static/image/play.png


BIN
static/image/to.png


BIN
static/image/wallet.png