HW преди 4 години
родител
ревизия
0dc6c68f22

+ 25 - 21
js/component/administration/weapp/pay/index.jsx

@@ -22,33 +22,38 @@ class Pay extends Component{
                 },
                 {
                     title: '用户ID',
-                    dataIndex: 'id',
-                    key: 'id'
+                    dataIndex: 'userNo',
+                    key: 'userNo'
                 },
                 {
                     title: '用户呢称',
-                    dataIndex: 'nickName',
-                    key: 'nickName'
+                    dataIndex: 'userName',
+                    key: 'userName'
                 },
                 {
                     title: '电话',
-                    dataIndex: 'phone',
-                    key: 'phone'
+                    dataIndex: 'mobile',
+                    key: 'mobile'
                 },
                 {
                     title: '发起支付时间',
-                    dataIndex: 'time',
-                    key: 'time'
+                    dataIndex: 'createTimes',
+                    key: 'createTimes'
                 },
                 {
                     title: '金额',
-                    dataIndex: 'lv',
-                    key: 'lv'
+                    dataIndex: 'projectAmount',
+                    key: 'projectAmount'
                 },
                 {
                     title: '支付状态',
-                    dataIndex: 'start',
-                    key: 'start'
+                    dataIndex: 'payStatus',
+                    key: 'payStatus',
+                    render: (text, record) => (
+                        text === 0 ? '未支付' :
+                            text === 1 ? '已支付' :
+                                text === 2 ? '支付失败' : ''
+                    )
                 },
             ],
             dataSource:[],
@@ -96,14 +101,14 @@ class Pay extends Component{
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/news/listNews",
+            url: globalConfig.context + "/api/admin/order/list",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: 10,
-                userName: this.state.searchUserName || undefined,
-                payState: this.state.searchPayState || undefined,
-                payStart: this.state.time[0] || undefined,
-                payEnd: this.state.time[1] || undefined,
+                name: this.state.searchUserName || undefined,
+                payStatus: this.state.searchPayState || undefined,
+                startTime: this.state.time[0] || undefined,
+                endTime: this.state.time[1] || undefined,
             }
         }).done((data1) => {
             let theArr = [];
@@ -149,10 +154,9 @@ class Pay extends Component{
                             });
                         }}
                     >
-                        <Option value="0">已支付</Option>
-                        <Option value="1">未支付</Option>
-                        <Option value="2">待付款</Option>
-                        <Option value="3">支付失败</Option>
+                        <Option value="0">未支付</Option>
+                        <Option value="1">已支付</Option>
+                        <Option value="2">支付失败</Option>
                     </Select>
                     <span style={{ fontSize: 14 }} >提交日期:</span>
                     <RangePicker

+ 40 - 14
js/component/administration/weapp/product/add.jsx

@@ -104,6 +104,7 @@ class Add extends Component{
             loading: false,
             projectType: '',
             sort:'',
+            summary:'',
             name:'',
             pictureVideoUrl: '',
             pictureImgUrl: '',
@@ -129,14 +130,21 @@ class Add extends Component{
     }
 
     getVideoOrgCodeUrl(e) {
-        let str = e[0].type;
-        let index = str.indexOf("/");
-        let type =str.substring(0,index);
-        console.log(type)
-        this.setState({
-            pictureVideoUrl: e,
-            commodityType: type === 'video' ? 1 : type === 'audio' ? 2 : 0,
-        });
+        if(e.length === 0){
+            this.setState({
+                pictureVideoUrl: '',
+                commodityType: 0,
+            });
+        }else{
+            let str = e[0].type;
+            let index = str.indexOf("/");
+            let type =str.substring(0,index);
+            this.setState({
+                pictureVideoUrl: e,
+                commodityType: type === 'video' ? 1 : type === 'audio' ? 2 : 0,
+            });
+        }
+
     }
 
     onOk(releaseStatus = 0){
@@ -152,10 +160,10 @@ class Add extends Component{
             message.warning('请输入正确的金额');
             return false;
         }
-        if(this.state.pictureVideoUrl.length === 0){
-            message.warning('请上传视频/音频');
-            return false;
-        }
+        // if(this.state.pictureVideoUrl.length === 0){
+        //     message.warning('请上传视频/音频');
+        //     return false;
+        // }
         if(this.state.pictureImgUrl.length === 0){
             message.warning('请上传略缩图');
             return false;
@@ -180,12 +188,13 @@ class Add extends Component{
             data: {
                 name: this.state.name || undefined,
                 sort:this.state.sort || undefined,
+                summary:this.state.summary || undefined,
                 content: this.state.content || undefined,
                 commodityContent: this.state.commodityContent || undefined,
                 id: this.props.id || undefined,
                 type: this.state.projectType,
                 amount: this.state.amount || undefined,
-                commodityUrl: this.state.pictureVideoUrl[0].response.data || undefined,
+                commodityUrl: this.state.pictureVideoUrl ? this.state.pictureVideoUrl[0].response.data : '',
                 commodityType: this.state.commodityType,
                 thumbnailUrl: this.state.pictureImgUrl[0].response.data || undefined,
                 host: this.state.host,
@@ -229,11 +238,12 @@ class Add extends Component{
                         this.setState({
                             name: this.props.infor.name,
                             sort:this.props.infor.sort,
+                            summary:this.props.infor.summary,
                             content: this.props.infor.content,
                             commodityContent: this.props.infor.commodityContent,
                             projectType: this.props.infor.type,
                             amount: this.props.infor.amount,
-                            pictureVideoUrl: this.props.infor.commodityUrl ? splitUrl(this.props.infor.commodityUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                            pictureVideoUrl: this.props.infor.commodityUrl ? splitUrl(this.props.infor.commodityUrl, ',', globalConfig.avatarHost + '/upload') : '',
                             pictureImgUrl: this.props.infor.thumbnailUrl ? splitUrl(this.props.infor.thumbnailUrl, ',', globalConfig.avatarHost + '/upload') : [],
                             host: this.props.infor.host,
                             commodityType:this.props.infor.commodityType
@@ -352,6 +362,22 @@ class Add extends Component{
                                 />
                                 <p>数字越大,排序越前</p>
                             </FormItem>
+                            <FormItem
+                                className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="摘要"
+                            >
+                                <Input
+                                    placeholder="请输入摘要"
+                                    value={this.state.summary}
+                                    onChange={e => {
+                                        this.setState({
+                                            summary: e.target.value
+                                        });
+                                    }}
+                                />
+                            </FormItem>
                             <div className="clearfix">
                                 <FormItem
                                     className="half-item"

+ 3 - 4
js/component/administration/weapp/product/index.jsx

@@ -231,10 +231,9 @@ class Product extends Component{
             data: {
                 pageNo: pageNo || 1,
                 pageSize: 10,
-                userName: this.state.searchUserName || undefined,
-                payState: this.state.searchPayState || undefined,
-                payStart: this.state.time[0] || undefined,
-                payEnd: this.state.time[1] || undefined,
+                name: this.state.searchUserName || undefined,
+                startTime: this.state.time[0] || undefined,
+                endTime: this.state.time[1] || undefined,
             }
         }).done((data1) => {
             if (data1.error.length !== 0) {

+ 7 - 7
js/component/administration/weapp/user/index.jsx

@@ -17,18 +17,18 @@ class User extends Component{
                 },
                 {
                     title: '用户ID',
-                    dataIndex: 'id',
-                    key: 'id'
+                    dataIndex: 'userNo',
+                    key: 'userNo'
                 },
                 {
                     title: '用户呢称',
-                    dataIndex: 'nickname',
-                    key: 'nickname'
+                    dataIndex: 'userName',
+                    key: 'userName'
                 },
                 {
                     title: '电话',
-                    dataIndex: 'phone',
-                    key: 'phone'
+                    dataIndex: 'mobile',
+                    key: 'mobile'
                 },
                 {
                     title: '注册时间',
@@ -91,7 +91,7 @@ class User extends Component{
             data: {
                 pageNo: pageNo || 1,
                 pageSize: 10,
-                userName: this.state.searchUserName || undefined,
+                name: this.state.searchUserName || undefined,
             }
         }).done((data1) => {
             let theArr = [];

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.3",
+  "version": "1.0.4",
   "description": "",
   "main": "index.js",
   "scripts": {